From: Christoph Hellwig <hch@infradead.org>
To: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Adrian Hunter <ext-adrian.hunter@nokia.com>
Subject: Re: [PATCH take 2] UBIFS - new flash file system
Date: Fri, 16 May 2008 06:40:02 -0400 [thread overview]
Message-ID: <20080516104002.GA6962@infradead.org> (raw)
In-Reply-To: <1210070159-22794-1-git-send-email-Artem.Bityutskiy@nokia.com>
General comment:
- not supporting a flash page size different from the system page
size is a horrible thing for people trying to use the same storage
on multiple systems. For a block based filesystem that alone would
be enough reason not to merge it. For a flash filesystem I'm not
entirely sure given that flash isn't moved between systems all that
often.
VFS/VM interaction comments:
- splitting most of the mount code out to build.c is rather odd.
Most filesystems have this in super.c
- calling convention for mount_ubifs is nasty because it doesn't
clean up it's own errors. You might think it's easier to do
all that in ubifs_umount but beeing in the process of untangling
that mess for xfs I'd recomment against it. Unless there's
a very good reason for it functions should always clean up
the resources they allocated in the error case.
- ubifs_get_sb would benefit from splitting out a ubifs_fill_super
routine that allocates a new sb when it's actually needed.
- why do you do the commit_on_unmount in your own ->shutdown_super
instead of the normal ->put_super? If there's a good reason
this at least needs a big comment explaining why.
- ubifs_lookup doesn't really need to use d_splice_alias unless
you want to support nfs exporting
- in ubifs_new_inode you inherit the inode flags from the parent.
This probably wants splitting out in a helper that documents
explicitly what flags are inherited and what not. Given that
you store the general indoe flags settable by chattr in there
it seems like a bad idea to inherit them by default.
- the read dir implementation won't ever support nfs exporting
due to having to keep per open file state. Nor would it support
thing like checkpoint and restart.
- just opencode you mmap routine, there's nothing helpful
in generic_file_mmap if you set your own vm_ops.
- ubifs_trunc should never be called on anything but a regular
file, so the check for it seems superflous. Having it after
the S_ISREG is rather odd too even if you want to have
an assertation.
- please implement the unlocked_ioctl file operation instead of
the old ioctl operation that comes with the BKL locked.
Misc comments:
- ubifs_bg_thread shouldn't set a nice level, especially when it's the
default one anyway.
- the mainoop of ubifs_bg_thread looks a bit odd either, when you
first to an interruotible sleep and then possible one while you
still have TASK_RUNNING set. Also the need_bgt flag is not needed
because the thrad is only woken up to perform it's action.
In the end the main loop should look something like:
while (1) {
if (kthread_should_stop())
break;
if (try_to_freeze())
continue;
run_bg_commit(c);
set_current_state(TASK_INTERRUPTIBLE);
schedule();
__set_current_state(TASK_RUNNING);
}
Same comments on naming in the code:
- bgt is not very descriptive for your kernel thread. These are per
defintion in the background, so just call them thread or
<somethinginformative>_thread. In this case it would probably
be commit_thread.
- any chance you could spell out journal instead of jrn? jrn always
sounds like joern with the wovel eaten by a mailer.. :)
next prev parent reply other threads:[~2008-05-16 10:40 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-06 10:35 Artem Bityutskiy
2008-05-06 10:35 ` [PATCH take 2 01/28] VFS: introduce writeback_inodes_sb() Artem Bityutskiy
2008-05-07 7:23 ` Andrew Morton
2008-05-07 8:00 ` Christoph Hellwig
2008-05-13 8:31 ` Artem Bityutskiy
2008-05-13 8:59 ` Christoph Hellwig
2008-05-13 9:22 ` Artem Bityutskiy
2008-05-07 11:14 ` Artem Bityutskiy
2008-05-07 12:01 ` Artem Bityutskiy
2008-05-07 15:38 ` Andrew Morton
2008-05-07 16:55 ` Artem Bityutskiy
2008-05-08 10:11 ` Artem Bityutskiy
2008-05-20 12:45 ` Artem Bityutskiy
2008-05-20 17:49 ` Andrew Morton
2008-05-22 10:53 ` Artem Bityutskiy
2008-05-22 11:00 ` Artem Bityutskiy
2008-05-06 10:35 ` [PATCH take 2 02/28] do_mounts: allow UBI root device name Artem Bityutskiy
2008-05-06 10:35 ` [PATCH take 2 03/28] UBIFS: add brief documentation Artem Bityutskiy
2008-05-06 10:35 ` [PATCH take 2 04/28] UBIFS: add I/O sub-system Artem Bityutskiy
2008-05-06 10:35 ` [PATCH take 2 05/28] UBIFS: add flash scanning Artem Bityutskiy
2008-05-06 10:35 ` [PATCH take 2 06/28] UBIFS: add journal replay Artem Bityutskiy
2008-05-06 22:05 ` Marcin Slusarz
2008-05-07 5:57 ` Artem Bityutskiy
2008-05-06 10:35 ` [PATCH take 2 07/28] UBIFS: add file-system build Artem Bityutskiy
2008-05-06 10:35 ` [PATCH take 2 08/28] UBIFS: add superblock and master node Artem Bityutskiy
2008-05-06 23:48 ` Kyungmin Park
2008-05-07 6:07 ` Artem Bityutskiy
2008-05-06 10:35 ` [PATCH take 2 09/28] UBIFS: add file-system recovery Artem Bityutskiy
2008-05-06 10:35 ` [PATCH take 2 10/28] UBIFS: add compression support Artem Bityutskiy
2008-05-06 10:35 ` [PATCH take 2 11/28] UBIFS: add key helpers Artem Bityutskiy
2008-05-06 10:35 ` [PATCH take 2 12/28] UBIFS: add the journal Artem Bityutskiy
2008-05-06 10:35 ` [PATCH take 2 13/28] UBIFS: add commit functionality Artem Bityutskiy
2008-05-06 10:35 ` [PATCH take 2 14/28] UBIFS: add TNC implementation Artem Bityutskiy
2008-05-06 10:35 ` [PATCH take 2 15/28] UBIFS: add TNC commit implementation Artem Bityutskiy
2008-05-06 10:35 ` [PATCH take 2 16/28] UBIFS: add TNC shrinker Artem Bityutskiy
2008-05-06 10:35 ` [PATCH take 2 17/28] UBIFS: add LEB properties Artem Bityutskiy
2008-05-06 10:35 ` [PATCH take 2 18/28] UBIFS: add LEB properties tree Artem Bityutskiy
2008-05-06 10:35 ` [PATCH take 2 19/28] " Artem Bityutskiy
2008-05-06 10:35 ` [PATCH take 2 20/28] UBIFS: add LEB find subsystem Artem Bityutskiy
2008-05-06 10:35 ` [PATCH take 2 21/28] UBIFS: add Garbage Collector Artem Bityutskiy
2008-05-06 10:35 ` [PATCH take 2 22/28] UBIFS: add VFS operations Artem Bityutskiy
2008-05-06 10:35 ` [PATCH take 2 23/28] UBIFS: add budgeting Artem Bityutskiy
2008-05-06 10:35 ` [PATCH take 2 24/28] UBIFS: add extended attribute support Artem Bityutskiy
2008-05-06 10:35 ` [PATCH take 2 25/28] UBIFS: add orphans handling sub-system Artem Bityutskiy
2008-05-06 10:35 ` [PATCH take 2 26/28] UBIFS: add header files Artem Bityutskiy
2008-05-06 10:35 ` [PATCH take 2 27/28] UBIFS: add debugging stuff Artem Bityutskiy
2008-05-06 10:35 ` [PATCH take 2 28/28] UBIFS: include FS to compilation Artem Bityutskiy
2008-05-07 8:01 ` [PATCH take 2] UBIFS - new flash file system Christoph Hellwig
2008-05-07 8:07 ` Artem Bityutskiy
2008-05-07 8:10 ` Christoph Hellwig
2008-05-07 8:11 ` Artem Bityutskiy
2008-05-07 8:32 ` Artem Bityutskiy
2008-05-07 10:31 ` Artem Bityutskiy
2008-05-16 10:40 ` Christoph Hellwig [this message]
2008-05-16 13:10 ` Adrian Hunter
2008-05-19 11:30 ` Artem Bityutskiy
2008-05-19 12:36 ` Andi Kleen
2008-05-23 15:18 ` Artem Bityutskiy
2008-05-26 14:03 Artem Bityutskiy
2008-05-26 12:24 ` Artem Bityutskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080516104002.GA6962@infradead.org \
--to=hch@infradead.org \
--cc=Artem.Bityutskiy@nokia.com \
--cc=ext-adrian.hunter@nokia.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome