1. 16 2月, 2010 1 次提交
    • C
      NFS: Too many GETATTR and ACCESS calls after direct I/O · 65d26953
      Chuck Lever 提交于
      The cached read and write paths initialize fattr->time_start in their
      setup procedures.  The value of fattr->time_start is propagated to
      read_cache_jiffies by nfs_update_inode().  Subsequent calls to
      nfs_attribute_timeout() will then use a good time stamp when
      computing the attribute cache timeout, and squelch unneeded GETATTR
      calls.
      
      Since the direct I/O paths erroneously leave the inode's
      fattr->time_start field set to zero, read_cache_jiffies for that inode
      is set to zero after any direct read or write operation.  This
      triggers an otw GETATTR or ACCESS call to update the file's attribute
      and access caches properly, even when the NFS READ or WRITE replies
      have usable post-op attributes.
      
      Make sure the direct read and write setup code performs the same fattr
      initialization as the cached I/O paths to prevent unnecessary GETATTR
      calls.
      
      This was likely introduced by commit 0e574af1 in 2.6.15, which appears
      to add new nfs_fattr_init() call sites in the cached read and write
      paths, but not in the equivalent places in fs/nfs/direct.c.  A
      subsequent commit in the same series, 33801147, introduces the
      fattr->time_start field.
      
      Interestingly, the direct write reschedule path already has a call to
      nfs_fattr_init() in the right place.
      Reported-by: NQuentin Barnes <qbarnes@yahoo-inc.com>
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Cc: stable@kernel.org
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      65d26953
  2. 24 10月, 2009 1 次提交
    • T
      nfs: Panic when commit fails · a8b40bc7
      Terry Loftin 提交于
      Actually pass the NFS_FILE_SYNC option to the server to avoid a
      Panic in nfs_direct_write_complete() when a commit fails.
      
      At the end of an nfs write, if the nfs commit fails, all the writes
      will be rescheduled.  They are supposed to be rescheduled as NFS_FILE_SYNC
      writes, but the rpc_task structure is not completely intialized and so
      the option is not passed.  When the rescheduled writes complete, the
      return indicates that they are NFS_UNSTABLE and we try to do another
      commit.  This leads to a Panic because the commit data structure pointer
      was set to null in the initial (failed) commit attempt.
      Signed-off-by: NTerry Loftin <terry.loftin@hp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      a8b40bc7
  3. 20 8月, 2009 1 次提交
  4. 12 8月, 2009 1 次提交
  5. 18 6月, 2009 3 次提交
  6. 10 7月, 2008 1 次提交
  7. 20 4月, 2008 3 次提交
  8. 26 2月, 2008 2 次提交
    • T
      NFS: Ensure that the asynchronous RPC calls complete on nfsiod. · 101070ca
      Trond Myklebust 提交于
      We want to ensure that rpc_call_ops that involve mntput() are run on nfsiod
      rather than on rpciod, so that they don't deadlock when the resulting
      umount calls rpc_shutdown_client(). Hence we specify that read, write and
      commit calls must complete on nfsiod.
      Ditto for NFSv4 open, lock, locku and close asynchronous calls.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      101070ca
    • T
      NFS: Fix a deadlock with lazy umount · 383ba719
      Trond Myklebust 提交于
      We can't allow rpc callback functions like task->tk_ops->rpc_call_prepare()
      and task->tk_ops->rpc_call_done() to call mntput() in any way, since
      that will cause a deadlock when the call to rpc_shutdown_client() attempts
      to wait on 'task' to complete.
      
      We can avoid the above deadlock by moving calls to mntput to
      task->tk_ops->rpc_release() callback, since at that time the task will be
      marked as completed, and so rpc_shutdown_client won't attempt to wait on
      it.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      383ba719
  9. 30 1月, 2008 5 次提交
  10. 13 12月, 2007 1 次提交
    • T
      Revert "NFS: Ensure we return zero if applications attempt to write zero bytes" · a5576cfa
      Trond Myklebust 提交于
      This reverts commit b9148c6b.
      
      On Wed, 12 Dec 2007 10:57:30 -0500, Chuck Lever wrote
      > commit b9148c6b should be reverted.  It was recently forward-ported
      > from some years-old patches, and is clearly not needed now.
      >
      > On Dec 11, 2007, at 5:21 PM, Adrian Bunk wrote:
      >
      >> This code became dead after commit
      >> b9148c6b
      >> (which BTW doesn't seem to have changed any behaviour) and can
      >> therefore
      >> be removed.
      >>
      >> Spotted by the Coverity checker.
      >>
      >> Signed-off-by: Adrian Bunk <bunk@kernel.org>
      >>
      >> ---
      >> --- linux-2.6/fs/nfs/direct.c.old     2007-12-02 21:54:53.000000000 +0100
      >> +++ linux-2.6/fs/nfs/direct.c 2007-12-02 21:55:10.000000000 +0100
      >> @@ -897,15 +897,12 @@ ssize_t nfs_file_direct_write(struct kio
      >>       if (!count)
      >>               goto out;       /* return 0 */
      >>
      >>       retval = -EINVAL;
      >>       if ((ssize_t) count < 0)
      >>               goto out;
      >> -     retval = 0;
      >> -     if (!count)
      >> -             goto out;
      >>
      >>       retval = nfs_sync_mapping(mapping);
      >>       if (retval)
      >>               goto out;
      >>
      >>       retval = nfs_direct_write(iocb, iov, nr_segs, pos, count);
      >>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      a5576cfa
  11. 07 12月, 2007 1 次提交
  12. 27 11月, 2007 4 次提交
  13. 24 10月, 2007 1 次提交
  14. 10 10月, 2007 2 次提交
  15. 20 7月, 2007 1 次提交
    • P
      mm: Remove slab destructors from kmem_cache_create(). · 20c2df83
      Paul Mundt 提交于
      Slab destructors were no longer supported after Christoph's
      c59def9f change. They've been
      BUGs for both slab and slub, and slob never supported them
      either.
      
      This rips out support for the dtor pointer from kmem_cache_create()
      completely and fixes up every single callsite in the kernel (there were
      about 224, not including the slab allocator definitions themselves,
      or the documentation references).
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      20c2df83
  16. 11 7月, 2007 3 次提交
  17. 31 5月, 2007 1 次提交
  18. 24 5月, 2007 2 次提交
  19. 09 5月, 2007 1 次提交
  20. 01 5月, 2007 1 次提交
  21. 15 4月, 2007 1 次提交
  22. 04 2月, 2007 1 次提交
  23. 09 12月, 2006 1 次提交
  24. 08 12月, 2006 1 次提交