1. 17 Oct, 2011 5 commits
  2. 12 Oct, 2011 1 commit
  3. 11 Oct, 2011 3 commits
  4. 10 Oct, 2011 5 commits
    • J. Bruce Fields's avatar
      nfsd4: ignore WANT bits in open downgrade · c30e92df
      J. Bruce Fields authored
      We don't use WANT bits yet--and sending them can probably trigger a
      BUG() further down.
      
      Cc: stable@kernel.org
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      c30e92df
    • Michal Schmidt's avatar
      sunrpc: add MODULE_ALIAS to match the filesystem name · dcbf8c30
      Michal Schmidt authored
      sunrpc implements the rpc_pipefs filesystem type.
      Add the alias to have the module requested automatically by the kernel
      when the filesystem is mounted.
      Signed-off-by: default avatarMichal Schmidt <mschmidt@redhat.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      dcbf8c30
    • J. Bruce Fields's avatar
      nfsd4: cleanup state.h comments · b31b30e5
      J. Bruce Fields authored
      These comments are mostly out of date.
      Reported-by: default avatarBryan Schumaker <bjschuma@netapp.com>
      b31b30e5
    • J. Bruce Fields's avatar
      nfsd4: clean up downgrading code · 6409a5a6
      J. Bruce Fields authored
      In response to some review comments, get rid of the somewhat obscure
      for-loop with bitops, and improve a comment.
      Reported-by: default avatarSteve Dickson <steved@redhat.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      6409a5a6
    • J. Bruce Fields's avatar
      nfsd4: fix state lock usage in LOCKU · 71c3bcd7
      J. Bruce Fields authored
      In commit 5ec094c1 "nfsd4: extend state
      lock over seqid replay logic" I modified the exit logic of all the
      seqid-based procedures except nfsd4_locku().  Fix the oversight.
      
      The result of the bug was a double-unlock while handling the LOCKU
      procedure, and a warning like:
      
      [  142.150014] WARNING: at kernel/mutex-debug.c:78 debug_mutex_unlock+0xda/0xe0()
      ...
      [  142.152927] Pid: 742, comm: nfsd Not tainted 3.1.0-rc1-SLIM+ #9
      [  142.152927] Call Trace:
      [  142.152927]  [<ffffffff8105fa4f>] warn_slowpath_common+0x7f/0xc0
      [  142.152927]  [<ffffffff8105faaa>] warn_slowpath_null+0x1a/0x20
      [  142.152927]  [<ffffffff810960ca>] debug_mutex_unlock+0xda/0xe0
      [  142.152927]  [<ffffffff813e4200>] __mutex_unlock_slowpath+0x80/0x140
      [  142.152927]  [<ffffffff813e42ce>] mutex_unlock+0xe/0x10
      [  142.152927]  [<ffffffffa03bd3f5>] nfs4_lock_state+0x35/0x40 [nfsd]
      [  142.152927]  [<ffffffffa03b0b71>] nfsd4_proc_compound+0x2a1/0x690
      [nfsd]
      [  142.152927]  [<ffffffffa039f9fb>] nfsd_dispatch+0xeb/0x230 [nfsd]
      [  142.152927]  [<ffffffffa02b1055>] svc_process_common+0x345/0x690
      [sunrpc]
      [  142.152927]  [<ffffffff81058d10>] ? try_to_wake_up+0x280/0x280
      [  142.152927]  [<ffffffffa02b16e2>] svc_process+0x102/0x150 [sunrpc]
      [  142.152927]  [<ffffffffa039f0bd>] nfsd+0xbd/0x160 [nfsd]
      [  142.152927]  [<ffffffffa039f000>] ? 0xffffffffa039efff
      [  142.152927]  [<ffffffff8108230c>] kthread+0x8c/0xa0
      [  142.152927]  [<ffffffff813e8694>] kernel_thread_helper+0x4/0x10
      [  142.152927]  [<ffffffff81082280>] ? kthread_worker_fn+0x190/0x190
      [  142.152927]  [<ffffffff813e8690>] ? gs_change+0x13/0x13
      Reported-by: default avatarBryan Schumaker <bjschuma@netapp.com>
      Tested-by: default avatarBryan Schumaker <bjschuma@netapp.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      71c3bcd7
  5. 26 Sep, 2011 4 commits
  6. 21 Sep, 2011 1 commit
  7. 20 Sep, 2011 2 commits
    • J. Bruce Fields's avatar
      nfsd4: make op_cacheresult another flag · c856694e
      J. Bruce Fields authored
      I'm not sure why I used a new field for this originally.
      
      Also, the differences between some of these flags are a little subtle;
      add some comments to explain.
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      c856694e
    • J. Bruce Fields's avatar
      nfsd4: fix open downgrade, again · 3d02fa29
      J. Bruce Fields authored
      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: default avatarJ. Bruce Fields <bfields@redhat.com>
      3d02fa29
  8. 19 Sep, 2011 2 commits
    • J. Bruce Fields's avatar
      nfsd4: hash closed stateid's like any other · f7a4d872
      J. Bruce Fields authored
      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: default avatarJ. Bruce Fields <bfields@redhat.com>
      f7a4d872
    • J. Bruce Fields's avatar
      nfsd4: construct stateid from clientid and counter · d3b313a4
      J. Bruce Fields authored
      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: default avatarJ. Bruce Fields <bfields@redhat.com>
      d3b313a4
  9. 17 Sep, 2011 2 commits
  10. 16 Sep, 2011 2 commits
    • J. Bruce Fields's avatar
      nfsd4: replace oo_confirmed by flag bit · dad1c067
      J. Bruce Fields authored
      I want at least one more bit here.  So, let's haul out the caps lock key
      and add a flags field.
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      dad1c067
    • Mi Jinlong's avatar
      nfsd41: try to check reply size before operation · 58e7b33a
      Mi Jinlong authored
      For checking the size of reply before calling a operation,
      we need try to get maxsize of the operation's reply.
      
      v3: using new method as Bruce said,
      
       "we could handle operations in two different ways:
      
      	- For operations that actually change something (write, rename,
      	  open, close, ...), do it the way we're doing it now: be
      	  very careful to estimate the size of the response before even
      	  processing the operation.
      	- For operations that don't change anything (read, getattr, ...)
      	  just go ahead and do the operation.  If you realize after the
      	  fact that the response is too large, then return the error at
      	  that point.
      
        So we'd add another flag to op_flags: say, OP_MODIFIES_SOMETHING.  And for
        operations with OP_MODIFIES_SOMETHING set, we'd do the first thing.  For
        operations without it set, we'd do the second."
      Signed-off-by: default avatarMi Jinlong <mijinlong@cn.fujitsu.com>
      [bfields@redhat.com: crash, don't attempt to handle, undefined op_rsize_bop]
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      58e7b33a
  11. 14 Sep, 2011 5 commits
  12. 13 Sep, 2011 8 commits