Skip to content

xfs: add missing cursor status check after btree ops

Eric Sandeen linux-xfs 1 version Applied

Status from this message: Applied to for-next, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2xfs: add missing cursor status check after xfs_get_recfs/xfs/libxfs/xfs_ialloc.c+5 -03 replies
2/2xfs: add missing cursor stat checks after xfs_btree_deletefs/xfs/libxfs/xfs_ialloc.c+22 -52 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchDarrick J. WongChristoph Hellwig
1/2R-b R-b R-b
2/2R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] xfs: add missing cursor status check after btree ops

I've been looking at ways to reduce/eliminate the frequency of the:

	if (XFS_IS_CORRUPT(mp, i != 1)) {
		xfs_btree_mark_sick(cnt_cur);
		return -EFSCORRUPTED;
	}

idiom scattered all over the tree, and in doing so I realized we have a few spots that probably /should/ have this checked but don't. Sending these first to ease backporting if needed, though what they should actually get for Fixes: isn't very clear to me as this error handling has evolved over time I think.

I did run these through xfstests but I can't guarantee the change was tested in any targeted way, so it's mostly inspection.

After these I'll send a series that floats the idea of removing this idiom completely from btree insert/delete type fns because "stat" is never different from "error" in practice, but that's a story for another day and I need to do a bit more testing first.

Thanks,
-Eric