linux-stable/fs/xfs/scrub
Dave Chinner a44a027a8b Merge tag 'large-extent-counters-v9' of https://github.com/chandanr/linux into xfs-5.19-for-next
xfs: Large extent counters

The commit xfs: fix inode fork extent count overflow
(3f8a4f1d87) mentions that 10 billion
data fork extents should be possible to create. However the
corresponding on-disk field has a signed 32-bit type. Hence this
patchset extends the per-inode data fork extent counter to 64 bits
(out of which 48 bits are used to store the extent count).

Also, XFS has an attribute fork extent counter which is 16 bits
wide. A workload that,
1. Creates 1 million 255-byte sized xattrs,
2. Deletes 50% of these xattrs in an alternating manner,
3. Tries to insert 400,000 new 255-byte sized xattrs
   causes the xattr extent counter to overflow.

Dave tells me that there are instances where a single file has more
than 100 million hardlinks. With parent pointers being stored in
xattrs, we will overflow the signed 16-bits wide attribute extent
counter when large number of hardlinks are created. Hence this
patchset extends the on-disk field to 32-bits.

The following changes are made to accomplish this,
1. A 64-bit inode field is carved out of existing di_pad and
   di_flushiter fields to hold the 64-bit data fork extent counter.
2. The existing 32-bit inode data fork extent counter will be used to
   hold the attribute fork extent counter.
3. A new incompat superblock flag to prevent older kernels from mounting
   the filesystem.

Signed-off-by: Chandan Babu R <chandan.babu@oracle.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
2022-04-21 16:46:17 +10:00
..
agheader.c xfs: fix online fsck handling of v5 feature bits on secondary supers 2022-01-12 09:45:21 -08:00
agheader_repair.c xfs: fix online fsck handling of v5 feature bits on secondary supers 2022-01-12 09:45:21 -08:00
alloc.c xfs: mark the record passed into xchk_btree functions as const 2021-08-18 18:46:01 -07:00
attr.c xfs: replace xfs_sb_version checks with feature flag checks 2021-08-19 10:07:12 -07:00
attr.h treewide: Replace zero-length arrays with flexible-array members 2022-02-17 07:00:39 -06:00
bitmap.c xfs: prepare xfs_btree_cur for dynamic cursor heights 2021-10-19 11:45:14 -07:00
bitmap.h xfs: replace open-coded bitmap weight logic 2020-03-18 08:12:23 -07:00
bmap.c xfs: Define max extent length based on on-disk format definition 2022-04-11 04:11:17 +00:00
btree.c xfs: prepare xfs_btree_cur for dynamic cursor heights 2021-10-19 11:45:14 -07:00
btree.h xfs: dynamically allocate btree scrub context structure 2021-10-19 11:45:14 -07:00
common.c xfs: convert bp->b_bn references to xfs_buf_daddr() 2021-08-19 10:07:15 -07:00
common.h xfs: grab active perag ref when reading AG headers 2021-08-09 11:13:17 -07:00
dabtree.c xfs: don't allocate scrub contexts on the stack 2021-10-14 09:19:32 -07:00
dabtree.h xfs: refactor btree node scrubbing 2019-11-10 16:54:19 -08:00
dir.c xfs: fix a bug in the online fsck directory leaf1 bestcount check 2021-12-21 09:49:41 -08:00
fscounters.c xfs: fix perag structure refcounting error when scrub fails 2021-08-20 13:20:33 -07:00
health.c xfs: move xfs_perag_get/put to xfs_ag.[ch] 2021-06-02 10:48:24 +10:00
health.h xfs: scrub should only cross-reference with healthy btrees 2019-04-16 10:01:57 -07:00
ialloc.c xfs: replace xfs_sb_version checks with feature flag checks 2021-08-19 10:07:12 -07:00
inode.c xfs: Introduce xfs_dfork_nextents() helper 2022-04-11 04:11:18 +00:00
parent.c xfs: get rid of the ip parameter to xchk_setup_* 2021-04-09 10:27:18 -07:00
quota.c xfs: fix quotaoff mutex usage now that we don't support disabling it 2021-12-21 09:49:41 -08:00
refcount.c xfs: mark the record passed into xchk_btree functions as const 2021-08-18 18:46:01 -07:00
repair.c xfs: fix quotaoff mutex usage now that we don't support disabling it 2021-12-21 09:49:41 -08:00
repair.h xfs: stricter btree height checking when scanning for btree roots 2021-10-14 09:19:32 -07:00
rmap.c xfs: mark the record passed into xchk_btree functions as const 2021-08-18 18:46:01 -07:00
rtbitmap.c xfs: pass explicit mount pointer to rtalloc query functions 2022-04-12 06:49:41 +10:00
scrub.c xfs: fix quotaoff mutex usage now that we don't support disabling it 2021-12-21 09:49:41 -08:00
scrub.h xfs: fix quotaoff mutex usage now that we don't support disabling it 2021-12-21 09:49:41 -08:00
symlink.c xfs: remove XFS_IFINLINE 2021-04-15 09:35:51 -07:00
trace.c xfs: prepare xfs_btree_cur for dynamic cursor heights 2021-10-19 11:45:14 -07:00
trace.h xfs: prepare xfs_btree_cur for dynamic cursor heights 2021-10-19 11:45:14 -07:00
xfs_scrub.h xfs: fix scrub and remount-ro protection when running scrub 2021-04-09 10:27:13 -07:00