Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

xfs: check that used blocks are smaller than the write pointer

Any used block must have been written, this reject used blocks > write
pointer.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>

authored by

Christoph Hellwig and committed by
Carlos Maiolino
b37c1e4e 19c5b605

+7
+7
fs/xfs/xfs_zone_alloc.c
··· 1033 1033 return -EFSCORRUPTED; 1034 1034 } 1035 1035 1036 + if (used > write_pointer) { 1037 + xfs_warn(mp, 1038 + "zone %u has used counter (0x%x) larger than write pointer (0x%x).", 1039 + rtg_rgno(rtg), used, write_pointer); 1040 + return -EFSCORRUPTED; 1041 + } 1042 + 1036 1043 if (write_pointer == 0 && used != 0) { 1037 1044 xfs_warn(mp, "empty zone %u has non-zero used counter (0x%x).", 1038 1045 rtg_rgno(rtg), used);