All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10] Btrfs: orphan and truncate fixes
@ 2018-05-10  6:21 Omar Sandoval
  2018-05-10  6:21 ` [PATCH 01/10] Btrfs: remove stale comment referencing vmtruncate() Omar Sandoval
                   ` (9 more replies)
  0 siblings, 10 replies; 20+ messages in thread
From: Omar Sandoval @ 2018-05-10  6:21 UTC (permalink / raw)
  To: linux-btrfs; +Cc: kernel-team, Chris Mason, Josef Bacik

From: Omar Sandoval <osandov@fb.com>

Hi,

At Facebook we hit an early ENOSPC issue which we tracked down to the
reservations for orphan items of deleted-but-still-open files. The
primary function of this series is to fix that bug, but I ended up
uncovering a pile of other issues in the process, most notably that the
orphan items we create for truncate are useless. Patch 1 is a cosmetic
comment fix. Patches 2 and 3 are error handling fixes in truncate. Patch
4 gets rid of the useless truncate orphan items. Patches 5 and 6 are
fixes related to orphan items. Patch 7 is a prep patch for patch 8.
Patch 8 is the ENOSPC fix. Patch 9 is a followup cleanup for patch 8,
separated out to make it easier to see the functional changes in patch
8. Patch 10 is another orphan item fix, this time for O_TMPFILE.

I've also posted an xfstest that reproduces this bug.

Thanks!

Omar Sandoval (10):
  Btrfs: remove stale comment referencing vmtruncate()
  Btrfs: fix error handling in btrfs_truncate_inode_items()
  Btrfs: don't BUG_ON() in btrfs_truncate_inode_items()
  Btrfs: stop creating orphan items for truncate
  Btrfs: don't release reserve or decrement orphan count if orphan item
    already existed
  Btrfs: don't return ino if inode item removal fails
  Btrfs: refactor btrfs_evict_inode() reserve refill dance
  Btrfs: fix ENOSPC caused by orphan items reservations
  Btrfs: get rid of unused orphan infrastructure
  Btrfs: reserve space for O_TMPFILE orphan item deletion

 fs/btrfs/btrfs_inode.h      |  19 +-
 fs/btrfs/ctree.h            |   5 -
 fs/btrfs/disk-io.c          |   8 -
 fs/btrfs/extent-tree.c      |  38 ---
 fs/btrfs/free-space-cache.c |   6 +-
 fs/btrfs/inode.c            | 519 ++++++++++++------------------------
 6 files changed, 181 insertions(+), 414 deletions(-)

-- 
2.17.0


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

end of thread, other threads:[~2018-05-10 23:25 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-10  6:21 [PATCH 00/10] Btrfs: orphan and truncate fixes Omar Sandoval
2018-05-10  6:21 ` [PATCH 01/10] Btrfs: remove stale comment referencing vmtruncate() Omar Sandoval
2018-05-10  6:21 ` [PATCH 02/10] Btrfs: fix error handling in btrfs_truncate_inode_items() Omar Sandoval
2018-05-10  8:09   ` Nikolay Borisov
2018-05-10  6:21 ` [PATCH 03/10] Btrfs: don't BUG_ON() " Omar Sandoval
2018-05-10  8:10   ` Nikolay Borisov
2018-05-10  6:21 ` [PATCH 04/10] Btrfs: stop creating orphan items for truncate Omar Sandoval
2018-05-10  6:21 ` [PATCH 05/10] Btrfs: don't release reserve or decrement orphan count if orphan item already existed Omar Sandoval
2018-05-10  8:23   ` Nikolay Borisov
2018-05-10  6:21 ` [PATCH 06/10] Btrfs: don't return ino if inode item removal fails Omar Sandoval
2018-05-10  8:29   ` Nikolay Borisov
2018-05-10 21:44     ` Omar Sandoval
2018-05-10  6:21 ` [PATCH 07/10] Btrfs: refactor btrfs_evict_inode() reserve refill dance Omar Sandoval
2018-05-10  8:35   ` Nikolay Borisov
2018-05-10  6:21 ` [PATCH 08/10] Btrfs: fix ENOSPC caused by orphan items reservations Omar Sandoval
2018-05-10  8:50   ` Nikolay Borisov
2018-05-10 23:25     ` Omar Sandoval
2018-05-10  6:21 ` [PATCH 09/10] Btrfs: get rid of unused orphan infrastructure Omar Sandoval
2018-05-10  6:21 ` [PATCH 10/10] Btrfs: reserve space for O_TMPFILE orphan item deletion Omar Sandoval
2018-05-10 15:25   ` Filipe Manana

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.