[XFS updates] XFS development tree branch, for-linus, updated. v3.8-rc1-37-g1e82379

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "XFS development tree".

The branch, for-linus has been updated
  discards  65e3aa77f1b0269720660a6879f6f28d158f54c8 (commit)
  discards  4b05d09c18d9aa62d2e7fb4b057f54e5a38963f5 (commit)
  discards  9f87832a82923943aaab38b8d53658af134bbfa4 (commit)
  discards  f2a459565b02b60408f3f2e5ca992a031319712b (commit)
  discards  eb178619f930fa2ba2348de332a1ff1c66a31424 (commit)
  discards  d26978dd866dbb3b3a9690f3655a5e735055de89 (commit)
  discards  1bee12b8c44d825fb45cd6a13e76c185ed6888b8 (commit)
  discards  37f13561de6039b3a916d1510086030d097dea0f (commit)
  discards  ab7eac22008f044631c0a3f4be344ebc2cb0e266 (commit)
  discards  91e4bac0b72736410c88632906953f14259144b1 (commit)
  discards  2d0e9df579029b62adc72b50977182757cc04cd5 (commit)
  discards  0f22f9d0cd8a630b40a9ccc07a8844345b185aae (commit)
  discards  d44d9bc68e32ad5881b105f82bd259d261d1ef74 (commit)
  1e82379 xfs: xfs_bmap_add_attrfork_local is too generic
  fa5566e xfs: remove log force from xfs_buf_trylock()
  5337fe9 xfs: recheck buffer pinned status after push trylock failure
  a1e16c2 xfs: limit speculative prealloc size on sparse files
  311f08a xfs: memory barrier before wake_up_bit()
  a21cd50 xfs: refactor space log reservation for XFS_TRANS_ATTR_SET
  762c585 xfs: make use of XFS_SB_LOG_RES() at xfs_fs_log_dummy()
  5166ab0 xfs: make use of XFS_SB_LOG_RES() at xfs_mount_log_sb()
  e457274 xfs: make use of XFS_SB_LOG_RES() at xfs_log_sbcount()
  a7bd794 xfs: introduce XFS_SB_LOG_RES() for transactions that modify sb on disk
  762d7ba xfs: calculate XFS_TRANS_QM_QUOTAOFF_END space log reservation at mount time
  a1bd955 xfs: calculate XFS_TRANS_QM_QUOTAOFF space log reservation at mount time
  4800104 xfs: calculate XFS_TRANS_QM_DQALLOC space log reservation at mount time
  f0f2df9 xfs: calcuate XFS_TRANS_QM_SETQLIM space log reservation at mount time
  f910a8c xfs: calculate xfs_qm_write_sb_changes() space log reservation at mount time
  b0c10b98 xfs: calculate XFS_TRANS_QM_SBCHANGE space log reservation at mount time
  5b292ae xfs: make use of xfs_calc_buf_res() in xfs_trans.c
  4f3b578 xfs: add a helper to figure out the space log reservation per item
  2729423 xfs: Fix xfs_swap_extents() after removal of xfs_flushinval_pages()
  ced55f3 xfs: Fix possible use-after-free with AIO
  3b19034 xfs: fix shutdown hang on invalid inode during create
  4d559a3 xfs: limit speculative prealloc near ENOSPC thresholds
  10616b8 xfs: fix _xfs_buf_find oops on blocks beyond the filesystem end
  003fd6c xfs: fix fs/xfs/xfs_log.c:1740:39: error: 'B_TRUE' undeclared
  9e96fe6 xfs: pull up stack_switch check into xfs_bmapi_write
  667a929 xfs: Remove boolean_t typedef completely.
  aeb4f20 xfs: Do not return EFSCORRUPTED when filesystem probe finds no XFS magic
  a17164e fs/xfs remove obsolete simple_strto<foo>
  d460863 xfs: recalculate leaf entry pointer after compacting a dir2 block
  83a9ba0 xfs: don't zero structure members after a memset(0)
  f755503 xfs: remove int casts from debug dquot soft limit timer asserts
  ec47eb6 xfs remove the XFS_TRANS_DEBUG routines
  c883d0c xfs: fix the multi-segment log buffer format
  820a554 xfs: fix segment in xfs_buf_item_format_segment
  b943817 xfs: rename bli_format to avoid confusion with bli_formats
  f4b4242 xfs: use b_maps[] for discontiguous buffers
      from  65e3aa77f1b0269720660a6879f6f28d158f54c8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 1e82379b018ceed0f0912327c60d73107dacbcb3
Author: Dave Chinner <dchinner@xxxxxxxxxx>
Date:   Mon Feb 11 15:58:13 2013 +1100

    xfs: xfs_bmap_add_attrfork_local is too generic
    
    When we are converting local data to an extent format as a result of
    adding an attribute, the type of data contained in the local fork
    determines the behaviour that needs to occur.
    
    xfs_bmap_add_attrfork_local() already handles the directory data
    case specially by using S_ISDIR() and calling out to
    xfs_dir2_sf_to_block(), but with verifiers we now need to handle
    each different type of metadata specially and different metadata
    formats require different verifiers (and eventually block header
    initialisation).
    
    There is only a single place that we add and attribute fork to
    the inode, but that is in the attribute code and it knows nothing
    about the specific contents of the data fork. It is only the case of
    local data that is the issue here, so adding code to hadnle this
    case in the attribute specific code is wrong. Hence we are really
    stuck trying to detect the data fork contents in
    xfs_bmap_add_attrfork_local() and performing the correct callout
    there.
    
    Luckily the current cases can be determined by S_IS* macros, and we
    can push the work off to data specific callouts, but each of those
    callouts does a lot of work in common with
    xfs_bmap_local_to_extents(). The only reason that this fails for
    symlinks right now is is that xfs_bmap_local_to_extents() assumes
    the data fork contains extent data, and so attaches a a bmap extent
    data verifier to the buffer and simply copies the data fork
    information straight into it.
    
    To fix this, allow us to pass a "formatting" callback into
    xfs_bmap_local_to_extents() which is responsible for setting the
    buffer type, initialising it and copying the data fork contents over
    to the new buffer. This allows callers to specify how they want to
    format the new buffer (which is necessary for the upcoming CRC
    enabled metadata blocks) and hence make xfs_bmap_local_to_extents()
    useful for any type of data fork content.
    
    Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
    Reviewed-by: Mark Tinguely <tinguely@xxxxxxx>
    Signed-off-by: Ben Myers <bpm@xxxxxxx>

commit fa5566e4ffb918131a054413eb42075a77a41413
Author: Brian Foster <bfoster@xxxxxxxxxx>
Date:   Mon Feb 11 10:08:22 2013 -0500

    xfs: remove log force from xfs_buf_trylock()
    
    The trylock log force invoked via xfs_buf_item_push() can attempt
    to acquire xa_lock, thus leading to a recursion bug when called
    with xa_lock held.
    
    This log force was originally added to xfs_buf_trylock() to address
    xfsaild stalls due to pinned and stale buffers. Since the addition
    of this behavior, the log item pushing code had been reworked to
    detect and track pinned items to inform xfsaild to issue a log
    force itself when necessary. As such, the log force on trylock
    failure is redundant and safe to remove.
    
    Signed-off-by: Brian Foster <bfoster@xxxxxxxxxx>
    Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>
    Signed-off-by: Ben Myers <bpm@xxxxxxx>

commit 5337fe9b108d602c483fe9d62ffef9227acf3a74
Author: Brian Foster <bfoster@xxxxxxxxxx>
Date:   Mon Feb 11 10:08:21 2013 -0500

    xfs: recheck buffer pinned status after push trylock failure
    
    The buffer pinned check and trylock sequence in xfs_buf_item_push()
    can race with an active transaction on marking the buffer pinned.
    This can result in the buffer becoming pinned and stale after the
    initial check and the trylock failure, but before the check in
    xfs_buf_trylock() that issues a log force. If the log force is
    issued from this context, a spinlock recursion occurs on xa_lock.
    
    Prepare xfs_buf_item_push() to handle the race by detecting a
    pinned buffer after the trylock failure so xfsaild issues a log
    force from a safe context. This, along with various previous fixes,
    renders the log force in xfs_buf_trylock() redundant.
    
    Signed-off-by: Brian Foster <bfoster@xxxxxxxxxx>
    Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>
    Signed-off-by: Ben Myers <bpm@xxxxxxx>

commit a1e16c26660b301cc8423185924cf1b0b16ea92b
Author: Dave Chinner <dchinner@xxxxxxxxxx>
Date:   Mon Feb 11 16:05:01 2013 +1100

    xfs: limit speculative prealloc size on sparse files
    
    Speculative preallocation based on the current file size works well
    for contiguous files, but is sub-optimal for sparse files where the
    EOF preallocation can fill holes and result in large amounts of
    zeros being written when it is not necessary.
    
    The algorithm is modified to prevent EOF speculative preallocation
    from triggering larger allocations on IO patterns of
    truncate--to-zero-seek-write-seek-write-....  which results in
    non-sparse files for large files. This, unfortunately, is the way cp
    now behaves when copying sparse files and so needs to be fixed.
    
    What this code does is that it looks at the existing extent adjacent
    to the current EOF and if it determines that it is a hole we disable
    speculative preallocation altogether. To avoid the next write from
    doing a large prealloc, it takes the size of subsequent
    preallocations from the current size of the existing EOF extent.
    IOWs, if you leave a hole in the file, it resets preallocation
    behaviour to the same as if it was a zero size file.
    
    Example new behaviour:
    
    $ xfs_io -f -c "pwrite 0 31m" \
                -c "pwrite 33m 1m" \
                -c "pwrite 128m 1m" \
                -c "fiemap -v" /mnt/scratch/blah
    wrote 32505856/32505856 bytes at offset 0
    31 MiB, 7936 ops; 0.0000 sec (1.608 GiB/sec and 421432.7439 ops/sec)
    wrote 1048576/1048576 bytes at offset 34603008
    1 MiB, 256 ops; 0.0000 sec (1.462 GiB/sec and 383233.5329 ops/sec)
    wrote 1048576/1048576 bytes at offset 134217728
    1 MiB, 256 ops; 0.0000 sec (1.719 GiB/sec and 450704.2254 ops/sec)
    /mnt/scratch/blah:
     EXT: FILE-OFFSET      BLOCK-RANGE      TOTAL FLAGS
       0: [0..65535]:      96..65631        65536   0x0
       1: [65536..67583]:  hole              2048
       2: [67584..69631]:  67680..69727      2048   0x0
       3: [69632..262143]: hole             192512
       4: [262144..264191]: 262240..264287    2048   0x1
    
    Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
    Reviewed-by: Mark Tinguely <tinguely@xxxxxxx>
    Reviewed-by: Brian Foster <bfoster@xxxxxxxxxx>
    Signed-off-by: Ben Myers <bpm@xxxxxxx>

commit 311f08acde635e4e5ccea9b9d8c856cc2e0ced95
Author: Alex Elder <elder@xxxxxxxxxxx>
Date:   Mon Feb 4 10:13:11 2013 -0600

    xfs: memory barrier before wake_up_bit()
    
    In xfs_ifunlock() there is a call to wake_up_bit() after clearing
    the flush lock on the xfs inode.  This is not guaranteed to be safe,
    as noted in the comments above wake_up_bit() beginning with:
    
        In order for this to function properly, as it uses
        waitqueue_active() internally, some kind of memory
        barrier must be done prior to calling this.
    
    
    Signed-off-by: Alex Elder <elder@xxxxxxxxxxx>
    Reviewed-by: Dave Chinner <david@xxxxxxxxxxxxx>
    Signed-off-by: Ben Myers <bpm@xxxxxxx>

commit a21cd503678286c56b1d0cca1c99349a4aa042f4
Author: Jeff Liu <jeff.liu@xxxxxxxxxx>
Date:   Mon Jan 28 21:27:53 2013 +0800

    xfs: refactor space log reservation for XFS_TRANS_ATTR_SET
    
    Currently, we calculate the attribute set transaction
    log space reservation at runtime in two parts:
    
    1) XFS_ATTRSET_LOG_RES() which is calcuated out at mount time.
    
    2) ((ext * (mp)->m_sb.sb_sectsize) + \
        (ext * XFS_FSB_TO_B((mp), XFS_BM_MAXLEVELS(mp, XFS_ATTR_FORK))) + \
        (128 * (ext + (ext * XFS_BM_MAXLEVELS(mp, XFS_ATTR_FORK))))))
    which is calculated out at runtime since it depend on the given extent length in blocks.
    
    This patch renamed XFS_ATTRSET_LOG_RES(mp) to XFS_ATTRSETM_LOG_RES(mp) to indicate
    that it is figured out at mount time.  Introduce XFS_ATTRSETRT_LOG_RES(mp) which would
    be used to calculate out the unit of the log space reservation for one block.
    
    In this way, the total runtime space for the given extent length can be figured out by:
    XFS_ATTRSETM_LOG_RES(mp) + XFS_ATTRSETRT_LOG_RES(mp) * ext
    
    Signed-off-by: Jie Liu <jeff.liu@xxxxxxxxxx>
    CC: Dave Chinner <david@xxxxxxxxxxxxx>
    Reviewed-by: Mark Tinguely <tinguely@xxxxxxx>
    Signed-off-by: Ben Myers <bpm@xxxxxxx>

commit 762c585b187cde93bbb8cadd3cb3871bbae1b75a
Author: Jeff Liu <jeff.liu@xxxxxxxxxx>
Date:   Mon Jan 28 21:27:46 2013 +0800

    xfs: make use of XFS_SB_LOG_RES() at xfs_fs_log_dummy()
    
    Make use of XFS_SB_LOG_RES() at xfs_fs_log_dummy().
    
    Signed-off-by: Jie Liu <jeff.liu@xxxxxxxxxx>
    CC: Dave Chinner <david@xxxxxxxxxxxxx>
    Reviewed-by: Mark Tinguely <tinguely@xxxxxxx>
    Signed-off-by: Ben Myers <bpm@xxxxxxx>

commit 5166ab06558cfe4a3745252a91ad6b495ba49290
Author: Jeff Liu <jeff.liu@xxxxxxxxxx>
Date:   Mon Jan 28 21:27:39 2013 +0800

    xfs: make use of XFS_SB_LOG_RES() at xfs_mount_log_sb()
    
    Make use of XFS_SB_LOG_RES() at xfs_mount_log_sb().
    
    Signed-off-by: Jie Liu <jeff.liu@xxxxxxxxxx>
    CC: Dave Chinner <david@xxxxxxxxxxxxx>
    Reviewed-by: Mark Tinguely <tinguely@xxxxxxx>
    Signed-off-by: Ben Myers <bpm@xxxxxxx>

commit e457274b60a3e3046d9451a199826281ce92023d
Author: Jeff Liu <jeff.liu@xxxxxxxxxx>
Date:   Mon Jan 28 21:27:31 2013 +0800

    xfs: make use of XFS_SB_LOG_RES() at xfs_log_sbcount()
    
    Make use of XFS_SB_LOG_RES() at xfs_log_sbcount().
    
    Signed-off-by: Jie Liu <jeff.liu@xxxxxxxxxx>
    CC: Dave Chinner <david@xxxxxxxxxxxxx>
    Reviewed-by: Mark Tinguely <tinguely@xxxxxxx>
    Signed-off-by: Ben Myers <bpm@xxxxxxx>

commit a7bd794a0f489a66ad595f2bcab0eac8f232e409
Author: Jeff Liu <jeff.liu@xxxxxxxxxx>
Date:   Mon Jan 28 21:27:25 2013 +0800

    xfs: introduce XFS_SB_LOG_RES() for transactions that modify sb on disk
    
    Introduce a new transaction space reservation XFS_SB_LOG_RES() for
    those transactions that need to modify the superblock on disk.
    
    Signed-off-by: Jie Liu <jeff.liu@xxxxxxxxxx>
    CC: Dave Chinner <david@xxxxxxxxxxxxx>
    Reviewed-by: Mark Tinguely <tinguely@xxxxxxx>
    Signed-off-by: Ben Myers <bpm@xxxxxxx>

commit 762d7ba657ed4a0934b4da7dcef058012f252e0f
Author: Jeff Liu <jeff.liu@xxxxxxxxxx>
Date:   Mon Jan 28 21:27:21 2013 +0800

    xfs: calculate XFS_TRANS_QM_QUOTAOFF_END space log reservation at mount time
    
    Convert the calculation for end of quotaoff log space reservation
    from runtime to mount time.
    
    Signed-off-by: Jie Liu <jeff.liu@xxxxxxxxxx>
    CC: Dave Chinner <david@xxxxxxxxxxxxx>
    Reviewed-by: Mark Tinguely <tinguely@xxxxxxx>
    Signed-off-by: Ben Myers <bpm@xxxxxxx>

commit a1bd9557544d59140c4ac87fe405069b9e1aaf99
Author: Jeff Liu <jeff.liu@xxxxxxxxxx>
Date:   Mon Jan 28 21:27:15 2013 +0800

    xfs: calculate XFS_TRANS_QM_QUOTAOFF space log reservation at mount time
    
    Convert the calculation of quota off transaction log space reservation
    from runtime to mount time.
    
    Signed-off-by: Jie Liu <jeff.liu@xxxxxxxxxx>
    CC: Dave Chinner <david@xxxxxxxxxxxxx>
    Reviewed-by: Mark Tinguely <tinguely@xxxxxxx>
    Signed-off-by: Ben Myers <bpm@xxxxxxx>

commit 4800104438a4467ffa5ae1e51d5a59c0f64e5f9a
Author: Jeff Liu <jeff.liu@xxxxxxxxxx>
Date:   Mon Jan 28 21:27:04 2013 +0800

    xfs: calculate XFS_TRANS_QM_DQALLOC space log reservation at mount time
    
    The disk quota allocation log space reservation is calcuated at runtime,
    this patch does it at mount time.
    
    Signed-off-by: Jie Liu <jeff.liu@xxxxxxxxxx>
    CC: Dave Chinner <david@xxxxxxxxxxxxx>
    Reviewed-by: Mark Tinguely <tinguely@xxxxxxx>
    Signed-off-by: Ben Myers <bpm@xxxxxxx>

commit f0f2df94faca43fd26f85af7e83df240777c8c37
Author: Jeff Liu <jeff.liu@xxxxxxxxxx>
Date:   Mon Jan 28 21:26:49 2013 +0800

    xfs: calcuate XFS_TRANS_QM_SETQLIM space log reservation at mount time
    
    For adjusting quota limits transactions, we calculate out the log space
    reservation at runtime, this patch does it at mount time.
    
    Signed-off-by: Jie Liu <jeff.liu@xxxxxxxxxx>
    CC: Dave Chinner <david@xxxxxxxxxxxxx>
    Reviewed-by: Mark Tinguely <tinguely@xxxxxxx>
    Signed-off-by: Ben Myers <bpm@xxxxxxx>

commit f910a8c620e21fdb53384ad741ff9e4995cc6e67
Author: Jeff Liu <jeff.liu@xxxxxxxxxx>
Date:   Mon Jan 28 21:26:34 2013 +0800

    xfs: calculate xfs_qm_write_sb_changes() space log reservation at mount time
    
    For the transaction that write the incore superblock changes of quota flags
    to disk, it would reserve the same log space to clear/reset quota flags
    transaction, hence we can use XFS_TRANS_SBCHANGE_LOG_RES() for it as well.
    
    Signed-off-by: Jie Liu <jeff.liu@xxxxxxxxxx>
    CC: Dave Chinner <david@xxxxxxxxxxxxx>
    Reviewed-by: Mark Tinguely <tinguely@xxxxxxx>
    Signed-off-by: Ben Myers <bpm@xxxxxxx>

commit b0c10b983a3e5cc35f239999df1b8bad1ba5b8f6
Author: Jeff Liu <jeff.liu@xxxxxxxxxx>
Date:   Mon Jan 28 21:26:16 2013 +0800

    xfs: calculate XFS_TRANS_QM_SBCHANGE space log reservation at mount time
    
    The transaction log space for clearing/reseting the quota flags
    is calculated out at runtime, this patch can figure it out at
    mount time.
    
    Signed-off-by: Jie Liu <jeff.liu@xxxxxxxxxx>
    CC: Dave Chinner <david@xxxxxxxxxxxxx>
    Reviewed-by: Mark Tinguely <tinguely@xxxxxxx>
    Signed-off-by: Ben Myers <bpm@xxxxxxx>

commit 5b292ae3a951a58e32119d73c7ac8f5bec7395a3
Author: Jeff Liu <jeff.liu@xxxxxxxxxx>
Date:   Fri Feb 1 14:39:29 2013 -0600

    xfs: make use of xfs_calc_buf_res() in xfs_trans.c
    
    Refining the existing reservations with xfs_calc_buf_res() in xfs_trans.c
    
    Signed-off-by: Jie Liu <jeff.liu@xxxxxxxxxx>
    CC: Dave Chinner <david@xxxxxxxxxxxxx>
    Reviewed-by: Mark Tinguely <tinguely@xxxxxxx>
    Signed-off-by: Ben Myers <bpm@xxxxxxx>

commit 4f3b57832ba39223c6f8823d07b9fb206e282ced
Author: Jeff Liu <jeff.liu@xxxxxxxxxx>
Date:   Mon Jan 28 21:25:35 2013 +0800

    xfs: add a helper to figure out the space log reservation per item
    
    Add a new helper xfs_calc_buf_res() to calcuate out the transaction space
    reservations per item.  xfs_buf_log_overhead() is used to figure out the
    extra space for struct xfs_buf_log_format that gets written into the log
    for every buffer as well as a log opheader, i.e. struct xlog_op_header.
    
    Signed-off-by: Jie Liu <jeff.liu@xxxxxxxxxx>
    CC: Dave Chinner <david@xxxxxxxxxxxxx>
    Reviewed-by: Mark Tinguely <tinguely@xxxxxxx>
    Signed-off-by: Ben Myers <bpm@xxxxxxx>

commit 2729423cf2ef3ac51d040f24a5ddd84c1b2acc70
Author: Torsten Kaiser <just.for.lkml@xxxxxxxxxxxxxx>
Date:   Sun Jan 20 10:24:49 2013 +0100

    xfs: Fix xfs_swap_extents() after removal of xfs_flushinval_pages()
    
    Commit fb59581404ab7ec5075299065c22cb211a9262a9 removed
    xfs_flushinval_pages() and changed its callers to use
    filemap_write_and_wait() and  truncate_pagecache_range() directly.
    
    But in xfs_swap_extents() this change accidental switched the argument
    for 'tip' to 'ip'. This patch switches it back to 'tip'
    
    Signed-off-by: Torsten Kaiser <just.for.lkml@xxxxxxxxxxxxxx>
    Reviewed-by: Ben Myers <bpm@xxxxxxx>
    Signed-off-by: Ben Myers <bpm@xxxxxxx>

commit ced55f38d6bde7c10a14ea51c2edcd51a98575e3
Author: Jan Kara <jack@xxxxxxx>
Date:   Wed Jan 23 13:56:18 2013 +0100

    xfs: Fix possible use-after-free with AIO
    
    Running AIO is pinning inode in memory using file reference. Once AIO
    is completed using aio_complete(), file reference is put and inode can
    be freed from memory. So we have to be sure that calling aio_complete()
    is the last thing we do with the inode.
    
    CC: xfs@xxxxxxxxxxx
    CC: Ben Myers <bpm@xxxxxxx>
    CC: stable@xxxxxxxxxxxxxxx
    Signed-off-by: Jan Kara <jack@xxxxxxx>
    Reviewed-by: Ben Myers <bpm@xxxxxxx>
    Signed-off-by: Ben Myers <bpm@xxxxxxx>

commit 3b19034d4f4554e39ca244fb28962bbf2ccba046
Author: Dave Chinner <dchinner@xxxxxxxxxx>
Date:   Mon Jan 21 23:53:55 2013 +1100

    xfs: fix shutdown hang on invalid inode during create
    
    When the new inode verify in xfs_iread() fails, the create
    transaction is aborted and a shutdown occurs. The subsequent unmount
    then hangs in xfs_wait_buftarg() on a buffer that has an elevated
    hold count. Debug showed that it was an AGI buffer getting stuck:
    
    [   22.576147] XFS (vdb): buffer 0x2/0x1, hold 0x2 stuck
    [   22.976213] XFS (vdb): buffer 0x2/0x1, hold 0x2 stuck
    [   23.376206] XFS (vdb): buffer 0x2/0x1, hold 0x2 stuck
    [   23.776325] XFS (vdb): buffer 0x2/0x1, hold 0x2 stuck
    
    The trace of this buffer leading up to the shutdown (trimmed for
    brevity) looks like:
    
    xfs_buf_init:        bno 0x2 nblks 0x1 hold 1 caller xfs_buf_get_map
    xfs_buf_get:         bno 0x2 len 0x200 hold 1 caller xfs_buf_read_map
    xfs_buf_read:        bno 0x2 len 0x200 hold 1 caller xfs_trans_read_buf_map
    xfs_buf_iorequest:   bno 0x2 nblks 0x1 hold 1 caller _xfs_buf_read
    xfs_buf_hold:        bno 0x2 nblks 0x1 hold 1 caller xfs_buf_iorequest
    xfs_buf_rele:        bno 0x2 nblks 0x1 hold 2 caller xfs_buf_iorequest
    xfs_buf_iowait:      bno 0x2 nblks 0x1 hold 1 caller _xfs_buf_read
    xfs_buf_ioerror:     bno 0x2 len 0x200 hold 1 caller xfs_buf_bio_end_io
    xfs_buf_iodone:      bno 0x2 nblks 0x1 hold 1 caller _xfs_buf_ioend
    xfs_buf_iowait_done: bno 0x2 nblks 0x1 hold 1 caller _xfs_buf_read
    xfs_buf_hold:        bno 0x2 nblks 0x1 hold 1 caller xfs_buf_item_init
    xfs_trans_read_buf:  bno 0x2 len 0x200 hold 2 recur 0 refcount 1
    xfs_trans_brelse:    bno 0x2 len 0x200 hold 2 recur 0 refcount 1
    xfs_buf_item_relse:  bno 0x2 nblks 0x1 hold 2 caller xfs_trans_brelse
    xfs_buf_rele:        bno 0x2 nblks 0x1 hold 2 caller xfs_buf_item_relse
    xfs_buf_unlock:      bno 0x2 nblks 0x1 hold 1 caller xfs_trans_brelse
    xfs_buf_rele:        bno 0x2 nblks 0x1 hold 1 caller xfs_trans_brelse
    xfs_buf_trylock:     bno 0x2 nblks 0x1 hold 2 caller _xfs_buf_find
    xfs_buf_find:        bno 0x2 len 0x200 hold 2 caller xfs_buf_get_map
    xfs_buf_get:         bno 0x2 len 0x200 hold 2 caller xfs_buf_read_map
    xfs_buf_read:        bno 0x2 len 0x200 hold 2 caller xfs_trans_read_buf_map
    xfs_buf_hold:        bno 0x2 nblks 0x1 hold 2 caller xfs_buf_item_init
    xfs_trans_read_buf:  bno 0x2 len 0x200 hold 3 recur 0 refcount 1
    xfs_trans_log_buf:   bno 0x2 len 0x200 hold 3 recur 0 refcount 1
    xfs_buf_item_unlock: bno 0x2 len 0x200 hold 3 flags DIRTY liflags ABORTED
    xfs_buf_unlock:      bno 0x2 nblks 0x1 hold 3 caller xfs_buf_item_unlock
    xfs_buf_rele:        bno 0x2 nblks 0x1 hold 3 caller xfs_buf_item_unlock
    
    And that is the AGI buffer from cold cache read into memory to
    transaction abort. You can see at transaction abort the bli is dirty
    and only has a single reference. The item is not pinned, and it's
    not in the AIL. Hence the only reference to it is this transaction.
    
    The problem is that the xfs_buf_item_unlock() call is dropping the
    last reference to the xfs_buf_log_item attached to the buffer (which
    holds a reference to the buffer), but it is not freeing the
    xfs_buf_log_item. Hence nothing will ever release the buffer, and
    the unmount hangs waiting for this reference to go away.
    
    The fix is simple - xfs_buf_item_unlock needs to detect the last
    reference going away in this case and free the xfs_buf_log_item to
    release the reference it holds on the buffer.
    
    Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
    Reviewed-by: Ben Myers <bpm@xxxxxxx>
    Signed-off-by: Ben Myers <bpm@xxxxxxx>

commit 4d559a3bcb7383f34334092af07e68fb60910684
Author: Dave Chinner <dchinner@xxxxxxxxxx>
Date:   Mon Jan 21 23:53:54 2013 +1100

    xfs: limit speculative prealloc near ENOSPC thresholds
    
    There is a window on small filesytsems where specualtive
    preallocation can be larger than that ENOSPC throttling thresholds,
    resulting in specualtive preallocation trying to reserve more space
    than there is space available. This causes immediate ENOSPC to be
    triggered, prealloc to be turned off and flushing to occur. One the
    next write (i.e. next 4k page), we do exactly the same thing, and so
    effective drive into synchronous 4k writes by triggering ENOSPC
    flushing on every page while in the window between the prealloc size
    and the ENOSPC prealloc throttle threshold.
    
    Fix this by checking to see if the prealloc size would consume all
    free space, and throttle it appropriately to avoid premature
    ENOSPC...
    
    Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
    Reviewed-by: Brian Foster <bfoster@xxxxxxxxxx>
    Signed-off-by: Ben Myers <bpm@xxxxxxx>

commit 10616b806d1d7835b1d23b8d75ef638f92cb98b6
Author: Dave Chinner <dchinner@xxxxxxxxxx>
Date:   Mon Jan 21 23:53:52 2013 +1100

    xfs: fix _xfs_buf_find oops on blocks beyond the filesystem end
    
    When _xfs_buf_find is passed an out of range address, it will fail
    to find a relevant struct xfs_perag and oops with a null
    dereference. This can happen when trying to walk a filesystem with a
    metadata inode that has a partially corrupted extent map (i.e. the
    block number returned is corrupt, but is otherwise intact) and we
    try to read from the corrupted block address.
    
    In this case, just fail the lookup. If it is readahead being issued,
    it will simply not be done, but if it is real read that fails we
    will get an error being reported.  Ideally this case should result
    in an EFSCORRUPTED error being reported, but we cannot return an
    error through xfs_buf_read() or xfs_buf_get() so this lookup failure
    may result in ENOMEM or EIO errors being reported instead.
    
    Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
    Reviewed-by: Brian Foster <bfoster@xxxxxxxxxx>
    Reviewed-by: Ben Myers <bpm@xxxxxxx>
    Signed-off-by: Ben Myers <bpm@xxxxxxx>

commit 003fd6c8be14a348c56cb1d171605ab13fca906f
Author: Ben Myers <bpm@xxxxxxx>
Date:   Fri Jan 18 14:17:46 2013 -0600

    xfs: fix fs/xfs/xfs_log.c:1740:39: error: 'B_TRUE' undeclared
    
    Commit 667a9291c5b3 "xfs: Remove boolean_t typedef completely." didn't.
    
    Remove a stray B_TRUE that breaks CONFIG_XFS_DEBUG=y.
    
    Signed-off-by: Ben Myers <bpm@xxxxxxx>
    Reported-by: Wu Fengguang <fengguang.wu@xxxxxxxxx>
    Reviewed-by: Mark Tinguely <tinguely@xxxxxxx>

commit 9e96fe6df44425b69ed89f6ac20352cec1f127d7
Author: Brian Foster <bfoster@xxxxxxxxxx>
Date:   Thu Jan 17 13:11:29 2013 -0500

    xfs: pull up stack_switch check into xfs_bmapi_write
    
    The stack_switch check currently occurs in __xfs_bmapi_allocate,
    which means the stack switch only occurs when xfs_bmapi_allocate()
    is called in a loop. Pull the check up before the loop in
    xfs_bmapi_write() such that the first iteration of the loop has
    consistent behavior.
    
    Signed-off-by: Brian Foster <bfoster@xxxxxxxxxx>
    Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>
    Signed-off-by: Ben Myers <bpm@xxxxxxx>

commit 667a9291c5b38318a47a2df730bc064e5d37d2a8
Author: Thiago Farina <tfarina@xxxxxxxxxxxx>
Date:   Mon Nov 12 21:32:59 2012 -0200

    xfs: Remove boolean_t typedef completely.
    
    Since we are using C99 we have one builtin defined in include/linux/types.h,
    use that instead.
    
    v2: you missed one in fs/xfs/xfs_qm_bhv.c, cleaned up. -bpm
    
    Signed-off-by: Thiago Farina <tfarina@xxxxxxxxxxxx>
    Reviewed-by: Ben Myers <bpm@xxxxxxx>
    Signed-off-by: Ben Myers <bpm@xxxxxxx>

commit aeb4f20a02b4c984c48995ad54f40caf5ffa0705
Author: Eric Sandeen <sandeen@xxxxxxxxxx>
Date:   Wed Jan 16 17:33:53 2013 -0600

    xfs: Do not return EFSCORRUPTED when filesystem probe finds no XFS magic
    
    9802182 changed the return value from EWRONGFS (aka EINVAL)
    to EFSCORRUPTED which doesn't seem to be handled properly by
    the root filesystem probe.
    
    Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
    Tested-by: Sergei Trofimovich <slyfox@xxxxxxxxxx>
    Reviewed-by: Ben Myers <bpm@xxxxxxx>
    Signed-off-by: Ben Myers <bpm@xxxxxxx>

commit a17164e54bf0e3c2cbc72c35b9f67c2873a122dd
Author: Abhijit Pawar <abhi.c.pawar@xxxxxxxxx>
Date:   Wed Jan 9 19:34:42 2013 +0530

    fs/xfs remove obsolete simple_strto<foo>
    
    This patch replaces usages of obsolete simple_strtoul with kstrtoint in
    xfs_args and suffix_strtoul.
    
    Signed-off-by: Abhijit Pawar <abhi.c.pawar@xxxxxxxxx>
    Reviewed-by: Jie Liu <jeff.liu@xxxxxxxxxx>
    Signed-off-by: Ben Myers <bpm@xxxxxxx>

commit d4608632ec8f4ae3ffecdd343ede34e60eabc64f
Author: Eric Sandeen <sandeen@xxxxxxxxxx>
Date:   Thu Jan 10 10:41:48 2013 -0600

    xfs: recalculate leaf entry pointer after compacting a dir2 block
    
    Dave Jones hit this assert when doing a compile on recent git, with
    CONFIG_XFS_DEBUG enabled:
    
    XFS: Assertion failed: (char *)dup - (char *)hdr == be16_to_cpu(*xfs_dir2_data_unused_tag_p(dup)), file: fs/xfs/xfs_dir2_data.c, line: 828
    
    Upon further digging, the tag found by xfs_dir2_data_unused_tag_p(dup)
    contained "2" and not the proper offset, and I found that this value was
    changed after the memmoves under "Use a stale leaf for our new entry."
    in xfs_dir2_block_addname(), i.e.
    
                            memmove(&blp[mid + 1], &blp[mid],
                                    (highstale - mid) * sizeof(*blp));
    
    overwrote it.
    
    What has happened is that the previous call to xfs_dir2_block_compact()
    has rearranged things; it changes btp->count as well as the
    blp array.  So after we make that call, we must recalculate the
    proper pointer to the leaf entries by making another call to
    xfs_dir2_block_leaf_p().
    
    Dave provided a metadump image which led to a simple reproducer
    (create a particular filename in the affected directory) and this
    resolves the testcase as well as the bug on his live system.
    
    Thanks also to dchinner for looking at this one with me.
    
    Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
    Tested-by: Dave Jones <davej@xxxxxxxxxx>
    Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>
    Reviewed-by: Mark Tinguely <tinguely@xxxxxxx>
    Signed-off-by: Ben Myers <bpm@xxxxxxx>

commit 83a9ba00573904953c58565226f1d3bab9f10983
Author: Eric Sandeen <sandeen@xxxxxxxxxx>
Date:   Mon Dec 10 14:49:15 2012 -0600

    xfs: don't zero structure members after a memset(0)
    
    Commit 408cc4e97a3ccd172d2d676e4b585badf439271b
    added memset(0, ...) to allocation args structures,
    so there is no need to explicitly set any of the fields
    to 0 after that.
    
    Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
    Reviewed-by: Mark Tinguely <tinguely@xxxxxxx>
    Signed-off-by: Ben Myers <bpm@xxxxxxx>

commit f755503206ef705c20db622637d80a3e1b94a6f5
Author: Brian Foster <bfoster@xxxxxxxxxx>
Date:   Fri Dec 21 10:45:17 2012 -0500

    xfs: remove int casts from debug dquot soft limit timer asserts
    
    The int casts here make it easy to trigger an assert with a large
    soft limit. For example, set a >4TB soft limit on an empty volume
    to reproduce a (0 > -x) comparison due to an overflow of
    d_blk_softlimit.
    
    Signed-off-by: Brian Foster <bfoster@xxxxxxxxxx>
    Reviewed-by: Ben Myers <bpm@xxxxxxx>
    Signed-off-by: Ben Myers <bpm@xxxxxxx>

commit ec47eb6b0b450a4e82340b6de674104de3f0dc0a
Author: Mark Tinguely <tinguely@xxxxxxx>
Date:   Tue Dec 4 17:18:06 2012 -0600

    xfs remove the XFS_TRANS_DEBUG routines
    
    Remove the XFS_TRANS_DEBUG routines. They are no longer appropriate
    and have not been used in years
    
    Signed-off-by: Mark Tinguely <tinguely@xxxxxxx>
    Reviewed-by: Christoph Hellwig <hch@xxxxxx>
    Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>
    Signed-off-by: Ben Myers <bpm@xxxxxxx>

commit c883d0c400fc8cdbd5bbe71e179c9e64ace58e86
Author: Mark Tinguely <tinguely@xxxxxxx>
Date:   Tue Dec 4 17:18:05 2012 -0600

    xfs: fix the multi-segment log buffer format
    
    Per Dave Chinner suggestion, this patch:
     1) Corrects the detection of whether a multi-segment buffer is
        still tracking data.
     2) Clears all the buffer log formats for a multi-segment buffer.
    
    Signed-off-by: Mark Tinguely <tinguely@xxxxxxx>
    Reviewed-by: Christoph Hellwig <hch@xxxxxx>
    Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>
    Signed-off-by: Ben Myers <bpm@xxxxxxx>

commit 820a554f2f83d21f7e9e608377c8c86af70917bd
Author: Mark Tinguely <tinguely@xxxxxxx>
Date:   Tue Dec 4 17:18:04 2012 -0600

    xfs: fix segment in xfs_buf_item_format_segment
    
    Not every segment in a multi-segment buffer is dirty in a
    transaction and they will not be outputted. The assert in
    xfs_buf_item_format_segment() that checks for the at least
    one chunk of data in the segment to be used is not necessary
    true for multi-segmented buffers.
    
    Signed-off-by: Mark Tinguely <tinguely@xxxxxxx>
    Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>
    Signed-off-by: Ben Myers <bpm@xxxxxxx>

commit b94381737e9c4d014a4003e8ece9ba88670a2dd4
Author: Mark Tinguely <tinguely@xxxxxxx>
Date:   Tue Dec 4 17:18:03 2012 -0600

    xfs: rename bli_format to avoid confusion with bli_formats
    
    Rename the bli_format structure to __bli_format to avoid
    accidently confusing them with the bli_formats pointer.
    
    Signed-off-by: Mark Tinguely <tinguely@xxxxxxx>
    Reviewed-by: Christoph Hellwig <hch@xxxxxx>
    Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>
    Signed-off-by: Ben Myers <bpm@xxxxxxx>

commit f4b42421d80cac4291dd82bd97baa1bc06b351fc
Author: Mark Tinguely <tinguely@xxxxxxx>
Date:   Tue Dec 4 17:18:02 2012 -0600

    xfs: use b_maps[] for discontiguous buffers
    
    Commits starting at 77c1a08 introduced a multiple segment support
    to xfs_buf. xfs_trans_buf_item_match() could not find a multi-segment
    buffer in the transaction because it was looking at the single segment
    block number rather than the multi-segment b_maps[0].bm.bn. This
    results on a recursive buffer lock that can never be satisfied.
    
    This patch:
     1) Changed the remaining b_map accesses to be b_maps[0] accesses.
     2) Renames the single segment b_map structure to __b_map to avoid
        future confusion.
    
    Signed-off-by: Mark Tinguely <tinguely@xxxxxxx>
    Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>
    Reviewed-by: Christoph Hellwig <hch@xxxxxx>
    Signed-off-by: Ben Myers <bpm@xxxxxxx>

-----------------------------------------------------------------------

Summary of changes:
 fs/xfs/xfs_alloc.c       |   2 -
 fs/xfs/xfs_attr.c        |   9 +-
 fs/xfs/xfs_bmap.c        | 118 +++++++++++----
 fs/xfs/xfs_buf.c         |   2 -
 fs/xfs/xfs_buf_item.c    | 118 ++-------------
 fs/xfs/xfs_buf_item.h    |  14 --
 fs/xfs/xfs_dquot.c       |  12 +-
 fs/xfs/xfs_fsops.c       |   4 +-
 fs/xfs/xfs_ialloc.c      |   4 -
 fs/xfs/xfs_inode.c       |   6 -
 fs/xfs/xfs_inode.h       |   1 +
 fs/xfs/xfs_inode_item.c  |  16 --
 fs/xfs/xfs_inode_item.h  |   4 -
 fs/xfs/xfs_iomap.c       |  77 ++++++++--
 fs/xfs/xfs_log.c         |  10 +-
 fs/xfs/xfs_mount.c       |  12 +-
 fs/xfs/xfs_mount.h       |   9 +-
 fs/xfs/xfs_qm.c          |   7 +-
 fs/xfs/xfs_qm_bhv.c      |   2 +-
 fs/xfs/xfs_qm_syscalls.c |  28 ++--
 fs/xfs/xfs_super.c       |  29 ++--
 fs/xfs/xfs_trans.c       | 376 ++++++++++++++++++++++++++++++-----------------
 fs/xfs/xfs_trans.h       |  18 ++-
 fs/xfs/xfs_trans_ail.c   |  14 --
 fs/xfs/xfs_trans_dquot.c |  10 +-
 fs/xfs/xfs_trans_inode.c |  41 ------
 fs/xfs/xfs_types.h       |   1 -
 fs/xfs/xfs_vnodeops.c    |  12 +-
 28 files changed, 503 insertions(+), 453 deletions(-)


hooks/post-receive
-- 
XFS development tree

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux