linux/fs/nfsd
NeilBrown 599eb3046a knfsd: nfsd: Handle ERESTARTSYS from syscalls.
OCFS2 can return -ERESTARTSYS from write requests (and possibly
elsewhere) if there is a signal pending.

If nfsd is shutdown (by sending a signal to each thread) while there
is still an IO load from the client, each thread could handle one last
request with a signal pending.  This can result in -ERESTARTSYS
which is not understood by nfserrno() and so is reflected back to
the client as nfserr_io aka -EIO.  This is wrong.

Instead, interpret ERESTARTSYS to mean "try again later" by returning
nfserr_jukebox.  The client will resend and - if the server is
restarted - the write will (hopefully) be successful and everyone will
be happy.

 The symptom that I narrowed down to this was:
    copy a large file via NFS to an OCFS2 filesystem, and restart
    the nfs server during the copy.
    The 'cp' might get an -EIO, and the file will be corrupted -
    presumably holes in the middle where writes appeared to fail.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2008-06-23 13:02:50 -04:00
..
auth.c nfsd: fix sparse warnings 2008-04-23 16:13:39 -04:00
auth.h nfsd: minor fs/nfsd/auth.h cleanup 2008-02-01 16:42:05 -05:00
export.c IPv6 support for NFS server export caches 2008-04-23 16:13:36 -04:00
lockd.c knfsd: lockd: nfsd4: use same grace period for lockd and nfsd4 2007-07-17 10:23:07 -07:00
Makefile knfsd: trivial makefile cleanup 2007-05-09 12:30:54 -07:00
nfs2acl.c nfsd: Fix inconsistent assignment 2008-02-01 16:42:01 -05:00
nfs3acl.c knfsd: fix spurious EINVAL errors on first access of new filesystem 2007-11-12 14:28:08 -08:00
nfs3proc.c Use struct path in struct svc_export 2008-02-14 21:17:08 -08:00
nfs3xdr.c Use struct path in struct svc_export 2008-02-14 21:17:08 -08:00
nfs4acl.c knfsd: nfsd4: fix handling of acl errrors 2007-07-17 10:23:07 -07:00
nfs4callback.c fs: replace remaining __FUNCTION__ occurrences 2008-04-30 08:29:54 -07:00
nfs4idmap.c nfsd: fix sparse warnings 2008-04-23 16:13:39 -04:00
nfs4proc.c nfsd: add dprintk of compound return 2008-06-23 13:02:48 -04:00
nfs4recover.c [PATCH] r/o bind mounts: get callers of vfs_mknod/create/mkdir() 2008-04-19 00:25:34 -04:00
nfs4state.c knfsd: clean up nfsd filesystem interfaces 2008-06-23 13:02:49 -04:00
nfs4xdr.c nfsd: make nfs4xdr WRITEMEM safe against zero count 2008-06-23 13:02:48 -04:00
nfscache.c nfsd: fail module init on reply cache init failure 2008-02-01 16:42:04 -05:00
nfsctl.c knfsd: clean up nfsd filesystem interfaces 2008-06-23 13:02:49 -04:00
nfsfh.c nfsd: move most of fh_verify to separate function 2008-04-23 16:13:41 -04:00
nfsproc.c knfsd: nfsd: Handle ERESTARTSYS from syscalls. 2008-06-23 13:02:50 -04:00
nfssvc.c nfsd: fix race in nfsd_nrthreads() 2008-06-23 13:02:50 -04:00
nfsxdr.c Use struct path in struct svc_export 2008-02-14 21:17:08 -08:00
stats.c [PATCH] knfsd: nfsd4: add per-operation server stats 2006-07-10 13:24:27 -07:00
vfs.c knfsd: clear both setuid and setgid whenever a chown is done 2008-04-23 16:13:43 -04:00