All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Intro: Better handling coarse-grained timestamps
@ 2008-01-15 16:27 Bob Bell
       [not found] ` <20080115162658.GA18911-y89O8yXFYpDSsb2jM9SCN5/hYUUxywnI@public.gmane.org>
  0 siblings, 1 reply; 30+ messages in thread
From: Bob Bell @ 2008-01-15 16:27 UTC (permalink / raw)
  To: linux-nfs

While developing a new product that uses NFS here at EMC, we've run into
issues with cache coherency.  Our server uses ext3, and therefore can
only provide timestamps with a granularity of 1 second.  We have seen
cases where a directory is modified on the server, then a non-existent
filename within that directory is accessed from the client (returning
an error), and then the directory entry (either subdirectory or file)
gets added on the server, all within the same second.  This leads to
a cached negative dentry on the client, which results in erroneously
returning "file not found" to all future lstat()s and open()s, as the
timestamp on the parent directory has not been modified.

Ideally, all NFS servers would provide finer-grained timestamps, so 
that all changes to a directory also modify the timestamp.  However, it
is a reality that not every one will.  Therefore, we are attempting to
tackle this problem with the following three patches.

First, if the nlinks count changes, invalidate the cached data for the 
directory.  This is of limited use, as it only catches the cases where 
the number of subdirectories has changed.  However, because there is no 
really downside to checking the nlinks count, this check can be 
universally enabled.

Secondly, a modification to the kernel has been made to disable the 
caching of negative dentries when the NFS_MOUNT_NONEGDE flag is set.  
Note that this does nothing to address outdated information being 
returned by readdir().  However, it does allow a file to be open()ed or 
lstat()ed if the filename is known.  Because this has a potential 
performance impact, it is left as an option for the user to select.

Lastly, changes have been made to userspace to accept the "nonegde" 
mount option and set the NFS_MOUNT_NONEGDE flag.

Your review and comments are greatly appreciated.  I believe this is 
a fairly basic patch, and it has worked well in testing so far on SLES
10 (with slight modifications to match the software versions in SLES
10).  Most of this patch is fairly trivial; my only open question is
whether "nonegde" is a good name (I myself sometimes read it as
"non-edge", but have yet to come up with anything better).

-- 
Bob Bell

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2008-01-19  1:29 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-15 16:27 [PATCH 0/3] Intro: Better handling coarse-grained timestamps Bob Bell
     [not found] ` <20080115162658.GA18911-y89O8yXFYpDSsb2jM9SCN5/hYUUxywnI@public.gmane.org>
2008-01-15 16:29   ` [PATCH 1/3] NFS: Check nlinks count Bob Bell
2008-01-15 16:30   ` [PATCH 2/3] NFS: Add NFS_MOUNT_NONEGDE flag to avoid caching negative dentries Bob Bell
     [not found]     ` <20080115163013.GC18911-y89O8yXFYpDSsb2jM9SCN5/hYUUxywnI@public.gmane.org>
2008-01-15 16:52       ` Trond Myklebust
     [not found]         ` <1200415972.7702.7.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2008-01-15 17:04           ` Chuck Lever
2008-01-15 17:14             ` Trond Myklebust
2008-01-16  1:22             ` Bob Bell
     [not found]               ` <20080116012209.GB26010-y89O8yXFYpDSsb2jM9SCN5/hYUUxywnI@public.gmane.org>
2008-01-16  2:42                 ` Trond Myklebust
     [not found]                   ` <1200451350.28088.43.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2008-01-16 12:49                     ` Steve Dickson
     [not found]                       ` <478DFD5A.1040501-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2008-01-16 19:43                         ` Muntz, Daniel
     [not found]                           ` <01AE8AF878612047A442668306EAEB05018178E7-Ye0EzW0T4yEQ4vjYWPuN5KYtpRd4g51m@public.gmane.org>
2008-01-16 20:43                             ` Trond Myklebust
     [not found]                               ` <1200516219.6932.22.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2008-01-16 20:49                                 ` Chuck Lever
2008-01-16 21:12                                   ` Risto Bell
     [not found]                                     ` <478E7345.8080003-+wT8y+m8/X5BDgjK7y7TUQ@public.gmane.org>
2008-01-16 21:56                                       ` Trond Myklebust
     [not found]                                         ` <1200520574.15282.24.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2008-01-16 22:09                                           ` Chuck Lever
2008-01-16 23:21                                             ` Trond Myklebust
2008-01-18 15:29                                   ` Bob Bell
     [not found]                                     ` <20080118152902.GF7128-y89O8yXFYpDSsb2jM9SCN5/hYUUxywnI@public.gmane.org>
2008-01-18 20:00                                       ` Muntz, Daniel
     [not found]                                         ` <01AE8AF878612047A442668306EAEB0501817BA4-Ye0EzW0T4yEQ4vjYWPuN5KYtpRd4g51m@public.gmane.org>
2008-01-19  1:28                                           ` Bob Bell
2008-01-18 21:12                                       ` Chuck Lever
2008-01-18 21:17                                         ` Trond Myklebust
2008-01-15 16:31   ` [PATCH 3/3] nfs-utils: Add nonegde mount option Bob Bell
     [not found]     ` <20080115163130.GD18911-y89O8yXFYpDSsb2jM9SCN5/hYUUxywnI@public.gmane.org>
2008-01-15 16:42       ` Chuck Lever
2008-01-16  1:13         ` Bob Bell
     [not found]           ` <20080116011305.GA26010-y89O8yXFYpDSsb2jM9SCN5/hYUUxywnI@public.gmane.org>
2008-01-16 20:45             ` Chuck Lever
2008-01-16  1:55   ` [PATCH 0/3] Intro: Better handling coarse-grained timestamps Bob Bell
     [not found]     ` <20080116015526.GC26010-y89O8yXFYpDSsb2jM9SCN5/hYUUxywnI@public.gmane.org>
2008-01-16  2:18       ` Trond Myklebust
     [not found]         ` <1200449912.28088.22.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2008-01-16 17:16           ` david m. richter
2008-01-16 19:47             ` Trond Myklebust
     [not found]               ` <1200512872.6932.8.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2008-01-16 20:09                 ` david m. richter

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.