• Stanislav Kinsbursky's avatar
    NFS: make nfs_client_list per net ns · 6b13168b
    Stanislav Kinsbursky authored
    This patch splits global list of NFS clients into per-net-ns array of lists.
    This looks more strict and clearer.
    BTW, this patch also makes "/proc/fs/nfsfs/servers" entry content depends on
    /proc mount owner pid namespace. See below for details.
    
    NOTE: few words about how was /proc/fs/nfsfs/ entries content show per network
    namespace done. This is a little bit tricky and not the best is could be. But
    it's cheap (proper fix for /proc conteinerization is a hard nut to crack).
    The idea is simple: take proper network namespace from pid namespace
    child reaper nsproxy of /proc/ mount creator.
    This actually means, that if there are 2 containers with different net
    namespace sharing pid namespace, then read of /proc/fs/nfsfs/ entries will
    always return content, taken from net namespace of pid namespace creator task
    (and thus second namespace set wil be unvisible).
    Signed-off-by: default avatarStanislav Kinsbursky <skinsbursky@parallels.com>
    Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
    6b13168b
internal.h 12.9 KB