Re: i_version changes

2008-02-14 Thread Peter Staubach
Jean noel Cordenner wrote: hi, Peter Staubach a écrit : Is the perceived performance hit really going to be as large as suspected? We already update the time fields fairly often and we don't pay a huge penalty for those, or at least not a penalty that we aren't willing to pay. Has anyone

Re: [PATCH 2/3] enhanced syscall ESTALE error handling (v2)

2008-02-04 Thread Peter Staubach
Miklos Szeredi wrote: Would you describe the situation that would cause the kernel to go into an infinite loop, please? The patch basically does: do { ... error = inode-i_op-foo() ... } while (error

Re: [PATCH 2/3] enhanced syscall ESTALE error handling (v2)

2008-02-04 Thread Peter Staubach
Miklos Szeredi wrote: In FUSE interrupts are sent to userspace, and the filesystem decides what to do with them. So it is entirely possible and valid for a filesystem to ignore an interrupt. If an operation was non-blocking (such as one returning an error), then there would in fact be no

[PATCH 3/3] enhanced NFS ESTALE error handling (v2)

2008-02-01 Thread Peter Staubach
-exports the file system. This is a situation that users have been complaining about for years and this support can help to alleviate their situations. Thanx... ps Signed-off-by: Peter Staubach [EMAIL PROTECTED] --- linux-2.6.24.i686/fs/nfs/inode.c.org +++ linux-2.6.24.i686/fs/nfs/inode.c

[PATCH 1/3] enhanced lookup ESTALE error handling (v2)

2008-02-01 Thread Peter Staubach
... ps Signed-off-by: Peter Staubach [EMAIL PROTECTED] --- linux-2.6.24.i686/fs/namei.c.org +++ linux-2.6.24.i686/fs/namei.c @@ -741,7 +741,7 @@ static __always_inline void follow_dotdo { struct fs_struct *fs = current-fs; - while(1) { + while (1) { struct

[PATCH 2/3] enhanced syscall ESTALE error handling (v2)

2008-02-01 Thread Peter Staubach
, utime, utimes, chdir, chroot, rename, exec, mknod, statfs, inotify, setxattr, getxattr, and listxattr. Due to common code factoring, other system calls may have been included too, but were not explicitly tested. Thanx... ps Signed-off-by: Peter Staubach [EMAIL PROTECTED] --- linux-2.6.24

[PATCH 0/3] enhanced ESTALE error handling (v2)

2008-02-01 Thread Peter Staubach
Hi. Here is version 2 of a patch set which modifies the system to enhance the ESTALE error handling for system calls which take pathnames as arguments. The error, ESTALE, was originally introduced to handle the situation where a file handle, which NFS uses to uniquely identify a file on the

Re: [PATCH 3/3] enhanced NFS ESTALE error handling (v2)

2008-02-01 Thread Peter Staubach
Trond Myklebust wrote: On Fri, 2008-02-01 at 15:58 -0500, Peter Staubach wrote: Hi. The patch enhanced the ESTALE error handling for NFS mounted file systems. It expands the number of places that the NFS client checks for ESTALE returns from the server. It also enhances the ESTALE

Re: [PATCH 2/3] enhanced syscall ESTALE error handling (v2)

2008-02-01 Thread Peter Staubach
Miklos Szeredi wrote: This doesn't apply to -mm, because the ro-mounts stuff touches a lot of the same places as this patch. You probably need to rebase this on top of those changes. This patch adds handling for the error, ESTALE, to the system calls which take pathnames as arguments. The

Re: [PATCH 2/3] enhanced syscall ESTALE error handling (v2)

2008-02-01 Thread Peter Staubach
Miklos Szeredi wrote: This doesn't apply to -mm, because the ro-mounts stuff touches a lot of the same places as this patch. You probably need to rebase this on top of those changes. This patch adds handling for the error, ESTALE, to the system calls which take pathnames as

Re: [PATCH 1/3] enhanced ESTALE error handling

2008-01-18 Thread Peter Staubach
Matthew Wilcox wrote: On Fri, Jan 18, 2008 at 10:36:01AM -0500, Peter Staubach wrote: @@ -1025,12 +1027,27 @@ static int fastcall link_path_walk(const mntget(save.mnt); result = __link_path_walk(name, nd); - if (result == -ESTALE) { + while (result == -ESTALE

Re: [PATCH 0/3] enhanced ESTALE error handling

2008-01-18 Thread Peter Staubach
Chuck Lever wrote: Hi Peter- On Jan 18, 2008, at 10:35 AM, Peter Staubach wrote: Hi. Here is a patch set which modifies the system to enhance the ESTALE error handling for system calls which take pathnames as arguments. The VFS already handles ESTALE. If a pathname resolution encounters

[PATCH 1/3] enhanced ESTALE error handling

2008-01-18 Thread Peter Staubach
... ps Signed-off-by: Peter Staubach [EMAIL PROTECTED] --- linux-2.6.23.i686/fs/namei.c.org +++ linux-2.6.23.i686/fs/namei.c @@ -741,7 +741,7 @@ static __always_inline void follow_dotdo { struct fs_struct *fs = current-fs; - while(1) { + while (1

[PATCH 2/3] enhanced ESTALE error handling

2008-01-18 Thread Peter Staubach
, utime, utimes, chdir, chroot, rename, exec, mknod, statfs, inotify, setxattr, getxattr, and listxattr. Due to common code factoring, other system calls may have been included too, but were not explicitly tested. Thanx... ps Signed-off-by: Peter Staubach [EMAIL PROTECTED] --- linux-2.6.23

[PATCH 3/3] enhanced ESTALE error handling

2008-01-18 Thread Peter Staubach
-exports the file system. This is a situation that users have been complaining about for years and this support can help to alleviate their situations. Thanx... ps Signed-off-by: Peter Staubach [EMAIL PROTECTED] --- linux-2.6.23.i686/fs/nfs/inode.c.org +++ linux-2.6.23.i686/fs/nfs/inode.c

Re: [PATCH 1/3] enhanced ESTALE error handling

2008-01-18 Thread Peter Staubach
J. Bruce Fields wrote: On Fri, Jan 18, 2008 at 11:45:52AM -0500, Peter Staubach wrote: Matthew Wilcox wrote: On Fri, Jan 18, 2008 at 10:36:01AM -0500, Peter Staubach wrote: static int path_lookup_create(int dfd, const char *name, - unsigned int

Re: [PATCH 0/3] enhanced ESTALE error handling

2008-01-18 Thread Peter Staubach
Chuck Lever wrote: On Jan 18, 2008, at 12:30 PM, Peter Staubach wrote: Chuck Lever wrote: On Jan 18, 2008, at 11:55 AM, Peter Staubach wrote: Chuck Lever wrote: Hi Peter- On Jan 18, 2008, at 10:35 AM, Peter Staubach wrote: Hi. Here is a patch set which modifies the system to enhance

Re: [PATCH 0/3] enhanced ESTALE error handling

2008-01-18 Thread Peter Staubach
J. Bruce Fields wrote: On Fri, Jan 18, 2008 at 01:12:03PM -0500, Peter Staubach wrote: Chuck Lever wrote: On Jan 18, 2008, at 12:30 PM, Peter Staubach wrote: I can probably imagine a situation where the pathname resolution would never finish, but I am not sure that it could

[PATCH 0/3] enhanced ESTALE error handling

2008-01-18 Thread Peter Staubach
Hi. Here is a patch set which modifies the system to enhance the ESTALE error handling for system calls which take pathnames as arguments. The error, ESTALE, was originally introduced to handle the situation where a file handle, which NFS uses to uniquely identify a file on the server, no

Re: [PATCH 0/3] enhanced ESTALE error handling

2008-01-18 Thread Peter Staubach
Chuck Lever wrote: On Jan 18, 2008, at 11:55 AM, Peter Staubach wrote: Chuck Lever wrote: Hi Peter- On Jan 18, 2008, at 10:35 AM, Peter Staubach wrote: Hi. Here is a patch set which modifies the system to enhance the ESTALE error handling for system calls which take pathnames as arguments

Re: [PATCH] VFS: new fgetattr() file operation

2007-10-24 Thread Peter Staubach
Miklos Szeredi wrote: I don't think Christoph will like the patch better, regardless of how I change the description. Of course, I'm open to suggestion on how to improve the interface, but I think fundamentally this is the only way to correctly deal with the below problem. Anyway, here's the

Re: [PATCH] VFS: new fgetattr() file operation

2007-10-24 Thread Peter Staubach
Miklos Szeredi wrote: Miklos Szeredi wrote: I don't think Christoph will like the patch better, regardless of how I change the description. Of course, I'm open to suggestion on how to improve the interface, but I think fundamentally this is the only way to correctly deal with the below

Re: [PATCH 6/6] nfs: disable leases over NFS

2007-06-29 Thread Peter Staubach
J. Bruce Fields wrote: From: J. Bruce Fields [EMAIL PROTECTED] As Peter Staubach says elsewhere (http://marc.info/?l=linux-kernelm=118113649526444w=2): The problem is that some file system such as NFSv2 and NFSv3 do not have sufficient support to be able to support leases correctly

Re: [PATCH] NFS: Make NFS root work again

2007-06-07 Thread Peter Staubach
David Howells wrote: Make NFS root work by creating a /root directory to satisfy the mount, otherwise the path lookup for the mount fails with ENOENT. Signed-off-by: David Howells [EMAIL PROTECTED] --- init/do_mounts.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git

Re: [patch 01/22] update ctime and mtime for mmaped write

2007-02-28 Thread Peter Staubach
Miklos Szeredi wrote: From: Miklos Szeredi [EMAIL PROTECTED] Changes: o moved check from __fput() to remove_vma(), which is more logical o changed set_page_dirty() to set_page_dirty_mapping in hugetlb.c o cleaned up #ifdef CONFIG_BLOCK mess This patch makes writing to shared memory

Re: [patch 01/22] update ctime and mtime for mmaped write

2007-02-28 Thread Peter Staubach
Miklos Szeredi wrote: These change still have the undesirable property that although the modified pages may be flushed to stable storage, the metadata on the file will not be updated until the application takes positive action. This is permissible given the current wording in the

Re: [patch 01/22] update ctime and mtime for mmaped write

2007-02-28 Thread Peter Staubach
Miklos Szeredi wrote: While these entry points do not actually modify the file itself, as was pointed out, they are handy points at which the kernel gains control and could actually notice that the contents of the file are no longer the same as they were, ie. modified. From the operating

Re: [patch 01/22] update ctime and mtime for mmaped write

2007-02-28 Thread Peter Staubach
Miklos Szeredi wrote: What happens if the application overwrites what it had written some time later? Nothing. The page is already read-write, the pte dirty, so even though the file was clearly modified, there's absolutely no way in which this can be used to force an update to the timestamp.

Re: [PATCH] update ctime and mtime for mmaped write

2007-02-22 Thread Peter Staubach
Miklos Szeredi wrote: Inspired by Peter Staubach's patch and the resulting comments. An updated version of the original patch was submitted to LKML yesterday... :-) Strange coincidence :) file = vma-vm_file; start

Re: [PATCH] update ctime and mtime for mmaped write

2007-02-22 Thread Peter Staubach
Miklos Szeredi wrote: +int set_page_dirty_mapping(struct page *page); This aspect of the design seems intrusive to me. I didn't see a strong reason to introduce new versions of many of the routines just to handle these semantics. What motivated this part of

Re: [PATCH] update ctime and mtime for mmaped write

2007-02-22 Thread Peter Staubach
Miklos Szeredi wrote: Why is the flag checked in __fput()? It's because of this bit in the standard: If there is no such call and if the underlying file is modified as a result of a write reference, then these fields shall be marked for update at some time after the

Re: [PATCH] update ctime and mtime for mmaped write

2007-02-22 Thread Peter Staubach
Miklos Szeredi wrote: Take this example: fd = open() addr = mmap(.., fd) write(fd, ...) close(fd) sleep(100) msync(addr,...) munmap(addr) The file times will be updated in write(), but with your patch, the bit in the mapping will also be set. Then in msync() the

Re: [PATCH] update ctime and mtime for mmaped write

2007-02-22 Thread Peter Staubach
Miklos Szeredi wrote: This still does not address the situation where a file is 'permanently' mmap'd, does it? So? If application doesn't do msync, then the file times won't be updated. That's allowed by the standard, and so portable applications will have to call msync. It

Re: [PATCH] update ctime and mtime for mmaped write

2007-02-21 Thread Peter Staubach
Miklos Szeredi wrote: From: Miklos Szeredi [EMAIL PROTECTED] This patch makes writing to shared memory mappings update st_ctime and st_mtime as defined by SUSv3: The st_ctime and st_mtime fields of a file that is mapped with MAP_SHARED and PROT_WRITE shall be marked for update at some

Re: [PATCH] update ctime and mtime for mmaped write

2007-02-21 Thread Peter Staubach
Trond Myklebust wrote: On Wed, 2007-02-21 at 19:28 +0100, Miklos Szeredi wrote: This flag is checked in msync() and __fput(), and if set, the file times are updated and the flag is cleared Why not also check inside vfs_getattr? This is the minimum, that the standard asks

Re: [PATCH] update ctime and mtime for mmaped write

2007-02-21 Thread Peter Staubach
Miklos Szeredi wrote: Inspired by Peter Staubach's patch and the resulting comments. An updated version of the original patch was submitted to LKML yesterday... :-) Strange coincidence :) file = vma-vm_file; start = vma-vm_end; +

Re: [nfsv4] RE: Finding hardlinks

2007-01-04 Thread Peter Staubach
Bryan Henderson wrote: Clients MUST use filehandle comparisons only to improve performance, not for correct behavior. All clients need to be prepared for situations in which it cannot be determined whether two filehandles denote the same object and in such cases, avoid making invalid assumptions

Re: Status of buffered write path (deadlock fixes)

2006-12-13 Thread Peter Staubach
Trond Myklebust wrote: On Wed, 2006-12-13 at 12:56 +1100, Nick Piggin wrote: Note that these pages should be *really* rare. Definitely even for normal filesystems I think RMW would use too much bandwidth if it were required for any significant number of writes. If file foo exists on

Re: [PATCH 2/3] ensure unique i_ino in filesystems without permanent

2006-12-12 Thread Peter Staubach
Jeff Layton wrote: [EMAIL PROTECTED] wrote: Doh! Thanks for explaining that. Here's a respun patch with your suggestion incorporated. Seems to build correctly without stdbool.h. In fact, I don't see a stdbool.h in Linus' tree as of this morning. Are you sure that it's needed?

Re: readdirplus() as possible POSIX I/O API

2006-12-06 Thread Peter Staubach
Sage Weil wrote: On Mon, 4 Dec 2006, Peter Staubach wrote: I think that there are several points which are missing here. First, readdirplus(), without any sort of caching, is going to be _very_ expensive, performance-wise, for _any_ size directory. You can see this by instrumenting any NFS

Re: NFSv4/pNFS possible POSIX I/O API standards

2006-12-05 Thread Peter Staubach
Matthew Wilcox wrote: On Tue, Dec 05, 2006 at 05:47:16PM +0100, Latchesar Ionkov wrote: I think that the main problem is that all these file systems resove a path name, one directory at a time bringing the server to its knees by the huge amount of requests. I would like to see what the

Re: NFSv4/pNFS possible POSIX I/O API standards

2006-12-04 Thread Peter Staubach
Sage Weil wrote: On Fri, 1 Dec 2006, Trond Myklebust wrote: I'm quite happy with a proposal for a statlite(). I'm objecting to readdirplus() because I can't see that it offers you anything useful. You haven't provided an example of an application which would clearly benefit from a readdirplus()