• J
    NFS: convert proto= option to use netids rather than a protoname · ee671b01
    Jeff Layton 提交于
    Solaris uses netids as values for the proto= option, so that when
    someone specifies "tcp6" they get traffic over TCP + IPv6. Until
    recently, this has never really been an issue for Linux since it didn't
    support NFS over IPv6. The netid and the protocol name were generally
    always the same (modulo any strange configuration in /etc/netconfig).
    
    The solaris manpage documents their proto= option as:
    
        proto= _netid_ | rdma
    
    This patch is intended to bring Linux closer to how the Solaris proto=
    option works, by declaring a static netid mapping in the kernel and
    converting the proto= and mountproto= options to follow it and display
    the proper values in /proc/mounts.
    
    Much of this functionality will need to be provided by a userspace
    mount.nfs patch. Chuck Lever has a patch to change mount.nfs in
    the same way. In principle, we could do *all* of this in userspace but
    that would mean that the options in /proc/mounts may not match the
    options used by userspace.
    
    The alternative to the static mapping here is to add a mechanism to
    upcall to userspace for netid's. I'm not opposed to that option, but
    it'll probably mean more overhead (and quite a bit more code). Rather
    than shoot for that at first, I figured it was probably better to
    start simply.
    
    Comments welcome.
    Signed-off-by: NJeff Layton <jlayton@redhat.com>
    Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
    ee671b01
super.c 73.7 KB