1. 31 7月, 2012 1 次提交
  2. 23 5月, 2012 1 次提交
    • C
      NFS: Always use the same SETCLIENTID boot verifier · f092075d
      Chuck Lever 提交于
      Currently our NFS client assigns a unique SETCLIENTID boot verifier
      for each server IP address it knows about.  It's set to CURRENT_TIME
      when the struct nfs_client for that server IP is created.
      
      During the SETCLIENTID operation, our client also presents an
      nfs_client_id4 string to servers, as an identifier on which the server
      can hang all of this client's NFSv4 state.  Our client's
      nfs_client_id4 string is unique for each server IP address.
      
      An NFSv4 server is obligated to wipe all NFSv4 state associated with
      an nfs_client_id4 string when the client presents the same
      nfs_client_id4 string along with a changed SETCLIENTID boot verifier.
      
      When our client unmounts the last of a server's shares, it destroys
      that server's struct nfs_client.  The next time the client mounts that
      NFS server, it creates a fresh struct nfs_client with a fresh boot
      verifier.  On seeing the fresh verifer, the server wipes any previous
      NFSv4 state associated with that nfs_client_id4.
      
      However, NFSv4.1 clients are supposed to present the same
      nfs_client_id4 string to all servers.  And, to support Transparent
      State Migration, the same nfs_client_id4 string should be presented
      to all NFSv4.0 servers so they recognize that migrated state for this
      client belongs with state a server may already have for this client.
      (This is known as the Uniform Client String model).
      
      If the nfs_client_id4 string is the same but the boot verifier changes
      for each server IP address, SETCLIENTID and EXCHANGE_ID operations
      from such a client could unintentionally result in a server wiping a
      client's previously obtained lease.
      
      Thus, if our NFS client is going to use a fixed nfs_client_id4 string,
      either for NFSv4.0 or NFSv4.1 mounts, our NFS client should use a
      boot verifier that does not change depending on server IP address.
      Replace our current per-nfs_client boot verifier with a per-nfs_net
      boot verifier.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      f092075d
  3. 11 3月, 2012 2 次提交
  4. 07 2月, 2012 4 次提交
    • S
      NFS: make nfs_client_lock per net ns · dc030858
      Stanislav Kinsbursky 提交于
      This patch makes nfs_clients_lock allocated per network namespace. All items it
      protects are already network namespace aware.
      Signed-off-by: NStanislav Kinsbursky <skinsbursky@parallels.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      dc030858
    • S
      NFS: make cb_ident_idr per net ns · 28cd1b3f
      Stanislav Kinsbursky 提交于
      This patch makes ID's infrastructure network namespace aware. This was done
      mainly because of nfs_client_lock, which is desired to be per network
      namespace, but protects NFS clients ID's.
      
      NOTE: NFS client's net pointer have to be set prior to ID initialization,
      proper assignment was moved.
      Signed-off-by: NStanislav Kinsbursky <skinsbursky@parallels.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      28cd1b3f
    • 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
  5. 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