From 096abd77038a2ff74efd194d074eadcde80fb97d Mon Sep 17 00:00:00 2001 From: James Lentini Date: Thu, 8 Jan 2009 13:13:26 -0500 Subject: update port number in NFS/RDMA documentation Update the NFS/RDMA documentation to use the new port number assigned by IANA. Signed-off-by: James Lentini Signed-off-by: J. Bruce Fields diff --git a/Documentation/filesystems/nfs-rdma.txt b/Documentation/filesystems/nfs-rdma.txt index 44bd766..85eaead 100644 --- a/Documentation/filesystems/nfs-rdma.txt +++ b/Documentation/filesystems/nfs-rdma.txt @@ -251,7 +251,7 @@ NFS/RDMA Setup Instruct the server to listen on the RDMA transport: - $ echo rdma 2050 > /proc/fs/nfsd/portlist + $ echo rdma 20049 > /proc/fs/nfsd/portlist - On the client system @@ -263,7 +263,7 @@ NFS/RDMA Setup Regardless of how the client was built (module or built-in), use this command to mount the NFS/RDMA server: - $ mount -o rdma,port=2050 :/ /mnt + $ mount -o rdma,port=20049 :/ /mnt To verify that the mount is using RDMA, run "cat /proc/mounts" and check the "proto" field for the given mount. -- cgit v0.10.2 From ce0cf6622c9a6f18c2723ea4bef7616799a1ca39 Mon Sep 17 00:00:00 2001 From: "J. Bruce Fields" Date: Sun, 2 Nov 2008 16:18:08 -0500 Subject: nfs: note that CONFIG_SUNRPC_XPRT_RDMA turns on server side support too We forgot to update this when adding server-side support. Signed-off-by: J. Bruce Fields diff --git a/net/sunrpc/Kconfig b/net/sunrpc/Kconfig index eda4a7a..dcef600 100644 --- a/net/sunrpc/Kconfig +++ b/net/sunrpc/Kconfig @@ -9,9 +9,8 @@ config SUNRPC_XPRT_RDMA depends on SUNRPC && INFINIBAND && EXPERIMENTAL default SUNRPC && INFINIBAND help - This option enables an RPC client transport capability that - allows the NFS client to mount servers via an RDMA-enabled - transport. + This option allows the NFS client and server to support + an RDMA-enabled transport. To compile RPC client RDMA transport support as a module, choose M here: the module will be called xprtrdma. -- cgit v0.10.2 From bf935a78814cc9b96d09f612912178adc964ce9c Mon Sep 17 00:00:00 2001 From: "J. Bruce Fields" Date: Tue, 20 Jan 2009 19:32:59 -0500 Subject: nfsd: fix null dereference on error path We're forgetting to check the return value from groups_alloc(). Signed-off-by: J. Bruce Fields diff --git a/fs/nfsd/auth.c b/fs/nfsd/auth.c index c903e04..b860d34 100644 --- a/fs/nfsd/auth.c +++ b/fs/nfsd/auth.c @@ -49,6 +49,8 @@ int nfsd_setuser(struct svc_rqst *rqstp, struct svc_export *exp) new->fsuid = exp->ex_anon_uid; new->fsgid = exp->ex_anon_gid; gi = groups_alloc(0); + if (!gi) + goto oom; } else if (flags & NFSEXP_ROOTSQUASH) { if (!new->fsuid) new->fsuid = exp->ex_anon_uid; -- cgit v0.10.2 From b914152a6fbd2cd0441bc293ae8b3f3f1a9407b6 Mon Sep 17 00:00:00 2001 From: "J. Bruce Fields" Date: Tue, 20 Jan 2009 19:34:22 -0500 Subject: nfsd: fix cred leak on every rpc Since override_creds() took its own reference on new, we need to release our own reference. (Note the put_cred on the return value puts the *old* value of current->creds, not the new passed-in value). Signed-off-by: J. Bruce Fields diff --git a/fs/nfsd/auth.c b/fs/nfsd/auth.c index b860d34..5573508 100644 --- a/fs/nfsd/auth.c +++ b/fs/nfsd/auth.c @@ -87,6 +87,7 @@ int nfsd_setuser(struct svc_rqst *rqstp, struct svc_export *exp) new->cap_effective = cap_raise_nfsd_set(new->cap_effective, new->cap_permitted); put_cred(override_creds(new)); + put_cred(new); return 0; oom: -- cgit v0.10.2 From fa82a491275a613b15489aab4b99acecb00958d3 Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Thu, 22 Jan 2009 14:16:04 -0500 Subject: nfsd: only set file_lock.fl_lmops in nfsd4_lockt if a stateowner is found nfsd4_lockt does a search for a lockstateowner when building the lock struct to test. If one is found, it'll set fl_owner to it. Regardless of whether that happens, it'll also set fl_lmops. Given that this lock is basically a "lightweight" lock that's just used for checking conflicts, setting fl_lmops is probably not appropriate for it. This behavior exposed a bug in DLM's GETLK implementation where it wasn't clearing out the fields in the file_lock before filling in conflicting lock info. While we were able to fix this in DLM, it still seems pointless and dangerous to set the fl_lmops this way when we may have a NULL lockstateowner. Signed-off-by: Jeff Layton Signed-off-by: J. Bruce Fields diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 88db7d3..b6f60f4 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -2871,7 +2871,6 @@ nfsd4_lockt(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, file_lock.fl_owner = (fl_owner_t)lockt->lt_stateowner; file_lock.fl_pid = current->tgid; file_lock.fl_flags = FL_POSIX; - file_lock.fl_lmops = &nfsd_posix_mng_ops; file_lock.fl_start = lockt->lt_offset; file_lock.fl_end = last_byte_offset(lockt->lt_offset, lockt->lt_length); -- cgit v0.10.2