mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-23 07:23:12 +02:00
btrfs: run delayed iputs when flushing delalloc
commit 2d34472610 upstream.
We have transient failures with btrfs/301, specifically in the part
where we do
for i in $(seq 0 10); do
write 50m to file
rm -f file
done
Sometimes this will result in a transient quota error, and it's because
sometimes we start writeback on the file which results in a delayed
iput, and thus the rm doesn't actually clean the file up. When we're
flushing the quota space we need to run the delayed iputs to make sure
all the unlinks that we think have completed have actually completed.
This removes the small window where we could fail to find enough space
in our quota.
CC: stable@vger.kernel.org # 5.15+
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
da6a85d197
commit
19c8fce75d
|
|
@ -3677,6 +3677,8 @@ static int try_flush_qgroup(struct btrfs_root *root)
|
|||
return 0;
|
||||
}
|
||||
|
||||
btrfs_run_delayed_iputs(root->fs_info);
|
||||
btrfs_wait_on_delayed_iputs(root->fs_info);
|
||||
ret = btrfs_start_delalloc_snapshot(root, true);
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user