1. 02 10月, 2014 1 次提交
  2. 30 7月, 2014 1 次提交
  3. 25 6月, 2014 1 次提交
    • D
      xfs: global error sign conversion · 2451337d
      Dave Chinner 提交于
      Convert all the errors the core XFs code to negative error signs
      like the rest of the kernel and remove all the sign conversion we
      do in the interface layers.
      
      Errors for conversion (and comparison) found via searches like:
      
      $ git grep " E" fs/xfs
      $ git grep "return E" fs/xfs
      $ git grep " E[A-Z].*;$" fs/xfs
      
      Negation points found via searches like:
      
      $ git grep "= -[a-z,A-Z]" fs/xfs
      $ git grep "return -[a-z,A-D,F-Z]" fs/xfs
      $ git grep " -[a-z].*;" fs/xfs
      
      [ with some bits I missed from Brian Foster ]
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Reviewed-by: NBrian Foster <bfoster@redhat.com>
      Signed-off-by: NDave Chinner <david@fromorbit.com>
      2451337d
  4. 22 6月, 2014 1 次提交
  5. 07 2月, 2014 1 次提交
  6. 24 10月, 2013 4 次提交
    • D
      xfs: split xfs_rtalloc.c for userspace sanity · c963c619
      Dave Chinner 提交于
      xfs_rtalloc.c is partially shared with userspace. Split the file up
      into two parts - one that is kernel private and the other which is
      wholly shared with userspace.
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NBen Myers <bpm@sgi.com>
      c963c619
    • D
      xfs: decouple inode and bmap btree header files · a4fbe6ab
      Dave Chinner 提交于
      Currently the xfs_inode.h header has a dependency on the definition
      of the BMAP btree records as the inode fork includes an array of
      xfs_bmbt_rec_host_t objects in it's definition.
      
      Move all the btree format definitions from xfs_btree.h,
      xfs_bmap_btree.h, xfs_alloc_btree.h and xfs_ialloc_btree.h to
      xfs_format.h to continue the process of centralising the on-disk
      format definitions. With this done, the xfs inode definitions are no
      longer dependent on btree header files.
      
      The enables a massive culling of unnecessary includes, with close to
      200 #include directives removed from the XFS kernel code base.
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Reviewed-by: NBen Myers <bpm@sgi.com>
      Signed-off-by: NBen Myers <bpm@sgi.com>
      a4fbe6ab
    • D
      xfs: decouple log and transaction headers · 239880ef
      Dave Chinner 提交于
      xfs_trans.h has a dependency on xfs_log.h for a couple of
      structures. Most code that does transactions doesn't need to know
      anything about the log, but this dependency means that they have to
      include xfs_log.h. Decouple the xfs_trans.h and xfs_log.h header
      files and clean up the includes to be in dependency order.
      
      In doing this, remove the direct include of xfs_trans_reserve.h from
      xfs_trans.h so that we remove the dependency between xfs_trans.h and
      xfs_mount.h. Hence the xfs_trans.h include can be moved to the
      indicate the actual dependencies other header files have on it.
      
      Note that these are kernel only header files, so this does not
      translate to any userspace changes at all.
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Reviewed-by: NBen Myers <bpm@sgi.com>
      Signed-off-by: NBen Myers <bpm@sgi.com>
      239880ef
    • D
      xfs: create a shared header file for format-related information · 70a9883c
      Dave Chinner 提交于
      All of the buffer operations structures are needed to be exported
      for xfs_db, so move them all to a common location rather than
      spreading them all over the place. They are verifying the on-disk
      format, so while xfs_format.h might be a good place, it is not part
      of the on disk format.
      
      Hence we need to create a new header file that we centralise these
      related definitions. Start by moving the bffer operations
      structures, and then also move all the other definitions that have
      crept into xfs_log_format.h and xfs_format.h as there was no other
      shared header file to put them in.
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NBen Myers <bpm@sgi.com>
      70a9883c
  7. 13 8月, 2013 7 次提交
  8. 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
  9. 18 10月, 2012 1 次提交
  10. 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
  11. 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
  12. 15 5月, 2012 3 次提交
  13. 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
  14. 12 10月, 2011 3 次提交
  15. 26 7月, 2011 2 次提交
  16. 07 3月, 2011 1 次提交
  17. 23 2月, 2011 1 次提交
  18. 08 2月, 2011 2 次提交
  19. 19 10月, 2010 1 次提交
  20. 27 7月, 2010 3 次提交
  21. 24 6月, 2010 1 次提交
  22. 29 5月, 2010 1 次提交