Skip to content

Address kernel bugzilla 12256

Chuck Lever linux-nfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 17 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7lockd: Use AF_INET6 listener only when IPv6 support is built infs/lockd/svc.c+6 -515 replies
2/7SUNRPC: Use IPv4 loopback for registering AF_INET6 kernel RPC servicesnet/sunrpc/rpcb_clnt.c+6 -170 replies
3/7SUNRPC: Don't return EPROTONOSUPPORT in svc_register()'s helpersnet/sunrpc/svc.c+2 -20 replies
4/7SUNRPC: Simplify svc_unregister()net/sunrpc/svc.c+4 -220 replies
5/7SUNRPC: Simplify kernel RPC service registrationnet/sunrpc/svc.c+24 -260 replies
6/7SUNRPC: rpcb_register() should handle errors silentlynet/sunrpc/rpcb_clnt.c net/sunrpc/svc.c+16 -80 replies
7/7SUNRPC: Remove CONFIG_SUNRPC_REGISTER_V4fs/lockd/svc.c net/sunrpc/Kconfig+3 -250 replies

Reviews trailers per patch

None of the 7 patches has a Reviewed-by or Acked-by.

PatchSteve Dickson
1/7T-b
2/7
3/7
4/7
5/7
6/7
7/7

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/7] Address kernel bugzilla 12256

Hi Bruce-

Updated patch series to remove the SUNRPC_REGISTER_V4 kernel build option. These address kernel bugzilla 12256 ("RPC: failed to contact local rpcbind server (errno 5)." if CONFIG_SUNRPC_REGISTER_V4 is set to Y"). Please include them in your for-2.6.30 branch, replacing any previous version of this patch series.

There may be some problems applying this patch set to linux-next, as that may have recent patches that split up fs/Kconfig.

Steve Dickson also reports this related problem:

------ cut here ------

On a 2.6.29 kernel that has IPv6 turned off by

1) adding 'blacklist ipv6' to /etc/modprobe.d/blacklist
2) Adding NETWORKING_IPV6=no to /etc/sysconfig/network (note: not clear how much of this is effective since it's unknown if Network Manager even looks at this stuff)

When an ordinary v3 mount is tried:

mount -v server:/music /mnt/music

It fails in the following way:

mount.nfs: timeout set for Fri Jan 23 07:22:16 2009 mount.nfs: text-based options: 'addr=10.16.43.237' mount.nfs: mount(2): Address family not supported by protocol mount.nfs: Address family not supported by protocol

With the following being logged to /var/log/messages:

Jan 23 07:20:16 localhost kernel: RPC: failed to contact local rpcbind

server (errno 5).

------ cut here ------

When CONFIG_SUNRPC_REGISTER_V4 is removed, this exposes a second problem, addressed by "lockd: Use AF_INET6 listener only when IPv6 support is built in." It turns out that some Linux networking infrastructure simply doesn't support IPv6, so it is a popular workaround to blacklist the ipv6 module in a distribution-built kernel.

Unfortunately, if the module is blacklisted but was built during the kernel build, lockd still attempts to create an AF_INET6 listener, even for IPv4 mounts, and fails.

For now, we'll work around the problem by changing lockd to create AF_INET6 listeners only if IPv6 support is built into the kernel, and pursue a long-term fix in the mean time.

---

Chuck Lever (7):
SUNRPC: Remove CONFIG_SUNRPC_REGISTER_V4
SUNRPC: rpcb_register() should handle errors silently
SUNRPC: Simplify kernel RPC service registration
SUNRPC: Simplify svc_unregister()
SUNRPC: Don't return EPROTONOSUPPORT in svc_register()'s helpers
SUNRPC: Use IPv4 loopback for registering AF_INET6 kernel RPC services
lockd: Use AF_INET6 listener only when IPv6 support is built in

 fs/lockd/svc.c         |   11 +++--
 net/sunrpc/Kconfig     |   22 ----------
 net/sunrpc/rpcb_clnt.c |   25 +++---------
 net/sunrpc/svc.c       |  102 +++++++++++++++++++++---------------------------
 4 files changed, 58 insertions(+), 102 deletions(-)
Signature · 1 line
Chuck Lever