1. 02 3月, 2010 5 次提交
    • C
      xfs: remove wrapper for the fsync file operation · fd3200be
      Christoph Hellwig 提交于
      Currently the fsync file operation is divided into a low-level
      routine doing all the work and one that implements the Linux file
      operation and does minimal argument wrapping.  This is a leftover
      from the days of the vnode operations layer and can be removed to
      simplify the code a bit, as well as preparing for the implementation
      of an optimized fdatasync which needs to look at the Linux inode
      state.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAlex Elder <aelder@sgi.com>
      fd3200be
    • C
      xfs: remove wrappers for read/write file operations · 00258e36
      Christoph Hellwig 提交于
      Currently the aio_read, aio_write, splice_read and splice_write file
      operations are divided into a low-level routine doing all the work
      and one that implements the Linux file operations and does minimal
      argument wrapping.  This is a leftover from the days of the vnode
      operations layer and can be removed to simplify the code a lot.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NDave Chinner <david@fromorbit.com>
      Signed-off-by: NAlex Elder <aelder@sgi.com>
      00258e36
    • C
      xfs: merge xfs_lrw.c into xfs_file.c · dda35b8f
      Christoph Hellwig 提交于
      Currently the code to implement the file operations is split over
      two small files.  Merge the content of xfs_lrw.c into xfs_file.c to
      have it in one place.  Note that I haven't done various cleanups
      that are possible after this yet, they will follow in the next
      patch.  Also the function xfs_dev_is_read_only which was in
      xfs_lrw.c before really doesn't fit in here at all and was moved to
      xfs_mount.c.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NDave Chinner <david@fromorbit.com>
      Signed-off-by: NAlex Elder <aelder@sgi.com>
      dda35b8f
    • C
      xfs: fix dquota trace format · b262e5df
      Christoph Hellwig 提交于
      The be32_to_cpu in the TP_printk output breaks automatic parsing of
      the trace format by the trace-cmd tools, so we have to move it into
      the TP_assign block.  While we're at it also fix the format for the
      quota limits to more regular and easier parseable.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NDave Chinner <david@fromorbit.com>
      Signed-off-by: NAlex Elder <aelder@sgi.com>
      b262e5df
    • E
      xfs: increase readdir buffer size · a9cc799e
      Eric Sandeen 提交于
      While doing some testing of readdir perf a while back,
      I noticed that the buffer size we're using internally is
      smaller than what glibc gives us by default.  Upping this
      size helped a bit, and seems safe.
      
      glibc's __alloc_dir() does:
      
        const size_t default_allocation = (4 * BUFSIZ < sizeof (struct dirent64)
                                           ? sizeof (struct dirent64) : 4 * BUFSIZ);
        const size_t small_allocation = (BUFSIZ < sizeof (struct dirent64)
                                         ? sizeof (struct dirent64) : BUFSIZ);
        size_t allocation = default_allocation;
      #ifdef _STATBUF_ST_BLKSIZE
        if (statp != NULL && default_allocation < statp->st_blksize)
          allocation = statp->st_blksize;
      #endif
      
      and
      
      #define _G_BUFSIZ 8192
      #define _IO_BUFSIZ _G_BUFSIZ
      # define BUFSIZ _IO_BUFSIZ
      
      so the default buffer is 4 * 8192 = 32768
      (except in the unlikely case of blocks > 32k....)
      Signed-off-by: NEric Sandeen <sandeen@sandeen.net>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAlex Elder <aelder@sgi.com>
      a9cc799e
  2. 23 2月, 2010 1 次提交
  3. 20 2月, 2010 2 次提交
  4. 19 2月, 2010 2 次提交
  5. 17 2月, 2010 1 次提交
  6. 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
  7. 15 2月, 2010 1 次提交
  8. 14 2月, 2010 1 次提交
  9. 13 2月, 2010 3 次提交
  10. 12 2月, 2010 4 次提交
  11. 10 2月, 2010 4 次提交
  12. 09 2月, 2010 9 次提交
  13. 08 2月, 2010 1 次提交
    • L
      Fix race in tty_fasync() properly · 80e1e823
      Linus Torvalds 提交于
      This reverts commit 70362511 ("tty: fix race in tty_fasync") and
      commit b04da8bf ("fnctl: f_modown should call write_lock_irqsave/
      restore") that tried to fix up some of the fallout but was incomplete.
      
      It turns out that we really cannot hold 'tty->ctrl_lock' over calling
      __f_setown, because not only did that cause problems with interrupt
      disables (which the second commit fixed), it also causes a potential
      ABBA deadlock due to lock ordering.
      
      Thanks to Tetsuo Handa for following up on the issue, and running
      lockdep to show the problem.  It goes roughly like this:
      
       - f_getown gets filp->f_owner.lock for reading without interrupts
         disabled, so an interrupt that happens while that lock is held can
         cause a lockdep chain from f_owner.lock -> sighand->siglock.
      
       - at the same time, the tty->ctrl_lock -> f_owner.lock chain that
         commit 70362511 introduced, together with the pre-existing
         sighand->siglock -> tty->ctrl_lock chain means that we have a lock
         dependency the other way too.
      
      So instead of extending tty->ctrl_lock over the whole __f_setown() call,
      we now just take a reference to the 'pid' structure while holding the
      lock, and then release it after having done the __f_setown.  That still
      guarantees that 'struct pid' won't go away from under us, which is all
      we really ever needed.
      Reported-and-tested-by: NTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Acked-by: NAmérico Wang <xiyou.wangcong@gmail.com>
      Cc: stable@kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      80e1e823
  14. 07 2月, 2010 5 次提交