From: Christoph Hellwig <hch@infradead.org>
To: dhowells@redhat.com, akpm@osdl.org
Cc: linux-fsdevel@vger.kernel.org
Subject: fscache review comments, part 3
Date: Thu, 28 Sep 2006 17:45:47 +0100 [thread overview]
Message-ID: <20060928164547.GC3497@infradead.org> (raw)
Now it gets dirty. This mail is about the cachefiles module which
I'm actually unhappy with, unlike the previous bits which just got
the usual round of suggestions.
- as a start please don't mix introducing a new module, adding new
function in the core code and adding exports in the same patch.
- the new install_page_waitqueue_monitor function is generally fine,
but it should get
a) a kernel-doc comment describing it
b) a name actual describig what it does, e.g. add_page_wait_queue
monitoring the names for other waitqueue functionality.
- generic_file_buffered_write_one_kernel_page seems generally fine, but
you must not call this directly from cachefiles but rather go through
a file operation for it.. There's various filesystems where directly
going to the address_space operations is not fine. This goes back
to our kernel_read/write discussion at OLS. Also please remove the #if 0
debug code and add a kernel-doc comment.
- the debug sysctl shouldn't be needed. We allow run-time changeable
module parameters now, which sound perfect for this purpose.
- the procfs interface is insane :) Suggested replacement:
- the tunables sound like they should be one-value per file sysfs
entinities.
- dito for the tag
- same is true for the root directory, but that one should not
be specified as a filedescriptor, but a normal pathname.
This also get rid of the non-acceptable fget_light export.
- the second argument to cachefiles_proc_add_cache is always NULL,
you could remove it aswell.
- intead of setting nd.mnt and nd.dentry to NULL in cachefiles_proc_add_cache
you should grab your own references to them
- send_sigurg should be exported _GPL if at all. In fact I'm not very
happy about using it at all. Why can you use a random singnal to
communicated with your daemon?
- never use ->getxattr and ->setxattr directly. Always use the
vfs_getxattr and vfs_setxattr helpers.
- similar for unlink, please use vfs_unlink so you don't miss selinux,
mountpoint and similar checks. If you need a version that can be
entered with the lock already held we can talk about that, but I'd
prefer you to get rid of the requirement
- the rename case is even worse. We need a very very good justification
why this can't be done using vfs_rename
- in cachefiles_walk_to_object reseting the fsuid/fsgid is not allowed
- all of cf-namei.c is poking into dcache.c and namei.c internals that
it absolutely must not. I'm not going to mention all the details here
because it's far too much, but I'd say for every single direct invocation
of a filesystem inode or dcache operation from this file you will
need a very good explanation - I'm not going to accesspt something
poking into internals that deeply, it's exactly the kind of layering
we want to provide via the VFS.
- style-comment: please don't mention the filename again in the top-of-file
block comment
There's probably a few more issues here, but I don't want to spend time
on it until the fundamental problems are sorted out.
next reply other threads:[~2006-09-28 16:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-28 16:45 Christoph Hellwig [this message]
2006-09-29 9:23 ` fscache review comments, part 3 David Howells
2006-09-29 16:43 ` Christoph Hellwig
2006-10-06 13:25 ` David Howells
2006-10-07 21:05 ` Christoph Hellwig
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=20060928164547.GC3497@infradead.org \
--to=hch@infradead.org \
--cc=akpm@osdl.org \
--cc=dhowells@redhat.com \
--cc=linux-fsdevel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.