1. 01 6月, 2012 2 次提交
  2. 26 4月, 2012 1 次提交
  3. 12 4月, 2012 20 次提交
  4. 29 3月, 2012 2 次提交
  5. 28 3月, 2012 2 次提交
  6. 26 3月, 2012 7 次提交
    • J
      nfsd4: allow numeric idmapping · e9541ce8
      J. Bruce Fields 提交于
      Mimic the client side by providing a module parameter that turns off
      idmapping in the auth_sys case, for backwards compatibility with NFSv2
      and NFSv3.
      
      Unlike in the client case, we don't have any way to negotiate, since the
      client can return an error to us if it doesn't like the id that we
      return to it in (for example) a getattr call.
      
      However, it has always been possible for servers to return numeric id's,
      and as far as we're aware clients have always been able to handle them.
      
      Also, in the auth_sys case clients already need to have numeric id's the
      same between client and server.
      
      Therefore we believe it's safe to default this to on; but the module
      parameter is available to return to previous behavior if this proves to
      be a problem in some unexpected setup.
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      e9541ce8
    • J
      nfsd: don't allow legacy client tracker init for anything but init_net · cc27e0d4
      Jeff Layton 提交于
      This code isn't set up for containers, so don't allow it to be
      used for anything but init_net.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      cc27e0d4
    • J
      nfsd: add notifier to handle mount/unmount of rpc_pipefs sb · 813fd320
      Jeff Layton 提交于
      In the event that rpc_pipefs isn't mounted when nfsd starts, we
      must register a notifier to handle creating the dentry once it
      is mounted, and to remove the dentry on unmount.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      813fd320
    • J
      nfsd: add the infrastructure to handle the cld upcall · f3f80148
      Jeff Layton 提交于
      ...and add a mechanism for switching between the "legacy" tracker and
      the new one. The decision is made by looking to see whether the
      v4recoverydir exists. If it does, then the legacy client tracker is
      used.
      
      If it's not, then the kernel will create a "cld" pipe in rpc_pipefs.
      That pipe is used to talk to a daemon for handling the upcall.
      
      Most of the data structures for the new client tracker are handled on a
      per-namespace basis, so this upcall should be essentially ready for
      containerization. For now however, nfsd just starts it by calling the
      initialization and exit functions for init_net.
      
      I'm making the assumption that at some point in the future we'll be able
      to determine the net namespace from the nfs4_client. Until then, this
      patch hardcodes init_net in those places. I've sprinkled some "FIXME"
      comments around that code to attempt to make it clear where we'll need
      to fix that up later.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      f3f80148
    • J
      nfsd: add a per-net-namespace struct for nfsd · 7ea34ac1
      Jeff Layton 提交于
      Eventually, we'll need this when nfsd gets containerized fully. For
      now, create a struct on a per-net-namespace basis that will just hold
      a pointer to the cld_net structure. That struct will hold all of the
      per-net data that we need for the cld tracker.
      
      Eventually we can add other pernet objects to struct nfsd_net.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      7ea34ac1
    • J
      nfsd: add nfsd4_client_tracking_ops struct and a way to set it · 2a4317c5
      Jeff Layton 提交于
      Abstract out the mechanism that we use to track clients into a set of
      client name tracking functions.
      
      This gives us a mechanism to plug in a new set of client tracking
      functions without disturbing the callers. It also gives us a way to
      decide on what tracking scheme to use at runtime.
      
      For now, this just looks like pointless abstraction, but later we'll
      add a new alternate scheme for tracking clients on stable storage.
      
      Note too that this patch anticipates the eventual containerization
      of this code by passing in struct net pointers in places. No attempt
      is made to containerize the legacy client tracker however.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      2a4317c5
    • J
      nfsd: convert nfs4_client->cl_cb_flags to a generic flags field · a52d726b
      Jeff Layton 提交于
      We'll need a way to flag the nfs4_client as already being recorded on
      stable storage so that we don't continually upcall. Currently, that's
      recorded in the cl_firststate field of the client struct. Using an
      entire u32 to store a flag is rather wasteful though.
      
      The cl_cb_flags field is only using 2 bits right now, so repurpose that
      to a generic flags field. Rename NFSD4_CLIENT_KILL to
      NFSD4_CLIENT_CB_KILL to make it evident that it's part of the callback
      flags. Add a mask that we can use for existing checks that look to see
      whether any flags are set, so that the new flags don't interfere.
      
      Convert all references to cl_firstate to the NFSD4_CLIENT_STABLE flag,
      and add a new NFSD4_CLIENT_RECLAIM_COMPLETE flag.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      a52d726b
  7. 21 3月, 2012 4 次提交
  8. 19 3月, 2012 2 次提交