diff options
| author | Filipe Manana <[email protected]> | 2025-06-20 14:54:05 +0000 |
|---|---|---|
| committer | David Sterba <[email protected]> | 2025-06-27 17:57:47 +0000 |
| commit | c466e33e729a0ee017d10d919cba18f503853c60 (patch) | |
| tree | 3e5195d5a6abd31fa4a3dd2975974f3754540598 /drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | |
| parent | btrfs: record new subvolume in parent dir earlier to avoid dir logging races (diff) | |
| download | kernel-c466e33e729a0ee017d10d919cba18f503853c60.tar.gz kernel-c466e33e729a0ee017d10d919cba18f503853c60.zip | |
btrfs: propagate last_unlink_trans earlier when doing a rmdir
In case the removed directory had a snapshot that was deleted, we are
propagating its inode's last_unlink_trans to the parent directory after
we removed the entry from the parent directory. This leaves a small race
window where someone can log the parent directory after we removed the
entry and before we updated last_unlink_trans, and as a result if we ever
try to replay such a log tree, we will fail since we will attempt to
remove a snapshot during log replay, which is currently not possible and
results in the log replay (and mount) to fail. This is the type of failure
described in commit 1ec9a1ae1e30 ("Btrfs: fix unreplayable log after
snapshot delete + parent dir fsync").
So fix this by propagating the last_unlink_trans to the parent directory
before we remove the entry from it.
Fixes: 44f714dae50a ("Btrfs: improve performance on fsync against new inode after rename/unlink")
Reviewed-by: Johannes Thumshirn <[email protected]>
Signed-off-by: Filipe Manana <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c')
0 files changed, 0 insertions, 0 deletions
