1. 05 9月, 2013 1 次提交
    • N
      NFSv4: Don't try to recover NFSv4 locks when they are lost. · ef1820f9
      NeilBrown 提交于
      When an NFSv4 client loses contact with the server it can lose any
      locks that it holds.
      
      Currently when it reconnects to the server it simply tries to reclaim
      those locks.  This might succeed even though some other client has
      held and released a lock in the mean time.  So the first client might
      think the file is unchanged, but it isn't.  This isn't good.
      
      If, when recovery happens, the locks cannot be claimed because some
      other client still holds the lock, then we get a message in the kernel
      logs, but the client can still write.  So two clients can both think
      they have a lock and can both write at the same time.  This is equally
      not good.
      
      There was a patch a while ago
        http://comments.gmane.org/gmane.linux.nfs/41917
      
      which tried to address some of this, but it didn't seem to go
      anywhere.  That patch would also send a signal to the process.  That
      might be useful but for now this patch just causes writes to fail.
      
      For NFSv4 (unlike v2/v3) there is a strong link between the lock and
      the write request so we can fairly easily fail any IO of the lock is
      gone.  While some applications might not expect this, it is still
      safer than allowing the write to succeed.
      
      Because this is a fairly big change in behaviour a module parameter,
      "recover_locks", is introduced which defaults to true (the current
      behaviour) but can be set to "false" to tell the client not to try to
      recover things that were lost.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      ef1820f9
  2. 08 8月, 2013 1 次提交
  3. 09 6月, 2013 3 次提交
  4. 07 6月, 2013 1 次提交
  5. 07 5月, 2013 1 次提交
  6. 17 4月, 2013 1 次提交
  7. 30 3月, 2013 2 次提交
  8. 26 3月, 2013 1 次提交
  9. 01 3月, 2013 1 次提交
    • W
      NFSv4.1: LAYOUTGET EDELAY loops timeout to the MDS · 30005121
      Weston Andros Adamson 提交于
      The client will currently try LAYOUTGETs forever if a server is returning
      NFS4ERR_LAYOUTTRYLATER or NFS4ERR_RECALLCONFLICT - even if the client no
      longer needs the layout (ie process killed, unmounted).
      
      This patch uses the DS timeout value (module parameter 'dataserver_timeo'
      via rpc layer) to set an upper limit of how long the client tries LATOUTGETs
      in this situation.  Once the timeout is reached, IO is redirected to the MDS.
      
      This also changes how the client checks if a layout is on the clp list
      to avoid a double list_add.
      Signed-off-by: NWeston Andros Adamson <dros@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      30005121
  10. 13 2月, 2013 1 次提交
  11. 16 12月, 2012 1 次提交
  12. 06 12月, 2012 6 次提交
  13. 27 11月, 2012 3 次提交
  14. 21 11月, 2012 1 次提交
  15. 03 10月, 2012 1 次提交
  16. 02 10月, 2012 1 次提交
    • W
      NFSv4: Add ACCESS operation to OPEN compound · 6168f62c
      Weston Andros Adamson 提交于
      The OPEN operation has no way to differentiate an open for read and an
      open for execution - both look like read to the server. This allowed
      users to read files that didn't have READ access but did have EXEC access,
      which is obviously wrong.
      
      This patch adds an ACCESS call to the OPEN compound to handle the
      difference between OPENs for reading and execution.  Since we're going
      through the trouble of calling ACCESS, we check all possible access bits
      and cache the results hopefully avoiding an ACCESS call in the future.
      Signed-off-by: NWeston Andros Adamson <dros@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      6168f62c
  17. 29 9月, 2012 1 次提交
  18. 06 9月, 2012 1 次提交
  19. 03 8月, 2012 1 次提交
  20. 31 7月, 2012 3 次提交
  21. 14 7月, 2012 1 次提交
    • M
      nfs: clean up ->create in nfs_rpc_ops · 8867fe58
      Miklos Szeredi 提交于
      Don't pass nfs_open_context() to ->create().  Only the NFS4 implementation
      needed that and only because it wanted to return an open file using open
      intents.  That task has been replaced by ->atomic_open so it is not necessary
      anymore to pass the context to the create rpc operation.
      
      Despite nfs4_proc_create apparently being okay with a NULL context it Oopses
      somewhere down the call chain.  So allocate a context here.
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      CC: Trond Myklebust <Trond.Myklebust@netapp.com>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      8867fe58
  22. 29 6月, 2012 7 次提交