1. 21 9月, 2011 1 次提交
    • J
      nfsd4: fix open downgrade, again · 3d02fa29
      J. Bruce Fields 提交于
      Yet another open-management regression:
      
      	- nfs4_file_downgrade() doesn't remove the BOTH access bit on
      	  downgrade, so the server's idea of the stateid's access gets
      	  out of sync with the client's.  If we want to keep an O_RDWR
      	  open in this case, we should do that in the file_put_access
      	  logic rather than here.
      	- We forgot to convert v4 access to an open mode here.
      
      This logic has proven too hard to get right.  In the future we may
      consider:
      	- reexamining the lock/openowner relationship (locks probably
      	  don't really need to take their own references here).
      	- adding open upgrade/downgrade support to the vfs.
      	- removing the atomic operations.  They're redundant as long as
      	  this is all under some other lock.
      
      Also, maybe some kind of additional static checking would help catch
      O_/NFS4_SHARE_ACCESS confusion.
      
      Cc: stable@kernel.org
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      3d02fa29
  2. 19 9月, 2011 2 次提交
    • J
      nfsd4: hash closed stateid's like any other · f7a4d872
      J. Bruce Fields 提交于
      Look up closed stateid's in the stateid hash like any other stateid
      rather than searching the close lru.
      
      This is simpler, and fixes a bug: currently we handle only the case of a
      close that is the last close for a given stateowner, but not the case of
      a close for a stateowner that still has active opens on other files.
      Thus in a case like:
      
      	open(owner, file1)
      	open(owner, file2)
      	close(owner, file2)
      	close(owner, file2)
      
      the final close won't be recognized as a retransmission.
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      f7a4d872
    • J
      nfsd4: construct stateid from clientid and counter · d3b313a4
      J. Bruce Fields 提交于
      Including the full clientid in the on-the-wire stateid allows more
      reliable detection of bad vs. expired stateid's, simplifies code, and
      ensures we won't reuse the opaque part of the stateid (as we currently
      do when the same openowner closes and reopens the same file).
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      d3b313a4
  3. 17 9月, 2011 3 次提交
  4. 14 9月, 2011 14 次提交
  5. 07 9月, 2011 2 次提交
  6. 04 9月, 2011 1 次提交
  7. 03 9月, 2011 3 次提交
  8. 01 9月, 2011 10 次提交
  9. 28 8月, 2011 4 次提交