diff options
| author | Johannes Thumshirn <johannes.thumshirn@wdc.com> | 2026-07-23 17:54:27 +0200 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2026-08-07 19:17:18 +0200 |
| commit | 7636e0b45c1d358388fe66728299bb5d45d544aa (patch) | |
| tree | f7a57d263874737ead4ba0c135eeb6eb87f9cb8a /scripts/Makefile.thinlto | |
| parent | 3cbcc099b4d42667ea8c6b10d28f6060c104048c (diff) | |
| download | linux-stable-7636e0b45c1d358388fe66728299bb5d45d544aa.tar.gz linux-stable-7636e0b45c1d358388fe66728299bb5d45d544aa.zip | |
btrfs: zoned: drop stranded dirty metadata buffers at unmount
On a zoned filesystem a freed tree block is kept dirty and flagged
EXTENT_BUFFER_ZONED_ZEROOUT so a later writeback zeroes it out and
advances the zone write pointer. Unsynced tree-log updates (e.g. from
rename or link) leave such buffers behind when the log is freed at
commit, and across log generations they can end up ahead of the write
pointer behind a hole, so btree_writepages() can never write them.
During normal operation the space is later reclaimed by a zone reset; at
unmount it is not, and the buffers survive to the final iput() of the
btree inode, which hangs in folio_wait_writeback() once the endio
workqueues are stopped.
They cannot be written back from where they are freed (free_log_tree(),
inside the committing transaction) without deadlocking against that
commit, and they are stale anyway, not referenced by the committed
superblock. Drop their dirty state in close_ctree(), before
btrfs_stop_all_workers().
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
