LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* nfsd fixes for 2.6.28
@ 2008-10-31 22:35 J. Bruce Fields
  0 siblings, 0 replies; 3+ messages in thread
From: J. Bruce Fields @ 2008-10-31 22:35 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, linux-nfs, Neil Brown, Chuck Lever

Please pull two small fixes for post-2.6.28 nfsd regressions from the
for-2.6.28 branch at

  git://linux-nfs.org/~bfields/linux.git for-2.6.28

--b.

Chuck Lever (1):
      NLM: Set address family before calling nlm_host_rebooted()

J. Bruce Fields (1):
      nfsd: fix failure to set eof in readdir in some situations

 fs/lockd/svc4proc.c |    1 +
 fs/lockd/svcproc.c  |    1 +
 fs/nfsd/vfs.c       |    1 +
 3 files changed, 3 insertions(+), 0 deletions(-)

commit d7dc61d0a70371b1c6557ea8ffbc60fff94c8168
Author: Chuck Lever <chuck.lever@ORACLE.COM>
Date:   Thu Oct 23 00:50:35 2008 -0400

    NLM: Set address family before calling nlm_host_rebooted()
    
    The nlm_host_rebooted() function uses nlm_cmp_addr() to find an
    nsm_handle that matches the rebooted peer.  In order for this to work,
    the passed-in address must have a proper address family.
    
    This fixes a post-2.6.28 regression introduced by commit 781b61a6, which
    added AF_INET6 support to nlm_cmp_addr().  Before that commit,
    nlm_cmp_addr() didn't care about the address family; it compared only
    the sin_addr.s_addr field for equality.
    
    Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
    Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>

diff --git a/fs/lockd/svc4proc.c b/fs/lockd/svc4proc.c
index 014f6ce..4dfdcbc 100644
--- a/fs/lockd/svc4proc.c
+++ b/fs/lockd/svc4proc.c
@@ -434,6 +434,7 @@ nlm4svc_proc_sm_notify(struct svc_rqst *rqstp, struct nlm_reboot *argp,
 	 * reclaim all locks we hold on this server.
 	 */
 	memset(&saddr, 0, sizeof(saddr));
+	saddr.sin_family = AF_INET;
 	saddr.sin_addr.s_addr = argp->addr;
 	nlm_host_rebooted(&saddr, argp->mon, argp->len, argp->state);
 
diff --git a/fs/lockd/svcproc.c b/fs/lockd/svcproc.c
index 548b0bb..3ca89e2 100644
--- a/fs/lockd/svcproc.c
+++ b/fs/lockd/svcproc.c
@@ -466,6 +466,7 @@ nlmsvc_proc_sm_notify(struct svc_rqst *rqstp, struct nlm_reboot *argp,
 	 * reclaim all locks we hold on this server.
 	 */
 	memset(&saddr, 0, sizeof(saddr));
+	saddr.sin_family = AF_INET;
 	saddr.sin_addr.s_addr = argp->addr;
 	nlm_host_rebooted(&saddr, argp->mon, argp->len, argp->state);
 

commit 8d7c4203c681a3ec359eccff4e53bc8c0ccf403b
Author: J. Bruce Fields <bfields@citi.umich.edu>
Date:   Thu Oct 30 13:48:33 2008 -0400

    nfsd: fix failure to set eof in readdir in some situations
    
    Before 14f7dd632011bb89c035722edd6ea0d90ca6b078 "[PATCH] Copy XFS
    readdir hack into nfsd code", readdir_cd->err was reset to eof before
    each call to vfs_readdir; afterwards, it is set only once.  Similarly,
    c002a6c7977320f95b5edede5ce4e0eeecf291ff "[PATCH] Optimise NFS readdir
    hack slightly", can cause us to exit without nfserr_eof set.  Fix this.
    
    This ensures the "eof" bit is set when needed in readdir replies.  (The
    particular case I saw was an nfsv4 readdir of an empty directory, which
    returned with no entries (the protocol requires "." and ".." to be
    filtered out), but with eof unset.)
    
    Cc: David Woodhouse <David.Woodhouse@intel.com>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>

diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index 0bc56f6..848a03e 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -1912,6 +1912,7 @@ static int nfsd_buffered_readdir(struct file *file, filldir_t func,
 			de = (struct buffered_dirent *)((char *)de + reclen);
 		}
 		offset = vfs_llseek(file, 0, SEEK_CUR);
+		cdp->err = nfserr_eof;
 		if (!buf.full)
 			break;
 	}

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

* nfsd fixes for 2.6.28
@ 2008-12-03 19:10 J. Bruce Fields
  0 siblings, 0 replies; 3+ messages in thread
From: J. Bruce Fields @ 2008-12-03 19:10 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-nfs, linux-kernel, Neil Brown

Please pull a few more small nfsd regression fixes for 2.6.28, from the
for-2.6.28 branch at:

  git://linux-nfs.org/~bfields/linux.git for-2.6.28

Thanks to Jeff Moyer, Matthew Dodd, and others for testing.

--b.

Chuck Lever (1):
      NLM: client-side nlm_lookup_host() should avoid matching on srcaddr

J. Bruce Fields (2):
      nfsd: clean up grace period on early exit
      nfsd: use of unitialized list head on error exit in nfs4recover.c

Tom Tucker (1):
      Add a reference to sunrpc in svc_addsock

 fs/lockd/host.c       |    3 ++-
 fs/lockd/svc.c        |    1 +
 fs/nfsd/nfs4recover.c |    2 +-
 fs/nfsd/nfs4state.c   |    1 +
 net/sunrpc/svcsock.c  |    9 +++++++--
 5 files changed, 12 insertions(+), 4 deletions(-)

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

* nfsd fixes for 2.6.28
@ 2008-10-22 21:41 J. Bruce Fields
  0 siblings, 0 replies; 3+ messages in thread
From: J. Bruce Fields @ 2008-10-22 21:41 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-nfs, linux-kernel, Neil Brown, Chuck Lever

The following nfsd fixes are available in the git repository at:

  git://linux-nfs.org/~bfields/linux.git for-2.6.28

The patch from Chuck is the important one, fixing a regression we just
introduced which could cause nfsd to crash on shutdown.

The rest just fixes two memory leask in error paths, with some very
minor associated cleanup.

--b.

Chuck Lever (1):
      NFSD: Fix BUG during NFSD shutdown processing

J. Bruce Fields (1):
      nfsd: clean up expkey_parse error cases

Krishna Kumar (2):
      nfsd: Fix memory leak in nfsd_getxattr
      nfsd: Drop reference in expkey_parse error cases

 fs/nfsd/export.c |   19 ++++++++++---------
 fs/nfsd/nfssvc.c |    4 ++++
 fs/nfsd/vfs.c    |    6 +++++-
 3 files changed, 19 insertions(+), 10 deletions(-)

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

end of thread, other threads:[~2008-12-03 19:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-31 22:35 nfsd fixes for 2.6.28 J. Bruce Fields
  -- strict thread matches above, loose matches on Subject: below --
2008-12-03 19:10 J. Bruce Fields
2008-10-22 21:41 J. Bruce Fields

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).