1. 13 8月, 2013 4 次提交
  2. 16 11月, 2012 2 次提交
    • D
      xfs: uncached buffer reads need to return an error · eab4e633
      Dave Chinner 提交于
      With verification being done as an IO completion callback, different
      errors can be returned from a read. Uncached reads only return a
      buffer or NULL on failure, which means the verification error cannot
      be returned to the caller.
      
      Split the error handling for these reads into two - a failure to get
      a buffer will still return NULL, but a read error will return a
      referenced buffer with b_error set rather than NULL. The caller is
      responsible for checking the error state of the buffer returned.
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NPhil White <pwhite@sgi.com>
      Signed-off-by: NBen Myers <bpm@sgi.com>
      eab4e633
    • D
      xfs: make buffer read verication an IO completion function · c3f8fc73
      Dave Chinner 提交于
      Add a verifier function callback capability to the buffer read
      interfaces.  This will be used by the callers to supply a function
      that verifies the contents of the buffer when it is read from disk.
      This patch does not provide callback functions, but simply modifies
      the interfaces to allow them to be called.
      
      The reason for adding this to the read interfaces is that it is very
      difficult to tell fom the outside is a buffer was just read from
      disk or whether we just pulled it out of cache. Supplying a callbck
      allows the buffer cache to use it's internal knowledge of the buffer
      to execute it only when the buffer is read from disk.
      
      It is intended that the verifier functions will mark the buffer with
      an EFSCORRUPTED error when verification fails. This allows the
      reading context to distinguish a verification error from an IO
      error, and potentially take further actions on the buffer (e.g.
      attempt repair) based on the error reported.
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NPhil White <pwhite@sgi.com>
      Signed-off-by: NBen Myers <bpm@sgi.com>
      c3f8fc73
  3. 18 10月, 2012 1 次提交
  4. 24 8月, 2012 1 次提交
    • D
      xfs: fix uninitialised variable in xfs_rtbuf_get() · 0b9e3f6d
      Dave Chinner 提交于
      Results in this assert failure in generic/090:
      
      XFS: Assertion failed: *nmap >= 1, file: fs/xfs/xfs_bmap.c, line: 4363
      .....
      Call Trace:
       [<ffffffff814680db>] xfs_bmapi_read+0x6b/0x370
       [<ffffffff814b64b2>] xfs_rtbuf_get+0x42/0x130
       [<ffffffff814b6f09>] xfs_rtget_summary+0x89/0x120
       [<ffffffff814b7bfe>] xfs_rtallocate_extent_size+0xce/0x340
       [<ffffffff814b89f0>] xfs_rtallocate_extent+0x240/0x290
       [<ffffffff81462c1a>] xfs_bmap_rtalloc+0x1ba/0x340
       [<ffffffff81463a65>] xfs_bmap_alloc+0x35/0x40
       [<ffffffff8146f111>] xfs_bmapi_allocate+0xf1/0x350
       [<ffffffff8146f9de>] xfs_bmapi_write+0x66e/0xa60
       [<ffffffff8144538a>] xfs_iomap_write_direct+0x22a/0x3f0
       [<ffffffff8143707b>] __xfs_get_blocks+0x38b/0x5d0
       [<ffffffff814372d4>] xfs_get_blocks_direct+0x14/0x20
       [<ffffffff811b0081>] do_blockdev_direct_IO+0xf71/0x1eb0
       [<ffffffff811b1015>] __blockdev_direct_IO+0x55/0x60
       [<ffffffff814355ca>] xfs_vm_direct_IO+0x11a/0x1e0
       [<ffffffff8112d617>] generic_file_direct_write+0xd7/0x1b0
       [<ffffffff8143e16c>] xfs_file_dio_aio_write+0x13c/0x320
       [<ffffffff8143e6f2>] xfs_file_aio_write+0x1c2/0x1d0
       [<ffffffff81174a07>] do_sync_write+0xa7/0xe0
       [<ffffffff81175288>] vfs_write+0xa8/0x160
       [<ffffffff81175702>] sys_pwrite64+0x92/0xb0
       [<ffffffff81b68f69>] system_call_fastpath+0x16/0x1b
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Signed-off-by: NBen Myers <bpm@sgi.com>
      0b9e3f6d
  5. 17 8月, 2012 1 次提交
    • D
      xfs: fix uninitialised variable in xfs_rtbuf_get() · a76cccbe
      Dave Chinner 提交于
      Results in this assert failure in generic/090:
      
      XFS: Assertion failed: *nmap >= 1, file: fs/xfs/xfs_bmap.c, line: 4363
      .....
      Call Trace:
       [<ffffffff814680db>] xfs_bmapi_read+0x6b/0x370
       [<ffffffff814b64b2>] xfs_rtbuf_get+0x42/0x130
       [<ffffffff814b6f09>] xfs_rtget_summary+0x89/0x120
       [<ffffffff814b7bfe>] xfs_rtallocate_extent_size+0xce/0x340
       [<ffffffff814b89f0>] xfs_rtallocate_extent+0x240/0x290
       [<ffffffff81462c1a>] xfs_bmap_rtalloc+0x1ba/0x340
       [<ffffffff81463a65>] xfs_bmap_alloc+0x35/0x40
       [<ffffffff8146f111>] xfs_bmapi_allocate+0xf1/0x350
       [<ffffffff8146f9de>] xfs_bmapi_write+0x66e/0xa60
       [<ffffffff8144538a>] xfs_iomap_write_direct+0x22a/0x3f0
       [<ffffffff8143707b>] __xfs_get_blocks+0x38b/0x5d0
       [<ffffffff814372d4>] xfs_get_blocks_direct+0x14/0x20
       [<ffffffff811b0081>] do_blockdev_direct_IO+0xf71/0x1eb0
       [<ffffffff811b1015>] __blockdev_direct_IO+0x55/0x60
       [<ffffffff814355ca>] xfs_vm_direct_IO+0x11a/0x1e0
       [<ffffffff8112d617>] generic_file_direct_write+0xd7/0x1b0
       [<ffffffff8143e16c>] xfs_file_dio_aio_write+0x13c/0x320
       [<ffffffff8143e6f2>] xfs_file_aio_write+0x1c2/0x1d0
       [<ffffffff81174a07>] do_sync_write+0xa7/0xe0
       [<ffffffff81175288>] vfs_write+0xa8/0x160
       [<ffffffff81175702>] sys_pwrite64+0x92/0xb0
       [<ffffffff81b68f69>] system_call_fastpath+0x16/0x1b
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Signed-off-by: NBen Myers <bpm@sgi.com>
      a76cccbe
  6. 15 5月, 2012 3 次提交
  7. 23 3月, 2012 1 次提交
    • K
      xfs: fix deadlock in xfs_rtfree_extent · 5575acc7
      Kamal Dasu 提交于
      To fix the deadlock caused by repeatedly calling xfs_rtfree_extent
      
       - removed xfs_ilock() and xfs_trans_ijoin() from xfs_rtfree_extent(),
         instead added asserts that the inode is locked and has an inode_item
         attached to it.
       - in xfs_bunmapi() when dealing with an inode with the rt flag
         call xfs_ilock() and xfs_trans_ijoin() so that the
         reference count is bumped on the inode and attached it to the
         transaction before calling into xfs_bmap_del_extent, similar to
         what we do in xfs_bmap_rtalloc.
      Signed-off-by: NKamal Dasu <kdasu.kdev@gmail.com>
      Reviewed-by: NChristoph Hellwig <hch@infradead.org>
      Signed-off-by: NBen Myers <bpm@sgi.com>
      5575acc7
  8. 12 10月, 2011 3 次提交
  9. 26 7月, 2011 2 次提交
  10. 07 3月, 2011 1 次提交
  11. 23 2月, 2011 1 次提交
  12. 08 2月, 2011 2 次提交
  13. 19 10月, 2010 1 次提交
  14. 27 7月, 2010 3 次提交
  15. 24 6月, 2010 1 次提交
  16. 29 5月, 2010 1 次提交
  17. 16 1月, 2010 1 次提交
    • D
      xfs: fix missing error check in xfs_rtfree_range · 3daeb42c
      Dave Chinner 提交于
      When xfs_rtfind_forw() returns an error, the block is returned
      uninitialised.  xfs_rtfree_range() is not checking the error return,
      so could be using an uninitialised block number for modifying bitmap
      summary info.
      
      The problem was found by gcc when compiling the *userspace* libxfs
      code - it is an copy of the kernel code with the exact same bug.
      gcc gives an uninitialised variable warning on the userspace code
      but not on the kernel code. You gotta love the consistency (Mmmm,
      slightly chewy today!).
      Signed-off-by: NDave Chinner <david@fromorbit.com>
      Signed-off-by: NAlex Elder <aelder@sgi.com>
      3daeb42c
  18. 15 12月, 2009 1 次提交
    • C
      xfs: event tracing support · 0b1b213f
      Christoph Hellwig 提交于
      Convert the old xfs tracing support that could only be used with the
      out of tree kdb and xfsidbg patches to use the generic event tracer.
      
      To use it make sure CONFIG_EVENT_TRACING is enabled and then enable
      all xfs trace channels by:
      
         echo 1 > /sys/kernel/debug/tracing/events/xfs/enable
      
      or alternatively enable single events by just doing the same in one
      event subdirectory, e.g.
      
         echo 1 > /sys/kernel/debug/tracing/events/xfs/xfs_ihold/enable
      
      or set more complex filters, etc. In Documentation/trace/events.txt
      all this is desctribed in more detail.  To reads the events do a
      
         cat /sys/kernel/debug/tracing/trace
      
      Compared to the last posting this patch converts the tracing mostly to
      the one tracepoint per callsite model that other users of the new
      tracing facility also employ.  This allows a very fine-grained control
      of the tracing, a cleaner output of the traces and also enables the
      perf tool to use each tracepoint as a virtual performance counter,
           allowing us to e.g. count how often certain workloads git various
           spots in XFS.  Take a look at
      
          http://lwn.net/Articles/346470/
      
      for some examples.
      
      Also the btree tracing isn't included at all yet, as it will require
      additional core tracing features not in mainline yet, I plan to
      deliver it later.
      
      And the really nice thing about this patch is that it actually removes
      many lines of code while adding this nice functionality:
      
       fs/xfs/Makefile                |    8
       fs/xfs/linux-2.6/xfs_acl.c     |    1
       fs/xfs/linux-2.6/xfs_aops.c    |   52 -
       fs/xfs/linux-2.6/xfs_aops.h    |    2
       fs/xfs/linux-2.6/xfs_buf.c     |  117 +--
       fs/xfs/linux-2.6/xfs_buf.h     |   33
       fs/xfs/linux-2.6/xfs_fs_subr.c |    3
       fs/xfs/linux-2.6/xfs_ioctl.c   |    1
       fs/xfs/linux-2.6/xfs_ioctl32.c |    1
       fs/xfs/linux-2.6/xfs_iops.c    |    1
       fs/xfs/linux-2.6/xfs_linux.h   |    1
       fs/xfs/linux-2.6/xfs_lrw.c     |   87 --
       fs/xfs/linux-2.6/xfs_lrw.h     |   45 -
       fs/xfs/linux-2.6/xfs_super.c   |  104 ---
       fs/xfs/linux-2.6/xfs_super.h   |    7
       fs/xfs/linux-2.6/xfs_sync.c    |    1
       fs/xfs/linux-2.6/xfs_trace.c   |   75 ++
       fs/xfs/linux-2.6/xfs_trace.h   | 1369 +++++++++++++++++++++++++++++++++++++++++
       fs/xfs/linux-2.6/xfs_vnode.h   |    4
       fs/xfs/quota/xfs_dquot.c       |  110 ---
       fs/xfs/quota/xfs_dquot.h       |   21
       fs/xfs/quota/xfs_qm.c          |   40 -
       fs/xfs/quota/xfs_qm_syscalls.c |    4
       fs/xfs/support/ktrace.c        |  323 ---------
       fs/xfs/support/ktrace.h        |   85 --
       fs/xfs/xfs.h                   |   16
       fs/xfs/xfs_ag.h                |   14
       fs/xfs/xfs_alloc.c             |  230 +-----
       fs/xfs/xfs_alloc.h             |   27
       fs/xfs/xfs_alloc_btree.c       |    1
       fs/xfs/xfs_attr.c              |  107 ---
       fs/xfs/xfs_attr.h              |   10
       fs/xfs/xfs_attr_leaf.c         |   14
       fs/xfs/xfs_attr_sf.h           |   40 -
       fs/xfs/xfs_bmap.c              |  507 +++------------
       fs/xfs/xfs_bmap.h              |   49 -
       fs/xfs/xfs_bmap_btree.c        |    6
       fs/xfs/xfs_btree.c             |    5
       fs/xfs/xfs_btree_trace.h       |   17
       fs/xfs/xfs_buf_item.c          |   87 --
       fs/xfs/xfs_buf_item.h          |   20
       fs/xfs/xfs_da_btree.c          |    3
       fs/xfs/xfs_da_btree.h          |    7
       fs/xfs/xfs_dfrag.c             |    2
       fs/xfs/xfs_dir2.c              |    8
       fs/xfs/xfs_dir2_block.c        |   20
       fs/xfs/xfs_dir2_leaf.c         |   21
       fs/xfs/xfs_dir2_node.c         |   27
       fs/xfs/xfs_dir2_sf.c           |   26
       fs/xfs/xfs_dir2_trace.c        |  216 ------
       fs/xfs/xfs_dir2_trace.h        |   72 --
       fs/xfs/xfs_filestream.c        |    8
       fs/xfs/xfs_fsops.c             |    2
       fs/xfs/xfs_iget.c              |  111 ---
       fs/xfs/xfs_inode.c             |   67 --
       fs/xfs/xfs_inode.h             |   76 --
       fs/xfs/xfs_inode_item.c        |    5
       fs/xfs/xfs_iomap.c             |   85 --
       fs/xfs/xfs_iomap.h             |    8
       fs/xfs/xfs_log.c               |  181 +----
       fs/xfs/xfs_log_priv.h          |   20
       fs/xfs/xfs_log_recover.c       |    1
       fs/xfs/xfs_mount.c             |    2
       fs/xfs/xfs_quota.h             |    8
       fs/xfs/xfs_rename.c            |    1
       fs/xfs/xfs_rtalloc.c           |    1
       fs/xfs/xfs_rw.c                |    3
       fs/xfs/xfs_trans.h             |   47 +
       fs/xfs/xfs_trans_buf.c         |   62 -
       fs/xfs/xfs_vnodeops.c          |    8
       70 files changed, 2151 insertions(+), 2592 deletions(-)
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAlex Elder <aelder@sgi.com>
      0b1b213f
  19. 04 2月, 2009 1 次提交
  20. 19 1月, 2009 1 次提交
  21. 16 1月, 2009 1 次提交
  22. 02 12月, 2008 1 次提交
  23. 01 12月, 2008 1 次提交
  24. 13 8月, 2008 1 次提交
  25. 28 7月, 2008 1 次提交
  26. 18 4月, 2008 2 次提交
  27. 26 2月, 2008 1 次提交