Message ID | 173888086259.2738568.15642483253868951064.stgit@frogsfrogsfrogs (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Series | [01/17] libxfs: unmap xmbuf pages to avoid disaster | expand |
On Thu, Feb 06, 2025 at 02:34:04PM -0800, Darrick J. Wong wrote: > From: Darrick J. Wong <djwong@kernel.org> > > If bulkstat doesn't return an error code or any bulkstat records, we've > hit the end of the filesystem, so return early. This can happen if the > inumbers data came from the very last inobt record in the filesystem and > every inode in that inobt record is freed immediately after INUMBERS. > There's no bug here, it's just a minor optimization. Looks good: Reviewed-by: Christoph Hellwig <hch@lst.de>
diff --git a/scrub/inodes.c b/scrub/inodes.c index 4d3ec07b2d9862..3b9026ce8fa2f4 100644 --- a/scrub/inodes.c +++ b/scrub/inodes.c @@ -65,7 +65,9 @@ bulkstat_for_inumbers( /* First we try regular bulkstat, for speed. */ breq->hdr.ino = inumbers->xi_startino; - xfrog_bulkstat(&ctx->mnt, breq); + error = -xfrog_bulkstat(&ctx->mnt, breq); + if (!error && !breq->hdr.ocount) + return; /* * Bulkstat might return inodes beyond xi_startino + CHUNKSIZE. Reduce