1. 18 5月, 2016 2 次提交
    • J
      pnfs: rework LAYOUTGET retry handling · 183d9e7b
      Jeff Layton 提交于
      There are several problems in the way a stateid is selected for a
      LAYOUTGET operation:
      
      We pick a stateid to use in the RPC prepare op, but that makes
      it difficult to serialize LAYOUTGETs that use the open stateid. That
      serialization is done in pnfs_update_layout, which occurs well before
      the rpc_prepare operation.
      
      Between those two events, the i_lock is dropped and reacquired.
      pnfs_update_layout can find that the list has lsegs in it and not do any
      serialization, but then later pnfs_choose_layoutget_stateid ends up
      choosing the open stateid.
      
      This patch changes the client to select the stateid to use in the
      LAYOUTGET earlier, when we're searching for a usable layout segment.
      This way we can do it all while holding the i_lock the first time, and
      ensure that we serialize any LAYOUTGET call that uses a non-layout
      stateid.
      
      This also means a rework of how LAYOUTGET replies are handled, as we
      must now get the latest stateid if we want to retransmit in response
      to a retryable error.
      
      Most of those errors boil down to the fact that the layout state has
      changed in some fashion. Thus, what we really want to do is to re-search
      for a layout when it fails with a retryable error, so that we can avoid
      reissuing the RPC at all if possible.
      
      While the LAYOUTGET RPC is async, the initiating thread always waits for
      it to complete, so it's effectively synchronous anyway. Currently, when
      we need to retry a LAYOUTGET because of an error, we drive that retry
      via the rpc state machine.
      
      This means that once the call has been submitted, it runs until it
      completes. So, we must move the error handling for this RPC out of the
      rpc_call_done operation and into the caller.
      
      In order to handle errors like NFS4ERR_DELAY properly, we must also
      pass a pointer to the sliding timeout, which is now moved to the stack
      in pnfs_update_layout.
      
      The complicating errors are -NFS4ERR_RECALLCONFLICT and
      -NFS4ERR_LAYOUTTRYLATER, as those involve a timeout after which we give
      up and return NULL back to the caller. So, there is some special
      handling for those errors to ensure that the layers driving the retries
      can handle that appropriately.
      Signed-off-by: NJeff Layton <jeff.layton@primarydata.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      183d9e7b
    • A
      NFS: Add COPY nfs operation · 2e72448b
      Anna Schumaker 提交于
      This adds the copy_range file_ops function pointer used by the
      sys_copy_range() function call.  This patch only implements sync copies,
      so if an async copy happens we decode the stateid and ignore it.
      Signed-off-by: NAnna Schumaker <bjschuma@netapp.com>
      2e72448b
  2. 09 5月, 2016 2 次提交
  3. 18 2月, 2016 1 次提交
    • K
      pnfs/blocklayout: fix a memeory leak when using,vmalloc_to_page · c8975706
      Kinglong Mee 提交于
      unreferenced object 0xffffc90000abf000 (size 16900):
        comm "fsync02", pid 15765, jiffies 4297431627 (age 423.772s)
        hex dump (first 32 bytes):
          00 00 00 00 00 00 00 00 00 a0 c2 19 00 88 ff ff  ................
          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
        backtrace:
          [<ffffffff8174d54e>] kmemleak_alloc+0x4e/0xb0
          [<ffffffff811b9b91>] __vmalloc_node_range+0x231/0x280
          [<ffffffff811b9c2a>] __vmalloc+0x4a/0x50
          [<ffffffffa02c9ec1>] ext_tree_prepare_commit+0x231/0x2e0 [blocklayoutdriver]
          [<ffffffffa02c700e>] bl_prepare_layoutcommit+0xe/0x10 [blocklayoutdriver]
          [<ffffffffa0596a6c>] pnfs_layoutcommit_inode+0x29c/0x330 [nfsv4]
          [<ffffffffa0596b13>] pnfs_generic_sync+0x13/0x20 [nfsv4]
          [<ffffffffa0585188>] nfs4_file_fsync+0x58/0x150 [nfsv4]
          [<ffffffff81228e5b>] vfs_fsync_range+0x4b/0xb0
          [<ffffffff81228f1d>] do_fsync+0x3d/0x70
          [<ffffffff812291d0>] SyS_fsync+0x10/0x20
          [<ffffffff81757def>] entry_SYSCALL_64_fastpath+0x12/0x76
          [<ffffffffffffffff>] 0xffffffffffffffff
      
      v2, add missing include header
      Signed-off-by: NKinglong Mee <kinglongmee@gmail.com>
      Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
      c8975706
  4. 01 1月, 2016 3 次提交
  5. 29 12月, 2015 1 次提交
  6. 24 11月, 2015 1 次提交
  7. 04 11月, 2015 1 次提交
  8. 16 10月, 2015 2 次提交
  9. 08 10月, 2015 1 次提交
  10. 08 9月, 2015 1 次提交
  11. 28 8月, 2015 2 次提交
  12. 20 8月, 2015 1 次提交
  13. 24 6月, 2015 1 次提交
  14. 16 6月, 2015 3 次提交
  15. 24 4月, 2015 1 次提交
  16. 28 3月, 2015 1 次提交
  17. 19 2月, 2015 2 次提交
  18. 14 2月, 2015 1 次提交
  19. 06 2月, 2015 2 次提交
  20. 04 2月, 2015 6 次提交
  21. 25 1月, 2015 2 次提交
  22. 24 1月, 2015 1 次提交
  23. 26 11月, 2014 1 次提交
  24. 13 11月, 2014 1 次提交