linux-next/fs/xfs/scrub
Darrick J. Wong c004a793e0 xfs: fix zero byte checking in the superblock scrubber
The logic to check that the region past the end of the superblock is all
zeroes is wrong -- we don't want to check only the bytes past the end of
the maximally sized ondisk superblock structure as currently defined in
xfs_format.h; we want to check the bytes beyond the end of the ondisk as
defined by the feature bits.

Port the superblock size logic from xfs_repair and then put it to use in
xfs_scrub.

Cc: <stable@vger.kernel.org> # v4.15
Fixes: 21fb4cb198 ("xfs: scrub the secondary superblocks")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2024-12-12 17:45:13 -08:00
..
agb_bitmap.c xfs: move the per-AG datatype bitmaps to separate files 2023-12-15 10:03:30 -08:00
agb_bitmap.h xfs: create agblock bitmap helper to count the number of set regions 2024-02-22 12:43:37 -08:00
agheader_repair.c xfs: return a 64-bit block count from xfs_btree_count_blocks 2024-12-12 17:45:09 -08:00
agheader.c xfs: fix zero byte checking in the superblock scrubber 2024-12-12 17:45:13 -08:00
agino_bitmap.h xfs: repair AGI unlinked inode bucket lists 2024-04-15 14:58:58 -07:00
alloc_repair.c xfs: convert busy extent tracking to the generic group structure 2024-11-05 13:38:29 -08:00
alloc.c xfs: add a generic group pointer to the btree cursor 2024-11-05 13:38:29 -08:00
attr_repair.c xfs: exchange-range for repairs is no longer dynamic 2024-04-23 16:55:19 -07:00
attr_repair.h xfs: actually rebuild the parent pointer xattrs 2024-04-23 16:55:15 -07:00
attr.c xfs: add a per-leaf block callback to xchk_xattr_walk 2024-04-23 16:55:15 -07:00
attr.h xfs: repair extended attributes 2024-04-15 14:58:53 -07:00
bitmap.c xfs: fix sparse warnings about unused interval tree functions 2024-04-22 12:51:43 +05:30
bitmap.h xfs: create agblock bitmap helper to count the number of set regions 2024-02-22 12:43:37 -08:00
bmap_repair.c xfs: add a generic group pointer to the btree cursor 2024-11-05 13:38:29 -08:00
bmap.c xfs: don't coalesce file mappings that cross rtgroup boundaries in scrub 2024-11-05 13:38:42 -08:00
btree.c xfs: consolidate btree block verification 2024-02-22 12:40:57 -08:00
btree.h overflow: Add struct_size_t() helper 2023-05-26 13:52:19 -07:00
common.c xfs: add rtgroup-based realtime scrubbing context management 2024-11-05 13:38:36 -08:00
common.h xfs: scrub the realtime group superblock 2024-11-05 13:38:43 -08:00
cow_repair.c xfs: add a generic group pointer to the btree cursor 2024-11-05 13:38:29 -08:00
dab_bitmap.h xfs: create an xattr iteration function for scrub 2024-04-15 14:58:54 -07:00
dabtree.c xfs: scrub should set preen if attr leaf has holes 2024-04-15 14:58:54 -07:00
dabtree.h xfs: flag empty xattr leaf blocks for optimization 2024-04-15 14:58:54 -07:00
dir_repair.c xfs: confirm dotdot target before replacing it during a repair 2024-11-05 13:38:34 -08:00
dir.c xfs: scrub metadata directories 2024-11-05 13:38:34 -08:00
dirtree_repair.c xfs: fix corruptions in the directory tree 2024-04-23 16:55:17 -07:00
dirtree.c xfs: scrub metadata directories 2024-11-05 13:38:34 -08:00
dirtree.h xfs: refactor directory tree root predicates 2024-11-05 13:38:33 -08:00
dqiterate.c xfs: improve dquot iteration for scrub 2023-12-15 10:03:45 -08:00
findparent.c xfs: scrub metadata directories 2024-11-05 13:38:34 -08:00
findparent.h xfs: implement live updates for directory repairs 2024-04-23 16:55:13 -07:00
fsb_bitmap.h xfs: reintroduce reaping of file metadata blocks to xrep_reap_extents 2023-12-15 10:03:38 -08:00
fscounters_repair.c xfs: add frextents to the lazysbcounters when rtgroups enabled 2024-11-05 13:38:40 -08:00
fscounters.c xfs: return a 64-bit block count from xfs_btree_count_blocks 2024-12-12 17:45:09 -08:00
fscounters.h xfs: support RT inodes in xfs_mod_delalloc 2024-04-22 18:00:48 +05:30
health.c xfs: separate healthy clearing mask during repair 2024-12-12 17:45:09 -08:00
health.h xfs: refactor the btree cursor allocation logic in xchk_ag_btcur_init 2024-02-22 12:39:48 -08:00
ialloc_repair.c xfs: factor out a generic xfs_group structure 2024-11-05 13:38:27 -08:00
ialloc.c xfs: return a 64-bit block count from xfs_btree_count_blocks 2024-12-12 17:45:09 -08:00
ino_bitmap.h xfs: teach online scrub to find directory tree structure problems 2024-04-23 16:55:16 -07:00
inode_repair.c xfs: fix di_metatype field of inodes that won't load 2024-11-05 13:38:34 -08:00
inode.c xfs: fix di_metatype field of inodes that won't load 2024-11-05 13:38:34 -08:00
iscan.c xfs: factor out a generic xfs_group structure 2024-11-05 13:38:27 -08:00
iscan.h xfs: scan the filesystem to repair a directory dotdot entry 2024-04-15 14:58:56 -07:00
listxattr.c xfs: add a per-leaf block callback to xchk_xattr_walk 2024-04-23 16:55:15 -07:00
listxattr.h xfs: add a per-leaf block callback to xchk_xattr_walk 2024-04-23 16:55:15 -07:00
metapath.c xfs: keep quota directory inode loaded 2024-12-12 17:45:08 -08:00
newbt.c xfs: factor out a generic xfs_group structure 2024-11-05 13:38:27 -08:00
newbt.h xfs: repair the rmapbt 2024-02-22 12:43:38 -08:00
nlinks_repair.c xfs: refactor directory tree root predicates 2024-11-05 13:38:33 -08:00
nlinks.c xfs: refactor directory tree root predicates 2024-11-05 13:38:33 -08:00
nlinks.h xfs: move files to orphanage instead of letting nlinks drop to zero 2024-04-15 14:58:57 -07:00
off_bitmap.h xfs: repair problems in CoW forks 2023-12-15 10:03:40 -08:00
orphanage.c xfs: refactor directory tree root predicates 2024-11-05 13:38:33 -08:00
orphanage.h xfs: fix corruptions in the directory tree 2024-04-23 16:55:17 -07:00
parent_repair.c xfs: adjust parent pointer scrubber for sb-rooted metadata files 2024-11-05 13:38:33 -08:00
parent.c xfs: scrub metadata directories 2024-11-05 13:38:34 -08:00
quota_repair.c xfs: Remove header files which are included more than once 2024-07-01 09:32:29 +05:30
quota.c xfs: repair quotas 2023-12-15 10:03:45 -08:00
quota.h xfs: repair quotas 2023-12-15 10:03:45 -08:00
quotacheck_repair.c xfs: repair dquots based on live quotacheck results 2024-02-22 12:30:57 -08:00
quotacheck.c xfs: do not count metadata directory files when doing online quotacheck 2024-11-05 13:38:33 -08:00
quotacheck.h xfs: repair dquots based on live quotacheck results 2024-02-22 12:30:57 -08:00
rcbag_btree.c xfs: create refcount bag structure for btree repairs 2024-02-22 12:43:41 -08:00
rcbag_btree.h xfs: create refcount bag structure for btree repairs 2024-02-22 12:43:41 -08:00
rcbag.c xfs: create refcount bag structure for btree repairs 2024-02-22 12:43:41 -08:00
rcbag.h xfs: create refcount bag structure for btree repairs 2024-02-22 12:43:41 -08:00
readdir.c xfs: refactor dir format helpers 2024-04-26 11:21:46 +05:30
readdir.h xfs: deferred scrub of dirents 2024-04-23 07:47:02 -07:00
reap.c xfs: convert busy extent tracking to the generic group structure 2024-11-05 13:38:29 -08:00
reap.h xfs: add the ability to reap entire inode forks 2024-04-15 14:58:49 -07:00
refcount_repair.c xfs: rename metadata inode predicates 2024-11-05 13:38:30 -08:00
refcount.c xfs: return a 64-bit block count from xfs_btree_count_blocks 2024-12-12 17:45:09 -08:00
repair.c xfs: move the min and max group block numbers to xfs_group 2024-11-05 13:38:44 -08:00
repair.h xfs: repair realtime group superblock 2024-11-05 13:38:43 -08:00
rgsuper.c xfs: repair realtime group superblock 2024-11-05 13:38:43 -08:00
rmap_repair.c xfs: add a generic group pointer to the btree cursor 2024-11-05 13:38:29 -08:00
rmap.c xfs: add a generic group pointer to the btree cursor 2024-11-05 13:38:29 -08:00
rtbitmap_repair.c xfs: fix error returns from xfs_bmapi_write 2024-04-30 09:45:18 +05:30
rtbitmap.c xfs: make RT extent numbers relative to the rtgroup 2024-11-05 13:38:38 -08:00
rtbitmap.h xfs: online repair of realtime bitmaps 2023-12-15 10:03:43 -08:00
rtsummary_repair.c xfs: add block headers to realtime bitmap and summary blocks 2024-11-05 13:38:40 -08:00
rtsummary.c xfs: encode the rtsummary in big endian format 2024-11-05 13:38:41 -08:00
rtsummary.h xfs: replace m_rsumsize with m_rsumblocks 2024-09-01 08:58:19 -07:00
scrub.c xfs: repair realtime group superblock 2024-11-05 13:38:43 -08:00
scrub.h xfs: separate healthy clearing mask during repair 2024-12-12 17:45:09 -08:00
stats.c xfs: scrub the realtime group superblock 2024-11-05 13:38:43 -08:00
stats.h xfs: track usage statistics of online fsck 2023-08-10 07:48:07 -07:00
symlink_repair.c xfs: set XFS_SICK_INO_SYMLINK_ZAPPED explicitly when zapping a symlink 2024-12-12 17:45:09 -08:00
symlink.c xfs: online repair of symbolic links 2024-04-15 14:58:58 -07:00
tempexch.h xfs: exchange-range for repairs is no longer dynamic 2024-04-23 16:55:19 -07:00
tempfile.c xfs: don't move nondir/nonreg temporary repair files to the metadir namespace 2024-12-12 17:45:12 -08:00
tempfile.h xfs: move repair temporary files to the metadata directory tree 2024-11-05 13:38:34 -08:00
trace.c xfs: check metadata directory file path connectivity 2024-11-05 13:38:34 -08:00
trace.h xfs: fix scrub tracepoints when inode-rooted btrees are involved 2024-12-12 17:45:10 -08:00
xfarray.c xfs: drop xfarray sortinfo folio on error 2024-05-27 15:55:52 +05:30
xfarray.h xfs: reduce the rate of cond_resched calls inside scrub 2024-04-23 16:55:17 -07:00
xfblob.c xfs: repair extended attributes 2024-04-15 14:58:53 -07:00
xfblob.h xfs: online repair of directories 2024-04-15 14:58:55 -07:00
xfile.c mm,tmpfs: consider end of file write in shmem_is_huge 2024-09-09 16:39:12 -07:00
xfile.h xfs: repair extended attributes 2024-04-15 14:58:53 -07:00
xfs_scrub.h xfs: introduce vectored scrub mode 2024-04-23 16:55:18 -07:00