Commit 3ec9a4c8 authored by Josef Bacik's avatar Josef Bacik Committed by David Sterba
Browse files

btrfs: run delayed iputs before committing

Delayed iputs means we can have final iputs of deleted inodes in the
queue, which could potentially generate a lot of pinned space that could
be free'd.  So before we decide to commit the transaction for ENOPSC
reasons, run the delayed iputs so that any potential space is free'd up.
If there is and we freed enough we can then commit the transaction and
potentially be able to make our reservation.
Reviewed-by: default avatarOmar Sandoval <>
Signed-off-by: default avatarJosef Bacik <>
Signed-off-by: default avatarDavid Sterba <>
parent 74d5d229
......@@ -4952,6 +4952,15 @@ static void flush_space(struct btrfs_fs_info *fs_info,
ret = 0;
* If we have pending delayed iputs then we could free up a
* bunch of pinned space, so make sure we run the iputs before
* we do our pinned bytes check below.
ret = may_commit_transaction(fs_info, space_info);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment