Re: [RFC] pdirops: vfs patch

2005-02-20 Thread Jan Blunck
Alex Tomas wrote: +static inline struct semaphore * lock_sem(struct inode *dir, struct qstr *name) +{ + if (IS_PDIROPS(dir)) { + struct super_block *sb; + /* name-hash expected to be already calculated */ + sb = dir-i_sb; +

Re: [RFC] pdirops: vfs patch

2005-02-22 Thread Jan Blunck
Quoting Alex Tomas [EMAIL PROTECTED]: 1) i_sem protects dcache too Where? i_sem is the per-inode lock, and shouldn't be used else. 2) tmpfs has no own data, so we can use it this way (see 2nd patch) 3) I have pdirops patch for ext3, but it needs some cleaning ... I think you didn't get my

Re: [RFC] pdirops: vfs patch

2005-02-22 Thread Jan Blunck
Quoting Alex Tomas [EMAIL PROTECTED]: Jan Blunck (JB) writes: 1) i_sem protects dcache too JB Where? i_sem is the per-inode lock, and shouldn't be used else. read comments in fs/namei.c:read_lookup() i_sem does NOT protect the dcache. Also not in real_lookup(). The lock must

Re: [RFC] pdirops: vfs patch

2005-02-22 Thread Jan Blunck
Quoting Alex Tomas [EMAIL PROTECTED]: Jan Blunck (JB) writes: JB i_sem does NOT protect the dcache. Also not in real_lookup(). The lock must be JB acquired for -lookup() and because we might sleep on i_sem, we have to get it JB early and check for repopulation of the dcache. dentry

Re: readdir behaviour

2005-08-02 Thread Jan Blunck
This was also topic on lkml 2 weeks ago. Zitat von Tomas Hruby [EMAIL PROTECTED]: First of all I would like to know what exactly is the meaning of the 'offset' parameter of filldir and whether it is used somewhere? Unlike ext2, our directories are not easily read sequentially and this value

Re: Possible bug in ext3 filesystem

2007-01-04 Thread Jan Blunck
On 1/4/07, Dave Kleikamp [EMAIL PROTECTED] wrote: On Thu, 2007-01-04 at 12:34 +0100, Jens Nie wrote: I think i found a bug in the ext3 filesystem. It deals with dereferencing symlinks. I have installed a fresh openSUSE 10.2 on an ext3 filesystem. No, it seems to be a bug in the coreutils.

Re: [RFC][PATCH 14/14] tmpfs whiteout support

2007-05-14 Thread Jan Blunck
On 5/14/07, Hugh Dickins [EMAIL PROTECTED] wrote: On Mon, 14 May 2007, Bharata B Rao wrote: From: Jan Blunck [EMAIL PROTECTED] Subject: tmpfs whiteout support Introduce whiteout support to tmpfs. Signed-off-by: Jan Blunck [EMAIL PROTECTED] Signed-off-by: Bharata B Rao [EMAIL PROTECTED

Re: [RFC][PATCH 13/14] ext3 whiteout support

2007-05-14 Thread Jan Blunck
On 5/14/07, Andreas Dilger [EMAIL PROTECTED] wrote: On May 14, 2007 15:14 +0530, Bharata B Rao wrote: #define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV0x0008 /* Journal device */ #define EXT3_FEATURE_INCOMPAT_META_BG0x0010 +#define EXT3_FEATURE_INCOMPAT_WHITEOUT

Re: [RFC][PATCH 3/14] Add the whiteout file type

2007-05-15 Thread Jan Blunck
to virtually delete (white-out) files by creating a file with this file type. Signed-off-by: Jan Blunck [EMAIL PROTECTED] Signed-off-by: Bharata B Rao [EMAIL PROTECTED] --- include/linux/stat.h |2 ++ 1 files changed, 2 insertions(+) --- a/include/linux/stat.h +++ b/include/linux/stat.h

Re: [RFC][PATCH 5/14] Introduce union stack

2007-05-15 Thread Jan Blunck
On 5/14/07, Jan Engelhardt [EMAIL PROTECTED] wrote: +static inline void union_lock(struct dentry *dentry) +{ + if (unlikely(dentry dentry-d_union)) { + struct union_info *ui = dentry-d_union; + + UM_DEBUG_LOCK(\%s\ locking %p (count=%d)\n, +

Re: [RFC][PATCH 13/14] ext3 whiteout support

2007-05-15 Thread Jan Blunck
On 5/15/07, Bharata B Rao [EMAIL PROTECTED] wrote: On Mon, May 14, 2007 at 01:16:57PM -0700, Badari Pulavarty wrote: On Mon, 2007-05-14 at 15:14 +0530, Bharata B Rao wrote: From: Bharata B Rao [EMAIL PROTECTED] +static int ext3_whiteout(struct inode *dir, struct dentry *dentry) +{ +

Re: [RFC PATCH] file as directory

2007-05-23 Thread Jan Blunck
On 5/23/07, Miklos Szeredi [EMAIL PROTECTED] wrote: So your question is, which mount takes priority on the lookup? It probably should be the propagated real mount, rather than the dir-on-file one, shouldn't it? Maybe this might belong into __link_path_walk() similar to the handling of

Re: [RFC PATCH] file as directory

2007-05-23 Thread Jan Blunck
On 5/23/07, Miklos Szeredi [EMAIL PROTECTED] wrote: As for unlink... How do you deal with having that thing mounted, mounting something _under_ it (so that vfsmount would be kept busy) and then unlinking that sucker? Yeah, that's a good point. Current patch doesn't deal with that.

Re: [RFC PATCH 1/4] Union mount documentation.

2007-06-20 Thread Jan Blunck
On Wed, 20 Jun 2007 11:21:57 +0530, Bharata B Rao wrote: +4. Union stack: building and traversal +-- +Union stack needs to be built from two places: during an explicit union +mount (or mount propagation) and during the lookup of a directory that +appears in

[RFC 10/26] VFS white-out handling

2007-07-30 Thread Jan Blunck
Introduce white-out handling in the VFS. Signed-off-by: Jan Blunck [EMAIL PROTECTED] --- fs/inode.c | 22 ++ fs/namei.c | 417 +++-- fs/readdir.c |6 include/linux/fs.h |7 4 files changed, 441 insertions(+), 11

[RFC 17/26] union-mount: Drive the union cache via dcache

2007-07-30 Thread Jan Blunck
If a dentry is removed from dentry cache because its usage count drops to zero, the references to the underlying layer of the unions the dentry is in are droped too. Therefore the union cache is driven by the dentry cache. Signed-off-by: Jan Blunck [EMAIL PROTECTED] --- fs/dcache.c

[RFC 01/26] [PATCH 14/18] shmem: convert to using splice instead of sendfile()

2007-07-30 Thread Jan Blunck
From: Hugh Dickins [EMAIL PROTECTED] Remove shmem_file_sendfile and resurrect shmem_readpage, as used by tmpfs to support loop and sendfile in 2.4 and 2.5. Now tmpfs can support splice, loop and sendfile in the simplest way, using generic_file_splice_read and generic_file_splice_write (with the

[RFC 20/26] union-mount: Simple union-mount readdir implementation

2007-07-30 Thread Jan Blunck
read entires are compared against these for duplicates before being they are returned to user space. Signed-off-by: Jan Blunck [EMAIL PROTECTED] Signed-off-by: Bharata B Rao [EMAIL PROTECTED] --- fs/readdir.c | 11 - fs/union.c| 336

[RFC 16/26] union-mount: Introduce union_mount structure

2007-07-30 Thread Jan Blunck
stack when de/referencing a dentry - caching of union stack information still driven by dentry cache Signed-off-by: Jan Blunck [EMAIL PROTECTED] --- fs/Kconfig |8 + fs/Makefile|2 fs/dcache.c|4 fs/union.c | 335

[RFC 18/26] union-mount: Changes to the namespace handling

2007-07-30 Thread Jan Blunck
Creates the proper struct union_mount when mounting something into a union. If the topmost filesystem isn't capable of handling the white-out filetype it could only be mount read-only. Signed-off-by: Jan Blunck [EMAIL PROTECTED] --- fs/namespace.c| 46

[RFC 15/26] union-mount: Add union-mount mount flag

2007-07-30 Thread Jan Blunck
Introduce MNT_UNION and MS_UNION flags. You need additional patches for util-linux for that to work. Signed-off-by: Jan Blunck [EMAIL PROTECTED] --- fs/namespace.c|6 +- include/linux/fs.h|1 + include/linux/mount.h |1 + 3 files changed, 7 insertions(+), 1 deletion

[RFC 26/26] union-mount: Debug code

2007-07-30 Thread Jan Blunck
Some debugging code itself. Signed-off-by: Jan Blunck [EMAIL PROTECTED] --- fs/namei.c| 26 ++ fs/union.c| 27 +++ include/linux/namei.h |4 3 files changed, 57 insertions(+) --- a/fs/namei.c +++ b/fs/namei.c

[RFC 19/26] union-mount: Make lookup work for union-mounted file systems

2007-07-30 Thread Jan Blunck
, follow union, follow symlinks - single pathname component, doesn't follow mounts, follow union, doesn't follow symlinks - single pathname component doesn't follow mounts, doesn't follow unions, doesn't follow symlinks Signed-off-by: Jan Blunck [EMAIL PROTECTED] --- fs/namei.c| 467

[RFC 21/26] union-mount: in-kernel file copy between union mounted filesystems

2007-07-30 Thread Jan Blunck
-off-by: Bharata B Rao [EMAIL PROTECTED] Signed-off-by: Jan Blunck [EMAIL PROTECTED] --- fs/namei.c| 73 ++- fs/union.c| 312 ++ include/linux/union.h |9 + 3 files changed, 389 insertions(+), 5 deletions

[RFC 25/26] union-mount: Debug Infrastructure

2007-07-30 Thread Jan Blunck
to. There are different levels of debugging output available which can be ORed together. For the valid sysctl values see include/linux/union_debug.h. Signed-off-by: Jan Blunck [EMAIL PROTECTED] --- include/linux/union_debug.h | 91 ++ lib/Kconfig.debug |9 + lib/Makefile

[RFC 06/26] VFS: Make real_lookup() return a struct path

2007-07-30 Thread Jan Blunck
This patch changes real_lookup() into returning a struct path. Signed-off-by: Jan Blunck [EMAIL PROTECTED] --- fs/namei.c | 77 ++--- 1 file changed, 48 insertions(+), 29 deletions(-) --- a/fs/namei.c +++ b/fs/namei.c @@ -462,10 +462,11

[RFC 04/26] VFS: Make lookup_create() return a struct path

2007-07-30 Thread Jan Blunck
This patch changes lookup_create() into returning a struct path. Signed-off-by: Jan Blunck [EMAIL PROTECTED] --- arch/powerpc/platforms/cell/spufs/inode.c | 15 ++ fs/namei.c| 75 +- include/linux/dcache.h

[RFC 23/26] union-mount: copyup on rename

2007-07-30 Thread Jan Blunck
Add copyup renaming of regular files on union mounts. Directories are still lazyly copied with the help of user-space. Signed-off-by: Jan Blunck [EMAIL PROTECTED] --- fs/namei.c | 133 - fs/union.c |8 ++- 2 files changed, 129

[RFC 11/26] tmpfs white-out support

2007-07-30 Thread Jan Blunck
Introduce white-out support to tmpfs. Signed-off-by: Jan Blunck [EMAIL PROTECTED] --- include/linux/shmem_fs.h |1 mm/shmem.c | 54 +++ 2 files changed, 55 insertions(+) --- a/include/linux/shmem_fs.h +++ b/include/linux

[RFC 24/26] union-mount: dont report EROFS for union mounts

2007-07-30 Thread Jan Blunck
SuS v2 requires we report a read only fs too. For union-mounts this is a very expensive check. So I'm lazy and just disable the check if we are on a lower layer of an union. Signed-off-by: Jan Blunck [EMAIL PROTECTED] --- fs/open.c |2 +- 1 file changed, 1 insertion(+), 1 deletion

[RFC 03/26] VFS: Make lookup_hash() return a struct path

2007-07-30 Thread Jan Blunck
This patch changes lookup_hash() into returning a struct path. Signed-off-by: Jan Blunck [EMAIL PROTECTED] --- fs/namei.c | 113 ++--- 1 file changed, 57 insertions(+), 56 deletions(-) --- a/fs/namei.c +++ b/fs/namei.c @@ -1297,27

[RFC 07/26] VFS: Introduce dput() variante that maintains a kill-list

2007-07-30 Thread Jan Blunck
__d_kill_final() is called. __d_kill_final() is actually doing the dentry_iput() and is also dereferencing the parent. Signed-off-by: Jan Blunck [EMAIL PROTECTED] --- fs/dcache.c | 60 +++- 1 file changed, 55 insertions(+), 5 deletions(-) --- a/fs

[RFC 13/26] ext3 whiteout support

2007-07-30 Thread Jan Blunck
Introduce whiteout support for ext3. - Needs a reserved inode number for white-outs - S_OPAQUE isn't persistently stored Signed-off-by: Jan Blunck [EMAIL PROTECTED] --- fs/ext3/dir.c |3 ++- fs/ext3/namei.c | 33 + fs/ext3/super.c

[RFC 12/26] ext2 white-out support

2007-07-30 Thread Jan Blunck
Introduce white-out support to ext2. Known Bugs: - Needs a reserved inode number for white-outs - S_OPAQUE isn't persistently stored Signed-off-by: Jan Blunck [EMAIL PROTECTED] --- fs/ext2/dir.c |2 ++ fs/ext2/namei.c | 18 ++ fs/ext2/super.c

[RFC 22/26] union-mount: white-out changes for copy-on-open

2007-07-30 Thread Jan Blunck
When files on an upper layer of the union stack are removed we need to white-out the removed filename. Signed-off-by: Jan Blunck [EMAIL PROTECTED] --- fs/namei.c | 46 -- 1 file changed, 44 insertions(+), 2 deletions(-) --- a/fs/namei.c +++ b/fs

[RFC 00/26] VFS based Union Mount (V2)

2007-07-30 Thread Jan Blunck
Here is another post of the VFS based union mount implementation. Unlike the traditional mount which hides the contents of the mount point, union mounts present the merged view of the mount point and the mounted filesytem. Recent changes: - brand new union structure no longer tied to the dentryn,

[RFC 14/26] union-mount: Documentation

2007-07-30 Thread Jan Blunck
Add simple documentation about union mounting in general and this implementation in specific. Signed-off-by: Jan Blunck [EMAIL PROTECTED] --- Documentation/filesystems/union-mounts.txt | 172 + 1 file changed, 172 insertions(+) --- /dev/null +++ b/Documentation

[RFC 08/26] VFS: Export lives_below_in_same_fs()

2007-07-30 Thread Jan Blunck
Export lives_below_in_same_fs() for use in union mount code. Signed-off-by: Jan Blunck [EMAIL PROTECTED] --- fs/namespace.c|3 ++- include/linux/mount.h |1 + 2 files changed, 3 insertions(+), 1 deletion(-) --- a/fs/namespace.c +++ b/fs/namespace.c @@ -793,7 +793,7 @@ static

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

2007-10-20 Thread Jan Blunck
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

[RFC 1/2] i_op-readdir: Change readdir() to be an inode operation

2007-10-20 Thread Jan Blunck
: the dentry of the directory @pos: pointer to the cookie @private: the credentials (at the moment it is still filp-private_data @filler: the filldir to call @dirent: the dirent buffer Signed-off-by: Jan Blunck [EMAIL PROTECTED] --- fs/readdir.c | 14 -- include/linux/fs.h |2

[RFC 2/2] i_op-readdir: Change libfs users to the new interface

2007-10-20 Thread Jan Blunck
This patch changes dcache_readdir() to the new inode operations readdir interface. Hence all the users of libfs.c are changed to use the new interface too. Signed-off-by: Jan Blunck [EMAIL PROTECTED] --- fs/autofs4/autofs_i.h |5 ++--- fs/autofs4/root.c | 41

Re: + embed-a-struct-path-into-struct-nameidata-instead-of-nd-dentrymnt.pa tch added to -mm tree

2007-11-06 Thread Jan Blunck
On Mon, Nov 05, Jörn Engel wrote: Subject: Embed a struct path into struct nameidata instead of nd-{dentry,mnt} From: Jan Blunck [EMAIL PROTECTED] Switch from nd-{dentry,mnt} to nd-path.{dentry,mnt} everywhere. Signed-off-by: Jan Blunck [EMAIL PROTECTED] Signed-off-by: Andreas

Re: + embed-a-struct-path-into-struct-nameidata-instead-of-nd-dentrymnt.pa tch added to -mm tree

2007-11-06 Thread Jan Blunck
On Tue, Nov 06, Jörn Engel wrote: This is a cleanup series. In mostly no case there is a reason why someone would want to use a dentry for itself. This series reflects that fact in nameidata where there is absolutly no reason at all. 400+ lines changed in this patch, some 10 in a

Re: + embed-a-struct-path-into-struct-nameidata-instead-of-nd-dentrymnt.pa tch added to -mm tree

2007-11-07 Thread Jan Blunck
Junjiro Okajima, first of all thanks for the feedback on my union mount patches. On Tue, Nov 06, [EMAIL PROTECTED] wrote: Whiteouts in your code can be a serious memory pressure, since they are kept in dcache. I know the inode for whiteouts exists only one and it is shared, but dentries for