btrfs-progs/tests/misc-tests
Boris Burkov 2336a7b921 btrfs-progs: btrfstune: add ability to remove squotas
When simple quotas is enabled, every new data extent gets a special
inline OWNER_REF item that identifies the owning subvolume. This makes
simple quotas backwards incompatible with kernels older than v6.7. Even
if you disable quotas on the filesystem, the OWNER_REF items are
sprinkled throughout the extent tree and older kernels are unable to
parse them.

However, it is relatively easy to simply walk the extent tree and remove
these inline ref items. This gives squota adopters the option to *fully*
disable squotas on their system and un-set the incompat bit. Add this
capability to btrfstune, which requires only a little tricky btrfs item
data shifting.

This functionality was tested with a new unit test, as well as a similar
but more thorough integration test in fstests

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Boris Burkov <boris@bur.io>
2025-01-06 14:19:28 +01:00
..
001-btrfstune-features btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
002-uuid-rewrite btrfs-progs: tests: update or fix shell script coding style 2024-06-24 19:18:08 +02:00
003-zero-log btrfs-progs: tests: update or fix shell script coding style 2024-06-24 19:18:08 +02:00
004-shrink-fs btrfs-progs: tests: do not use async discard for misc/004 2024-06-24 19:17:45 +02:00
005-convert-progress-thread-crash btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
006-image-on-missing-device btrfs-progs: ci: wait for loop devices before mount 2023-11-03 18:04:37 +01:00
007-subvolume-sync btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
008-leaf-crossing-stripes btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
009-subvolume-sync-must-wait btrfs-progs: tests: update or fix shell script coding style 2024-06-24 19:18:08 +02:00
010-convert-delete-ext2-subvol btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
011-delete-missing-device btrfs-progs: tests: update or fix shell script coding style 2024-06-24 19:18:08 +02:00
012-find-root-no-result btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
013-subvolume-sync-crash btrfs-progs: tests: update or fix shell script coding style 2024-06-24 19:18:08 +02:00
014-filesystem-label btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
015-dump-super-garbage btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
016-send-clone-src btrfs-progs: tests: update or fix shell script coding style 2024-06-24 19:18:08 +02:00
017-recv-stream-malformatted btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
018-recv-end-of-stream btrfs-progs: tests: update or fix shell script coding style 2024-06-24 19:18:08 +02:00
019-receive-clones-on-mounted-subvol btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
020-fix-superblock-corruption btrfs-progs: tests: update or fix shell script coding style 2024-06-24 19:18:08 +02:00
021-image-multi-devices btrfs-progs: ci: wait for loop devices before mount 2023-11-03 18:04:37 +01:00
022-filesystem-du-on-empty-subvol btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
023-device-usage-with-missing-device btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
024-inspect-internal-rootid btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
025-zstd-compression btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
026-image-non-printable-chars btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
027-subvol-list-deleted-toplevel btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
028-superblock-recover btrfs-progs: tests: update or fix shell script coding style 2024-06-24 19:18:08 +02:00
029-send-p-different-mountpoints btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
030-missing-device-image btrfs-progs: tests: update or fix shell script coding style 2024-06-24 19:18:08 +02:00
031-qgroup-parent-child-relation btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
032-bad-item-ptr btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
033-filename-length-limit btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
034-metadata-uuid btrfs-progs: tests: update or fix shell script coding style 2024-06-24 19:18:08 +02:00
035-receive-common-mount-point-prefix btrfs-progs: ci: wait for loop devices before mount 2023-11-03 18:04:37 +01:00
036-receive-dump-invalid-stream btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
037-fi-show-on-new-file btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
038-backup-root-corruption btrfs-progs: tests: update or fix shell script coding style 2024-06-24 19:18:08 +02:00
039-receive-clone-from-current-subvolume btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
040-subvolume-delete-default btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
041-subvolume-delete-during-send btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
042-inspect-internal-logical-resolve btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
043-subvolume-set-default-toplevel btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
045-receive-check-mount-type btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
046-seed-multi-mount btrfs-progs: tests: update or fix shell script coding style 2024-06-24 19:18:08 +02:00
047-raid5-convert btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
048-image-restore-mount btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
049-btrfstune-transid-mismatch btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
050-receive-prop-ro-to-rw btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
051-warning-rw-subvol-received-uuid btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
052-seed-dirty-log btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
053-receive-write-encoded btrfs-progs: tests: update or fix shell script coding style 2024-06-24 19:18:08 +02:00
054-receive-dump-newlines btrfs-progs: tests: update misc/054 to test escaping of clone and xattrs 2024-06-24 19:18:58 +02:00
055-qgroup-clear-stale btrfs-progs: tests: always wait for subvolume cleaning before clear-stale 2024-06-24 19:18:19 +02:00
056-subvolume-list-uuid btrfs-progs: tests: add protection against running out of test suite 2023-04-25 16:59:41 +02:00
057-btrfstune-free-space-tree btrfs-progs: tests: check for btrfs ACL support 2023-07-26 14:59:10 +02:00
058-replace-start-enqueue btrfs-progs: tests: misc/058: reduce the space requirement and speed up the test 2023-08-23 19:36:31 +02:00
059-qgroup-show-stale-qgroup-crash btrfs-progs: tests: update or fix shell script coding style 2024-06-24 19:18:08 +02:00
060-ino-cache-clean btrfs-progs: tests: update or fix shell script coding style 2024-06-24 19:18:08 +02:00
062-fi-show-raw-dm-all-devices btrfs-progs: tests: verify filesystem show on a raw device mapper path 2024-01-31 11:07:57 +01:00
063-btrfstune-zoned-bgt btrfs-progs: tests: update or fix shell script coding style 2024-06-24 19:18:08 +02:00
064-csum-conversion-basic btrfs-progs: tests: add test case for basic checksum conversion 2024-06-24 19:19:35 +02:00
064-reverse-receive btrfs-progs: receive: cannot find clone source subvol when receiving in reverse direction 2024-08-14 23:59:44 +02:00
065-btrfstune-simple-quota btrfs-progs: btrfstune: add ability to remove squotas 2025-01-06 14:19:28 +01:00
065-csum-conversion-inject btrfs-progs: tests: add a basic resume test using error injection 2024-07-30 19:58:11 +02:00
065-image-filename btrfs-progs: tests: add a test case for filename sanitization 2024-07-30 19:58:43 +02:00