From: fdmanana@kernel.org
To: linux-btrfs@vger.kernel.org
Subject: [PATCH v2 0/2] Fix for race in relocation and avoid start and wait for unrelated IO
Date: Tue, 26 Apr 2016 16:39:37 +0100 [thread overview]
Message-ID: <1461685179-3957-1-git-send-email-fdmanana@kernel.org> (raw)
From: Filipe Manana <fdmanana@suse.com>
The following patches fix a hard to hit race and unecessary flushing of
delalloc regions and waiting for unrelated IO (IO against extents outside
of the block group being relocated).
The race is between relocation and direct IO writes that lead to the
relocation process miss extents and not move them, and later makes us hit
a BUG_ON() if we attempt to read the extents.
Patch 1 just avoids waiting for unrelated ordered extents to complete
while patch 2 fixes the race and avoids flushing delalloc.
Thanks.
V2: Removed the first patch in the v1 series, it was meant for a false
positive.
Filipe Manana (2):
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 | 26 ++++++++++++++-----
fs/btrfs/ordered-data.h | 6 +++--
fs/btrfs/relocation.c | 10 +++----
fs/btrfs/super.c | 2 +-
fs/btrfs/transaction.c | 2 +-
10 files changed, 117 insertions(+), 26 deletions(-)
--
2.7.0.rc3
next reply other threads:[~2016-04-26 15:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-26 15:39 fdmanana [this message]
2016-04-26 15:39 ` [PATCH v2 1/2] Btrfs: don't wait for unrelated IO to finish before relocation fdmanana
2016-04-26 15:55 ` Josef Bacik
2016-05-10 19:23 ` Liu Bo
2016-04-26 15:39 ` [PATCH v2 2/2] Btrfs: don't do unnecessary delalloc flushes when relocating fdmanana
2016-04-26 16:02 ` Josef Bacik
2016-04-26 16:09 ` Filipe Manana
2016-04-26 19:48 ` Josef Bacik
2016-04-26 17:45 ` [PATCH v3 " fdmanana
2016-04-27 14:54 ` Josef Bacik
2016-05-10 19:31 ` Liu Bo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1461685179-3957-1-git-send-email-fdmanana@kernel.org \
--to=fdmanana@kernel.org \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).