fix a DEBUG-only assert failure in xfs/538 v5

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

 



Hi all,

when testing with very small rtgroups I've seen relatively frequent
failures in xfs/538 where an assert about the da block type triggers
that should be entirely impossible to trigger by the expected code
flow.

It turns out for this two things had to come together:  a bug in the
attr code to uses ENOSPC to signal a condition that is not related
to run out free blocks, but which can also be triggered when we
actually run out of free blocks, and a debug in the DEBUG only
xfs_bmap_exact_minlen_extent_alloc allocator trigger only by the
specific error injection used in this and a few other tests.

This series tries to fix both issues and clean up the surrounding
code a bit to make it more obvious.

Changes since v4:
 - pack struct xfs_alloc_arg more tightly

Changes since v3:
 - fix compile for !DEBUG again by making sure the minlen error
   injection code is always compiled and then eliminated by the
   compiler

Changes since v2:
 - add back a missing -ENOSPC return from xfs_attr_node_try_addname
 - add another patch to fix potential -ENOSPC confusing from
   xfs_attr_node_try_addname

Changes since v1:
 - fix build for !DEBUG builds
 - improve a comment
 - fix a comment typo

Diffstat;
 xfs_alloc.c     |    7 --
 xfs_alloc.h     |    2 
 xfs_attr.c      |  190 +++++++++++++++++++++++---------------------------------
 xfs_attr_leaf.c |   40 ++++++-----
 xfs_attr_leaf.h |    2 
 xfs_bmap.c      |  140 ++++++++++++-----------------------------
 xfs_da_btree.c  |    5 -
 7 files changed, 153 insertions(+), 233 deletions(-)




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux