diff options
| author | Daniel Linjama <daniel@dev.linjama.com> | 2026-09-16 09:15:56 +0300 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2026-09-16 15:56:10 +0200 |
| commit | 76bf149cd0298544631e756670b89c399c7acbca (patch) | |
| tree | 2fa2a14a1456d0a3f05bce4fe3b4b59341ed90bc /tools/perf/scripts/python | |
| parent | cc337324cc6be1ce0ae7e5a068dcb7e99ae1b59c (diff) | |
| download | linux-next-76bf149cd0298544631e756670b89c399c7acbca.tar.gz linux-next-76bf149cd0298544631e756670b89c399c7acbca.zip | |
btrfs: handle lack of space when cleaning up verity items
When enable_verity() hits the qgroup limit, rollback_verity() needs its
own metadata reservation. When the qgroup limit or lack of space refuses
the rollback, the whole filesystem is forced read-only even though the
qgroup limit was for one subvolume only. Also orphan cleanup at the next
mount fails the same way, so the leftover items are never removed: with
-EDQUOT the subvolume stays unreachable, and with -ENOSPC on a full
filesystem the next read-write mount fails.
Start transactions with btrfs_start_transaction_fallback_global_rsv() in
btrfs_orphan_cleanup(), drop_verity_items() and rollback_verity(). Those
calls only delete items and free the space in the end, so they may use
the global reserve and skip the qgroup limit, which avoids -ENOSPC and
-EDQUOT.
Fixes: 146054090b08 ("btrfs: initial fsverity support")
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Daniel Linjama <daniel@dev.linjama.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
