Re: [RFC 0/2] readdir() as an inode operation

Previous thread: [PATCH] fs menu: small reorg. by Randy Dunlap on Thursday, October 18, 2007 - 11:03 pm. (1 message)

Next thread: [RFC 1/2] i_op->readdir: Change readdir() to be an inode operation by Jan Blunck on Saturday, October 20, 2007 - 6:09 am. (1 message)
To: Christoph Hellwig <hch@...>, Alexander Viro <viro@...>
Cc: Linux-Kernel Mailinglist <linux-kernel@...>, <linux-fsdevel@...>
Date: Saturday, October 20, 2007 - 6:09 am

This is a first try to move readdir() to become an inode operation. This is
necessary for a VFS implementation of "something like union-mounts" where a
readdir() needs to read the directory contents of multiple directories.
Besides that the new interface is no longer giving the struct file to the
filesystem implementations anymore.

Comments, please?
Jan

-

To: Jan Blunck <jblunck@...>
Cc: Christoph Hellwig <hch@...>, Alexander Viro <viro@...>, Linux-Kernel Mailinglist <linux-kernel@...>, <linux-fsdevel@...>
Date: Tuesday, October 30, 2007 - 11:26 am

Hmm, are you sure there are no users which keep some per-struct-file
information for directories? File offset is one such obvious thing which
you've handled but actually filesystem with more complicated structure
of directory may remember some hints about where we really are, keep
some readahead information or so...

Honza
--
Jan Kara <jack@suse.cz>
SuSE CR Labs
-

To: Jan Kara <jack@...>
Cc: Jan Blunck <jblunck@...>, Christoph Hellwig <hch@...>, Alexander Viro <viro@...>, Linux-Kernel Mailinglist <linux-kernel@...>, <linux-fsdevel@...>
Date: Wednesday, October 31, 2007 - 3:13 am

For example, the ext3 filesystem, when it is supported hash tree, does
exactly this. See ext3_htree_store_dirent() in fs/ext3/dir.c and
ext3_htree_fill_tree() in fs/ext3/namei.c.

So your patch would break ext3 htree support.

- Ted
-

To: Jan Kara <jack@...>
Cc: Jan Blunck <jblunck@...>, Christoph Hellwig <hch@...>, Alexander Viro <viro@...>, Linux-Kernel Mailinglist <linux-kernel@...>, <linux-fsdevel@...>
Date: Tuesday, October 30, 2007 - 11:43 pm

The hfsplus code keeps some extra data in the ->private_data of directories,
although I've lost track of the exact benefit from not looking at the code
in some years. As I recall it was a performance enhancement due to the
fact that the data for all directories is effectively in a single file.
I believe it was easier to keep the current position as a structure
rather than just an offset and be careful about the tracking. The hfs
code is almost identical to the hfsplus code in this area.

Brad Boyer
flar@allandria.com

-

Previous thread: [PATCH] fs menu: small reorg. by Randy Dunlap on Thursday, October 18, 2007 - 11:03 pm. (1 message)

Next thread: [RFC 1/2] i_op->readdir: Change readdir() to be an inode operation by Jan Blunck on Saturday, October 20, 2007 - 6:09 am. (1 message)