• Tom Tucker's avatar
    knfsd: Support adding transports by writing portlist file · a217813f
    Tom Tucker authored
    Update the write handler for the portlist file to allow creating new
    listening endpoints on a transport. The general form of the string is:
    
    <transport_name><space><port number>
    
    For example:
    
    echo "tcp 2049" > /proc/fs/nfsd/portlist
    
    This is intended to support the creation of a listening endpoint for
    RDMA transports without adding #ifdef code to the nfssvc.c file.
    
    Transports can also be removed as follows:
    
    '-'<transport_name><space><port number>
    
    For example:
    
    echo "-tcp 2049" > /proc/fs/nfsd/portlist
    
    Attempting to add a listener with an invalid transport string results
    in EPROTONOSUPPORT and a perror string of "Protocol not supported".
    
    Attempting to remove an non-existent listener (.e.g. bad proto or port)
    results in ENOTCONN and a perror string of
    "Transport endpoint is not connected"
    Signed-off-by: default avatarTom Tucker <tom@opengridcomputing.com>
    Acked-by: default avatarNeil Brown <neilb@suse.de>
    Reviewed-by: default avatarChuck Lever <chuck.lever@oracle.com>
    Reviewed-by: default avatarGreg Banks <gnb@sgi.com>
    Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
    a217813f
svc.c 13.7 KB