Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* [PATCH 0/2] Btrfs: fixes for an ENOSPC issue that left a fs unusable
@ 2015-11-13 15:20 fdmanana
  2015-11-13 15:20 ` [PATCH 1/2] Btrfs: use global reserve when deleting unused block group after ENOSPC fdmanana
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: fdmanana @ 2015-11-13 15:20 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Filipe Manana

From: Filipe Manana <fdmanana@suse.com>

The following pair of changes fix an issue observed in a production
environment where any file operations done by a package manager failed
with ENOSPC. Forcing a commit of the current transaction (through "sync")
didn't help, a balance operation with the filters -dusage=0 didn't help
either and the issue persisted even after rebooting the machine. There
were many data blocks groups that were unused, but they weren't getting
deleted by the cleaner kthread because whenever it tried to start a
transaction to delete a block group it got -ENOSPC error, which it silently
ignores (as it does for any other error).

So these just make sure we fallback to use the global reserve, if -ENOSPC
is encountered through the standard allocation path, to delete block groups
as we do already for inode unlink operations. Another issue fixed is hitting
a BUG_ON() when removing a block group due to -ENSPC failure when creating
the orphan item for its free space cache inode. This second issue has
been reported by a few users in the mailing list and bugzilla (for example
at http://www.spinics.net/lists/linux-btrfs/msg46070.html).

These changes are also available at:
http://git.kernel.org/cgit/linux/kernel/git/fdmanana/linux.git/log/?h=integration-4.4

Thanks.

Filipe Manana (2):
  Btrfs: use global reserve when deleting unused block group after
    ENOSPC
  Btrfs: fix the number of transaction units needed to remove a block
    group

 fs/btrfs/ctree.h       |  2 ++
 fs/btrfs/extent-tree.c | 27 +++++++++++++++++++++++++--
 fs/btrfs/inode.c       | 24 +-----------------------
 fs/btrfs/transaction.c | 32 ++++++++++++++++++++++++++++++++
 fs/btrfs/transaction.h |  4 ++++
 fs/btrfs/volumes.c     |  2 +-
 6 files changed, 65 insertions(+), 26 deletions(-)

-- 
2.1.3


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-11-14  9:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-13 15:20 [PATCH 0/2] Btrfs: fixes for an ENOSPC issue that left a fs unusable fdmanana
2015-11-13 15:20 ` [PATCH 1/2] Btrfs: use global reserve when deleting unused block group after ENOSPC fdmanana
2015-11-13 15:20 ` [PATCH 2/2] Btrfs: fix the number of transaction units needed to remove a block group fdmanana
2015-11-13 17:33 ` [PATCH 0/2] Btrfs: fixes for an ENOSPC issue that left a fs unusable Chris Mason
2015-11-13 23:57 ` [PATCH v2 " fdmanana
2015-11-13 23:57   ` [PATCH v2 1/2] Btrfs: use global reserve when deleting unused block group after ENOSPC fdmanana
2015-11-13 23:57   ` [PATCH v2 2/2] Btrfs: fix the number of transaction units needed to remove a block group fdmanana

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox