linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Fixes for races in relocation and avoid start and wait for unrelated IO
@ 2016-04-25  1:01 fdmanana
  2016-04-25  1:01 ` [PATCH 1/3] Btrfs: fix race in relocation that makes us miss extents fdmanana
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: fdmanana @ 2016-04-25  1:01 UTC (permalink / raw)
  To: linux-btrfs

From: Filipe Manana <fdmanana@suse.com>

The following patches fix 2 hard to hit races in relocation that make its
first phase (MOVE_DATA_EXTENTS) miss extents, triggers a warning in the
second phase (UPDATE_DATA_PTRS) and leaves metadata in an invalid state
(file extent items pointing to areas corresponding to the deleted block
group), leading to a BUG_ON() when attempting to read those extents after
the relocation finishes.
Patches 1 and 3 fix those races, patch 2 is an optimization that makes
the relocation no longer wait for ordered extents against other groups
and patch 3 besides fixing a race also makes relocation only wait for
tasks that started delalloc flushing and allocated already an extent
from the block group we are relocating, instead of flushing all delalloc
regions.

Filipe Manana (3):
  Btrfs: fix race in relocation that makes us miss extents
  Btrfs: don't wait for unrelated IO to finish before relocation
  Btrfs: don't do unnecessary delalloc flushes when relocating

 fs/btrfs/ctree.h        | 14 ++++++++++
 fs/btrfs/dev-replace.c  |  4 +--
 fs/btrfs/extent-tree.c  | 69 ++++++++++++++++++++++++++++++++++++++++++++-----
 fs/btrfs/inode.c        |  8 ++++++
 fs/btrfs/ioctl.c        |  2 +-
 fs/btrfs/ordered-data.c | 30 ++++++++++++++++-----
 fs/btrfs/ordered-data.h |  6 +++--
 fs/btrfs/relocation.c   | 30 +++++++++++++++++----
 fs/btrfs/super.c        |  2 +-
 fs/btrfs/transaction.c  |  2 +-
 10 files changed, 142 insertions(+), 25 deletions(-)

-- 
2.7.0.rc3


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

end of thread, other threads:[~2016-05-10 10:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-25  1:01 [PATCH 0/3] Fixes for races in relocation and avoid start and wait for unrelated IO fdmanana
2016-04-25  1:01 ` [PATCH 1/3] Btrfs: fix race in relocation that makes us miss extents fdmanana
2016-05-09 22:15   ` Liu Bo
2016-04-25  1:01 ` [PATCH 2/3] Btrfs: don't wait for unrelated IO to finish before relocation fdmanana
2016-05-09 22:59   ` Liu Bo
2016-04-25  1:01 ` [PATCH 3/3] Btrfs: don't do unnecessary delalloc flushes when relocating fdmanana
2016-05-09 23:56   ` Liu Bo
2016-05-10 10:22     ` Filipe Manana
2016-04-26 13:42 ` [PATCH 0/3] Fixes for races in relocation and avoid start and wait for unrelated IO Holger Hoffstätte
2016-04-26 14:23   ` Filipe Manana

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).