aboutsummaryrefslogtreecommitdiff
path: root/lib/test-string_helpers.c
diff options
context:
space:
mode:
authorBrian Foster <[email protected]>2017-10-17 14:16:28 -0700
committerDarrick J. Wong <[email protected]>2017-10-26 15:38:22 -0700
commita53efbd5c6802e07b64aa767bb932da6913470c8 (patch)
tree921df8467f362c0722b0113eb8adbb857853b961 /lib/test-string_helpers.c
parent0bd89676c4fed53b003025bc4a5200861ac5d8ef (diff)
xfs: fail if xattr inactivation hits a hole
The child buffer read in xfs_attr3_node_inactive() should never reach a hole in the attr fork. If this occurs, it is likely due to a bug. Prior to commit cd87d867 ("xfs: don't crash on unexpected holes in dir/attr btrees"), this would result in a crash. Now that the crash has been fixed, this is a silent failure. Pass -1 to xfs_da3_node_read() from xfs_da3_node_inactive() to indicate that reading from a hole is an error. This logs an error to syslog and fails the inode inactivation, leaving the inode on the AG unlinked list until removed by xfs_repair (or log recovery). Also update the subsequent code to reflect that the read now returns a non-NULL buffer or an error. Signed-off-by: Brian Foster <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]>
Diffstat (limited to 'lib/test-string_helpers.c')
0 files changed, 0 insertions, 0 deletions