From: Jeff Layton <jlayton@redhat.com>
To: viro@zeniv.linux.org.uk
Cc: linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org,
linux-kernel@vger.kernel.org, michael.brantley@deshaw.com,
hch@infradead.org, miklos@szeredi.hu, pstaubach@exagrid.com
Subject: [PATCH v8 00/32] vfs: add the ability to retry lookup and operation to most path-based syscalls
Date: Sat, 27 Oct 2012 08:33:07 -0400 [thread overview]
Message-ID: <1351341219-17837-1-git-send-email-jlayton@redhat.com> (raw)
This patchset retrofits most of the path-based syscalls in the kernel to
retry the lookup and operation when the operation returns ESTALE. There
might be a few more that need similar changes afterward, but this should
cover most of the ones people are interested in.
The prerequisite patches for this set were merged in 3.7. I think that
these are appropriate for 3.8. There are some minor changes since I last
posted the set:
- a subtle bug in the do_unlinkat patch was fixed. It's necessary to set
"inode" to NULL on each pass through the function. This was causing a
"Busy inodes on umount" error in testing.
- a patch for user_statfs has been added
- patches for do_filp_open, do_file_open_root, and filename_lookup have
been added to make them use the retry_estale helper function. These
don't strictly need changing if we only ever want to make this code
retry once on an ESTALE error, but I still felt it was best to keep the
policy on retrying after an ESTALE error in a single function.
- a patch has been added to make the number of ESTALE retries tunable
via sysctl. The problem I encountered in working on this set was the
difficulty in testing these changes. By adding this tunable, I could
crank up the number of retries to a large value to make testing easier.
I'm happy to report that with this set, I was able to run Peter
Staubach's reproducer program from 2008 for as long as I liked providing
I cranked up the estale_retries value to a large number. [1]
At the very least, I'd like to see the first 28 patches merged for 3.8.
The next three in the series I think also make sense for consistency's
sake. If we ever determined that a single retry was not enough, then
they will make changing that policy easier.
I include the final patch for completeness sake since it shows how I
tested the set. That said, since there is no well-defined value that
will work for all cases, allowing a tunable for this makes some sense to
me. [2]
These patches are also available in the "estale" branch of my git tree
if that makes it easier to merge them:
git://git.samba.org/jlayton/linux.git estale
[1]: Peter's test program is here: https://lkml.org/lkml/2008/1/18/265
I commented out the inotify_test since I haven't patched those
syscalls. The test was done by running this program on the server
and the client at the same time in the same directory. If I
cranked up estale_retries to a large value (10000000 or so), then
it would run indefinitely.
[2]: If we do want to allow a tunable however, we might consider "beefing
up" retry_estale() to add some of the earlier suggestions. For
instance, checking for fatal signals and an an exponential backoff
delay. We might also want to do some work to ensure that lookups are
making forward progress in the face of multiple retries. If we
do want those, then that's probably best done in a separate patchset.
Jeff Layton (32):
vfs: add a retry_estale helper function to handle retries on ESTALE
vfs: make fstatat retry on ESTALE errors from getattr call
vfs: fix readlinkat to retry on ESTALE
vfs: add new "reval" argument to kern_path_create and
user_path_create
vfs: fix mknodat to retry on ESTALE errors
vfs: fix mkdir to retry on ESTALE errors
vfs: fix symlinkat to retry on ESTALE errors
vfs: fix linkat to retry on ESTALE errors
vfs: add a reval argument to user_path_parent
vfs: make rmdir retry on ESTALE errors
vfs: make do_unlinkat retry on ESTALE errors
vfs: fix renameat to retry on ESTALE errors
vfs: have do_sys_truncate retry once on an ESTALE error
vfs: have faccessat retry once on an ESTALE error
vfs: have chdir retry lookup and call once on ESTALE error
vfs: make chroot retry once on ESTALE error
vfs: make fchmodat retry once on ESTALE errors
vfs: make fchownat retry once on ESTALE errors
vfs: fix user_statfs to retry once on ESTALE errors
vfs: allow utimensat() calls to retry once on an ESTALE error
vfs: allow setxattr to retry once on ESTALE errors
vfs: allow lsetxattr() to retry once on ESTALE errors
vfs: make getxattr retry once on an ESTALE error
vfs: make lgetxattr retry once on ESTALE
vfs: make listxattr retry once on ESTALE error
vfs: make llistxattr retry once on ESTALE error
vfs: make removexattr retry once on ESTALE
vfs: make lremovexattr retry once on ESTALE error
vfs: convert do_filp_open to use retry_estale helper
vfs: convert do_file_open_root to use retry_estale helper
vfs: convert filename_lookup to use retry_estale helper
vfs: make number of ESTALE retries tunable
arch/powerpc/platforms/cell/spufs/syscalls.c | 2 +-
drivers/base/devtmpfs.c | 7 +-
fs/namei.c | 273 ++++++++++++++++-----------
fs/ocfs2/refcounttree.c | 3 +-
fs/open.c | 252 ++++++++++++++-----------
fs/stat.c | 32 +++-
fs/statfs.c | 14 +-
fs/utimes.c | 15 +-
fs/xattr.c | 152 +++++++++------
include/linux/fs.h | 23 +++
include/linux/namei.h | 4 +-
kernel/sysctl.c | 7 +
net/unix/af_unix.c | 2 +-
13 files changed, 484 insertions(+), 302 deletions(-)
--
1.7.11.7
next reply other threads:[~2012-10-27 12:33 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-27 12:33 Jeff Layton [this message]
2012-10-27 12:33 ` [PATCH v8 01/32] vfs: add a retry_estale helper function to handle retries on ESTALE Jeff Layton
2012-10-27 12:33 ` [PATCH v8 02/32] vfs: make fstatat retry on ESTALE errors from getattr call Jeff Layton
2012-10-27 12:33 ` [PATCH v8 03/32] vfs: fix readlinkat to retry on ESTALE Jeff Layton
2012-10-27 12:33 ` [PATCH v8 04/32] vfs: add new "reval" argument to kern_path_create and user_path_create Jeff Layton
2012-10-27 12:33 ` [PATCH v8 05/32] vfs: fix mknodat to retry on ESTALE errors Jeff Layton
[not found] ` <1351341219-17837-1-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-10-27 12:33 ` [PATCH v8 06/32] vfs: fix mkdir " Jeff Layton
2012-10-27 12:33 ` [PATCH v8 10/32] vfs: make rmdir " Jeff Layton
2012-10-27 12:33 ` [PATCH v8 16/32] vfs: make chroot retry once on ESTALE error Jeff Layton
2012-10-27 12:33 ` [PATCH v8 21/32] vfs: allow setxattr to retry once on ESTALE errors Jeff Layton
2012-10-27 12:33 ` [PATCH v8 22/32] vfs: allow lsetxattr() " Jeff Layton
2012-10-27 12:33 ` [PATCH v8 32/32] vfs: make number of ESTALE retries tunable Jeff Layton
2012-10-27 12:33 ` [PATCH v8 07/32] vfs: fix symlinkat to retry on ESTALE errors Jeff Layton
2012-10-27 12:33 ` [PATCH v8 08/32] vfs: fix linkat " Jeff Layton
2012-10-27 12:33 ` [PATCH v8 09/32] vfs: add a reval argument to user_path_parent Jeff Layton
2012-10-27 12:33 ` [PATCH v8 11/32] vfs: make do_unlinkat retry on ESTALE errors Jeff Layton
[not found] ` <1351341219-17837-12-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-10-30 16:14 ` J. Bruce Fields
[not found] ` <20121030161429.GD24618-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
2012-10-30 16:33 ` Jeff Layton
[not found] ` <20121030123355.5c404373-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2012-10-30 19:28 ` J. Bruce Fields
[not found] ` <20121030192809.GE24618-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
2012-10-30 19:45 ` Jeff Layton
2012-10-27 12:33 ` [PATCH v8 12/32] vfs: fix renameat to " Jeff Layton
2012-10-27 12:33 ` [PATCH v8 13/32] vfs: have do_sys_truncate retry once on an ESTALE error Jeff Layton
2012-10-27 12:33 ` [PATCH v8 14/32] vfs: have faccessat " Jeff Layton
2012-10-27 12:33 ` [PATCH v8 15/32] vfs: have chdir retry lookup and call once on " Jeff Layton
2012-10-27 12:33 ` [PATCH v8 17/32] vfs: make fchmodat retry once on ESTALE errors Jeff Layton
2012-10-27 12:33 ` [PATCH v8 18/32] vfs: make fchownat " Jeff Layton
2012-10-27 12:33 ` [PATCH v8 19/32] vfs: fix user_statfs to " Jeff Layton
2012-10-27 12:33 ` [PATCH v8 20/32] vfs: allow utimensat() calls to retry once on an ESTALE error Jeff Layton
2012-10-27 12:33 ` [PATCH v8 23/32] vfs: make getxattr " Jeff Layton
2012-10-27 12:33 ` [PATCH v8 24/32] vfs: make lgetxattr retry once on ESTALE Jeff Layton
2012-10-27 12:33 ` [PATCH v8 25/32] vfs: make listxattr retry once on ESTALE error Jeff Layton
2012-10-27 12:33 ` [PATCH v8 26/32] vfs: make llistxattr " Jeff Layton
2012-10-27 12:33 ` [PATCH v8 27/32] vfs: make removexattr retry once on ESTALE Jeff Layton
2012-10-27 12:33 ` [PATCH v8 28/32] vfs: make lremovexattr retry once on ESTALE error Jeff Layton
2012-10-27 12:33 ` [PATCH v8 29/32] vfs: convert do_filp_open to use retry_estale helper Jeff Layton
2012-10-27 12:33 ` [PATCH v8 30/32] vfs: convert do_file_open_root " Jeff Layton
2012-10-27 12:33 ` [PATCH v8 31/32] vfs: convert filename_lookup " Jeff Layton
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=1351341219-17837-1-git-send-email-jlayton@redhat.com \
--to=jlayton@redhat.com \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=michael.brantley@deshaw.com \
--cc=miklos@szeredi.hu \
--cc=pstaubach@exagrid.com \
--cc=viro@zeniv.linux.org.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).