From: Filipe Manana <fdmanana@xxxxxxxx> 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 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
