diff options
author | Omar Sandoval <osandov@fb.com> | 2018-05-11 22:13:37 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-05-28 18:23:54 +0200 |
commit | 27919067f182c35f825406ad76a0e2e5644d33af (patch) | |
tree | bcdc9176cd2c5ef3760846c28b21dd900c14b744 /fs/btrfs/disk-io.c | |
parent | Btrfs: refactor btrfs_evict_inode() reserve refill dance (diff) | |
download | linux-27919067f182c35f825406ad76a0e2e5644d33af.tar.xz linux-27919067f182c35f825406ad76a0e2e5644d33af.zip |
Btrfs: fix ENOSPC caused by orphan items reservations
Currently, we keep space reserved for all inode orphan items until the
inode is evicted (i.e., all references to it are dropped). We hit an
issue where an application would keep a bunch of deleted files open (by
design) and thus keep a large amount of space reserved, causing ENOSPC
errors when other operations tried to reserve space. This long-standing
reservation isn't absolutely necessary for a couple of reasons:
- We can almost always make the reservation we need or steal from the
global reserve for the orphan item
- If we can't, it's not the end of the world if we drop the orphan item
on the floor and let the next mount clean it up
So, get rid of persistent reservation and just reserve space in
btrfs_evict_inode().
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
0 files changed, 0 insertions, 0 deletions