nfs4: v4 mounts should not need rpcbind running
Subsystems (2)
PATCH 1/1 nfs4: v4 mounts should not need rpcbind running
When RPC services are created with svc_create() an svc_unregister() is done to remove any stale registrations.
This unregister is not needed with the v4 callback service and will cause the mount to hang if rpcbind is not running.
This patch makes the nfs4 callback service a hide service by setting the vs_hidden flag in the nfs4_callback_version4 structure
--- fs/nfs/callback_xdr.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
fs/nfs/callback_xdr.c +1 -0
@@ -996,4 +996,5 @@ struct svc_version nfs4_callback_version4 = { .vs_proc = nfs4_callback_procedures1, .vs_xdrsize = NFS4_CALLBACK_XDRSIZE, .vs_dispatch = NULL, + .vs_hidden = 1, };
Signature · 1 line
1.7.4.4
Hey-
Quoted 6 lines · Steve Dickson
When RPC services are created with
svc_create()ansvc_unregister()is done to remove any stale registrations.This unregister is not needed with the v4 callback service and will cause the mount to hang if rpcbind is not running.
This should no longer be the case. The kernel uses connected transports to contact rpcbind these days, and should be able to tell immediately that there is no rpcbind running. If there is still a hang, something else is wrong.
Quoted 3 lines
This patch makes the nfs4 callback service a hide service by setting the
vs_hiddenflag in thenfs4_callback_version4structure
One reason to continue to do this is to have some assurance that no-one else takes the same RPC program number. Not a big deal.
Quoted 15 lines
Signed-off-by Steve Dickson <[email protected]>---
fs/nfs/callback_xdr.c| 1 +1 files changed, 1 insertions(+), 0 deletions(-)fs/nfs/callback_xdr.c +1
-0@@ -996,4 +996,5 @@ struct svc_version nfs4_callback_version4 = { .vs_proc = nfs4_callback_procedures1, .vs_xdrsize = NFS4_CALLBACK_XDRSIZE, .vs_dispatch = NULL, + .vs_hidden = 1, };
Signature · 2 lines
Chuck Lever chuck[dot]lever[at]oracle[dot]com
Quoted 4 lines · Chuck Lever
Hey-
On Jun 3, 2011, at 10:11 AM, Steve Dickson wrote:
Quoted 8 lines
Quoted 6 lines
When RPC services are created with
svc_create()ansvc_unregister()is done to remove any stale registrations.This unregister is not needed with the v4 callback service and will cause the mount to hang if rpcbind is not running.
This should no longer be the case. The kernel uses connected transports to contact rpcbind these days, and should be able to tell immediately that there is no rpcbind running. If there is still a hang, something else is wrong.
Ok... The hang was just an theory... I didn't test it out... but I do know for a fact that when a v4 mount is done, a PMAP_UNSET is set to rpcbind which obviously is not needed.
Quoted 6 lines
Quoted 4 lines
This patch makes the nfs4 callback service a hide service by setting the
vs_hiddenflag in thenfs4_callback_version4structureOne reason to continue to do this is to have some assurance that no-one else takes the same RPC program number. Not a big deal.
Personally I think its a waste of cycles especially when a large number of mounts are happening at once... Its completely overkill IMHO...
steved.
Quoted 17 lines
Quoted 16 lines
Signed-off-by Steve Dickson <[email protected]>---
fs/nfs/callback_xdr.c| 1 +1 files changed, 1 insertions(+), 0 deletions(-)fs/nfs/callback_xdr.c +1
-0@@ -996,4 +996,5 @@ struct svc_version nfs4_callback_version4 = { .vs_proc = nfs4_callback_procedures1, .vs_xdrsize = NFS4_CALLBACK_XDRSIZE, .vs_dispatch = NULL, + .vs_hidden = 1, };
Quoted 5 lines · Steve Dickson
Quoted 4 lines · Chuck Lever
Hey-
On Jun 3, 2011, at 10:11 AM, Steve Dickson wrote:
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
This patch makes the nfs4 callback service a hide service by setting the
vs_hiddenflag in thenfs4_callback_version4structureOne reason to continue to do this is to have some assurance that no-one else takes the same RPC program number. Not a big deal.
Personally I think its a waste of cycles especially when a large number of mounts are happening at once... Its completely overkill IMHO...
Agreed, and I'm not objecting to this specific change. The above was just a generic observation.
My overall concern, though, was that we might still be hanging at mount or umount time if rpcbind was absent.
Signature · 2 lines
Chuck Lever chuck[dot]lever[at]oracle[dot]com