1. 18 5月, 2016 6 次提交
  2. 09 5月, 2016 4 次提交
    • J
      nfs: have flexfiles mirror keep creds for both ro and rw layouts · 3064b686
      Jeff Layton 提交于
      A mirror can be shared between multiple layouts, even with different
      iomodes. That makes stats gathering simpler, but it causes a problem
      when we get different creds in READ vs. RW layouts.
      
      The current code drops the newer credentials onto the floor when this
      occurs. That's problematic when you fetch a READ layout first, and then
      a RW. If the READ layout doesn't have the correct creds to do a write,
      then writes will fail.
      
      We could just overwrite the READ credentials with the RW ones, but that
      would break the ability for the server to fence the layout for reads if
      things go awry. We need to be able to revert to the earlier READ creds
      if the RW layout is returned afterward.
      
      The simplest fix is to just keep two sets of creds per mirror. One for
      READ layouts and one for RW, and then use the appropriate set depending
      on the iomode of the layout segment.
      
      Also fix up some RCU nits that sparse found.
      Signed-off-by: NJeff Layton <jeff.layton@primarydata.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      3064b686
    • J
      nfs: get a reference to the credential in ff_layout_alloc_lseg · 90a0be00
      Jeff Layton 提交于
      We're just as likely to have allocation problems here as we would if we
      delay looking up the credential like we currently do. Fix the code to
      get a rpc_cred reference early, as soon as the mirror is set up.
      
      This allows us to eliminate the mirror early if there is a problem
      getting an rpc credential. This also allows us to drop the uid/gid
      from the layout_mirror struct as well.
      
      In the event that we find an existing mirror where this one would go, we
      swap in the new creds unconditionally, and drop the reference to the old
      one.
      
      Note that the old ff_layout_update_mirror_cred function wouldn't set
      this pointer unless the DS version was 3, but we don't know what the DS
      version is at this point. I'm a little unclear on why it did that as you
      still need creds to talk to v4 servers as well. I have the code set
      it regardless of the DS version here.
      
      Also note the change to using generic creds instead of calling
      lookup_cred directly. With that change, we also need to populate the
      group_info pointer in the acred as some functions expect that to never
      be NULL. Instead of allocating one every time however, we can allocate
      one when the module is loaded and share it since the group_info is
      refcounted.
      Signed-off-by: NJeff Layton <jeff.layton@primarydata.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      90a0be00
    • J
      nfs: have ff_layout_get_ds_cred take a reference to the cred · 57f3f4c0
      Jeff Layton 提交于
      In later patches, we're going to want to allow the creds to be updated
      when we get a new layout with updated creds. Have this function take
      a reference to the cred that is later put once the call has been
      dispatched.
      
      Also, prepare for this change by ensuring we follow RCU rules when
      getting a reference to the cred as well.
      Signed-off-by: NJeff Layton <jeff.layton@primarydata.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      57f3f4c0
    • D
      NFS: Save struct inode * inside nfs_commit_info to clarify usage of i_lock · fe238e60
      Dave Wysochanski 提交于
      Commit ea2cf228 created nfs_commit_info and saved &inode->i_lock inside
      this NFS specific structure.  This obscures the usage of i_lock.
      Instead, save struct inode * so later it's clear the spinlock taken is
      i_lock.
      
      Should be no functional change.
      Signed-off-by: NDave Wysochanski <dwysocha@redhat.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      fe238e60
  3. 28 1月, 2016 1 次提交
  4. 23 1月, 2016 1 次提交
  5. 01 1月, 2016 1 次提交
  6. 30 12月, 2015 1 次提交
  7. 29 12月, 2015 8 次提交
  8. 03 11月, 2015 2 次提交
    • T
      pNFS/flexfiles: Add support for FF_FLAGS_NO_IO_THRU_MDS · 260074cd
      Trond Myklebust 提交于
      For loosely coupled pNFS/flexfiles systems, there is often no advantage
      at all in going through the MDS for I/O, since the MDS is subject to
      the same limitations as all other clients when talking to DSes. If a
      DS is unresponsive, I/O through the MDS will fail.
      
      For such systems, the only scalable solution is to have the pNFS clients
      retry doing pNFS, and so the protocol now provides a flag that allows
      the pNFS server to signal this.
      
      If LAYOUTGET returns FF_FLAGS_NO_IO_THRU_MDS, then we should assume that
      the MDS wants the client to retry using these devices, even if they were
      previously marked as being unavailable. To do so, we add a helper,
      ff_layout_mark_devices_valid() that will be called from layoutget.
      Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
      260074cd
    • T
      pNFS/flexfiles: When mirrored, retry failed reads by switching mirrors · 13544412
      Trond Myklebust 提交于
      If the pNFS/flexfiles file is mirrored, and a read to one mirror fails,
      then we should bump the mirror index, so that we retry to a different
      mirror. Once we've iterated through all mirrors and all failed, we can
      return the layout and issue a new LAYOUTGET.
      Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
      13544412
  9. 03 9月, 2015 2 次提交
  10. 02 9月, 2015 1 次提交
  11. 31 8月, 2015 1 次提交
  12. 26 8月, 2015 7 次提交
  13. 21 8月, 2015 2 次提交
  14. 20 8月, 2015 1 次提交
  15. 18 8月, 2015 1 次提交
  16. 13 8月, 2015 1 次提交