]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs_scrub: tread zero-length read verify as an IO error
authorDarrick J. Wong <djwong@kernel.org>
Thu, 21 Nov 2024 00:24:17 +0000 (16:24 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 24 Dec 2024 02:01:26 +0000 (18:01 -0800)
commita6e089903f2f58fe1ff86390d5f699e8244a6d2c
tree307d39f6a67092f51d73ca76856973c0ffcd47dd
parentb480672f1fa1911f7b0e0b38a0e58925313b8919
xfs_scrub: tread zero-length read verify as an IO error

While doing some chaos testing on the xfs_scrub read verify code, I
noticed that if the device under a live filesystem gets resized while
scrub is running a media scan, reads will start returning 0.  This
causes read_verify() to run around in an infinite loop instead of
erroring out like it should.

Cc: <linux-xfs@vger.kernel.org> # v5.3.0
Fixes: 27464242956fac ("xfs_scrub: fix read verify disk error handling strategy")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
scrub/phase6.c
scrub/read_verify.c