linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 00/11] Btrfs: orphan and truncate fixes
@ 2018-05-11  7:56 Omar Sandoval
  2018-05-11  7:56 ` [PATCH v3 01/11] Btrfs: remove stale comment referencing vmtruncate() Omar Sandoval
                   ` (10 more replies)
  0 siblings, 11 replies; 24+ messages in thread
From: Omar Sandoval @ 2018-05-11  7:56 UTC (permalink / raw)
  To: linux-btrfs; +Cc: kernel-team, Chris Mason, Josef Bacik, Nikolay Borisov

From: Omar Sandoval <osandov@fb.com>

Hi,

This is v3 of the fixes for the orphan item early ENOSPC issue we hit at
Facebook. The big change is that I now also got rid of
BTRFS_INODE_HAS_ORPHAN_ITEM (thanks, Nikolay) and shuffled the patches
around so there is less churn.

Changes since v2:

- Add patch 5 to get rid of BTRFS_INODE_HAS_ORPHAN_ITEM
- Move patch 10 to patch 6
- Got rid of patch 5; the bug goes away in the process of removing code
  for patches 9 and 10
- Rename patch 10 batch to what it was called in v1

Changes since v1:

- Added two extra cleanups, patches 10 and 11
- Added a forgotten clear of the orphan bit in patch 8
- Reworded titles of patches 6 and 9
- Added people's reviewed-bys

Cover letter from v1:

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.

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

Thanks!

Omar Sandoval (11):
  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: get rid of BTRFS_INODE_HAS_ORPHAN_ITEM
  Btrfs: delete dead code in btrfs_orphan_commit_root()
  Btrfs: don't return ino to ino cache 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      |  18 +-
 fs/btrfs/ctree.h            |   8 -
 fs/btrfs/disk-io.c          |   9 -
 fs/btrfs/extent-tree.c      |  38 ---
 fs/btrfs/free-space-cache.c |   6 +-
 fs/btrfs/inode.c            | 576 ++++++++++--------------------------
 fs/btrfs/transaction.c      |   1 -
 7 files changed, 170 insertions(+), 486 deletions(-)

-- 
2.17.0


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

end of thread, other threads:[~2018-05-11 17:16 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-11  7:56 [PATCH v3 00/11] Btrfs: orphan and truncate fixes Omar Sandoval
2018-05-11  7:56 ` [PATCH v3 01/11] Btrfs: remove stale comment referencing vmtruncate() Omar Sandoval
2018-05-11 10:19   ` David Sterba
2018-05-11 17:16     ` Omar Sandoval
2018-05-11  7:56 ` [PATCH v3 02/11] Btrfs: fix error handling in btrfs_truncate_inode_items() Omar Sandoval
2018-05-11  7:56 ` [PATCH v3 03/11] Btrfs: don't BUG_ON() " Omar Sandoval
2018-05-11  7:56 ` [PATCH v3 04/11] Btrfs: stop creating orphan items for truncate Omar Sandoval
2018-05-11 14:17   ` Josef Bacik
2018-05-11  7:56 ` [PATCH v3 05/11] Btrfs: get rid of BTRFS_INODE_HAS_ORPHAN_ITEM Omar Sandoval
2018-05-11  9:22   ` Nikolay Borisov
2018-05-11 10:06   ` David Sterba
2018-05-11 16:10     ` Josef Bacik
2018-05-11 16:51       ` David Sterba
2018-05-11 17:16         ` Omar Sandoval
2018-05-11  7:56 ` [PATCH v3 06/11] Btrfs: delete dead code in btrfs_orphan_commit_root() Omar Sandoval
2018-05-11 14:19   ` Josef Bacik
2018-05-11  7:56 ` [PATCH v3 07/11] Btrfs: don't return ino to ino cache if inode item removal fails Omar Sandoval
2018-05-11 14:20   ` Josef Bacik
2018-05-11  7:56 ` [PATCH v3 08/11] Btrfs: refactor btrfs_evict_inode() reserve refill dance Omar Sandoval
2018-05-11  7:56 ` [PATCH v3 09/11] Btrfs: fix ENOSPC caused by orphan items reservations Omar Sandoval
2018-05-11  9:47   ` Nikolay Borisov
2018-05-11  7:56 ` [PATCH v3 10/11] Btrfs: get rid of unused orphan infrastructure Omar Sandoval
2018-05-11  9:31   ` Nikolay Borisov
2018-05-11  7:56 ` [PATCH v3 11/11] Btrfs: reserve space for O_TMPFILE orphan item deletion Omar Sandoval

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).