1. 07 2月, 2012 2 次提交
    • S
      NFS: make nfs_volume_list per net ns · c25d32b2
      Stanislav Kinsbursky 提交于
      This patch splits global list of NFS servers into per-net-ns array of lists.
      This looks more strict and clearer.
      BTW, this patch also makes "/proc/fs/nfsfs/volumes" 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: NStanislav Kinsbursky <skinsbursky@parallels.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      c25d32b2
    • S
      NFS: make nfs_client_list per net ns · 6b13168b
      Stanislav Kinsbursky 提交于
      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: NStanislav Kinsbursky <skinsbursky@parallels.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      6b13168b
  2. 01 2月, 2012 2 次提交
    • S
      NFS: blocklayout pipe creation per network namespace context introduced · 9e2e74db
      Stanislav Kinsbursky 提交于
      This patch implements blocklayout pipe creation and registration per each
      existent network namespace.
      This was achived by registering NFS per-net operations, responsible for
      blocklayout pipe allocation/register and unregister/destruction instead of
      initialization and destruction of static "bl_device_pipe" pipe (this one was
      removed).
      Note, than pointer to network blocklayout pipe is stored in per-net "nfs_net"
      structure, because allocating of one more per-net structure for blocklayout
      module looks redundant.
      This patch also changes dev_remove() function prototype (and all it's callers,
      where it' requied) by adding network namespace pointer parameter, which is used
      to discover proper blocklayout pipe for rpc_queue_upcall() call.
      Signed-off-by: NStanislav Kinsbursky <skinsbursky@parallels.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      9e2e74db
    • S
      NFS: DNS resolver cache per network namespace context introduced · 1b340d01
      Stanislav Kinsbursky 提交于
      This patch implements DNS resolver cache creation and registration for each
      alive network namespace context.
      This was done by registering NFS per-net operations, responsible for DNS cache
      allocation/register and unregister/destructioning instead of initialization and
      destruction of static "nfs_dns_resolve" cache detail (this one was removed).
      Pointer to network dns resolver cache is stored in new per-net "nfs_net"
      structure.
      This patch also changes nfs_dns_resolve_name() function prototype (and it's
      calls) by adding network pointer parameter, which is used to get proper DNS
      resolver cache pointer for do_cache_lookup_wait() call.
      
      Note: empty nfs_dns_resolver_init() and nfs_dns_resolver_destroy() functions
      will be used in next patch in the series.
      Signed-off-by: NStanislav Kinsbursky <skinsbursky@parallels.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      1b340d01