From: Brian Foster <bfoster@redhat.com>
To: linux-xfs@vger.kernel.org
Subject: [PATCH v2 0/3] xfs: eofblocks serialization fixes
Date: Thu, 19 Jan 2017 14:00:08 -0500 [thread overview]
Message-ID: <1484852411-1137-1-git-send-email-bfoster@redhat.com> (raw)
Hi all,
Here is v2 of the xfs_free_eofblocks() i_size fix. Patch 1 is new and
kills off the need_iolock parameter as suggested by Christoph. Patch 2
is also new and fixes a separate bug I ran into during testing where
multiple threads crash into ENOSPC, run eofb scans in parallel and
livelock against eachother because inode iolocks are held across entire
eofb scans. Patch 3 is roughly the same as v1: serialize
xfs_free_eofblocks() against file-extending async dio writes via
inode_dio_wait().
Thoughts, reviews, flames appreciated.
Brian
v2:
- Kill off the xfs_free_eofblocks() need_iolock parameter. All callers
must acquire IOLOCK_EXCL.
- Drop iolock across internal low free space scans to avoid livelock.
v1: http://www.spinics.net/lists/linux-xfs/msg03437.html
Brian Foster (3):
xfs: pull up iolock from xfs_free_eofblocks()
xfs: sync eofblocks scans under iolock are livelock prone
xfs: fix eofblocks race with file extending async dio writes
fs/xfs/xfs_bmap_util.c | 42 +++++++++++++++--------------------
fs/xfs/xfs_bmap_util.h | 3 +--
fs/xfs/xfs_file.c | 13 +++++++----
fs/xfs/xfs_icache.c | 59 +++++++++++++++-----------------------------------
fs/xfs/xfs_icache.h | 2 --
fs/xfs/xfs_inode.c | 51 +++++++++++++++++++++++--------------------
6 files changed, 73 insertions(+), 97 deletions(-)
--
2.7.4
next reply other threads:[~2017-01-19 19:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-19 19:00 Brian Foster [this message]
2017-01-19 19:00 ` [PATCH v2 1/3] xfs: pull up iolock from xfs_free_eofblocks() Brian Foster
2017-01-20 9:57 ` Christoph Hellwig
2017-01-19 19:00 ` [PATCH v2 2/3] xfs: sync eofblocks scans under iolock are livelock prone Brian Foster
2017-01-20 10:03 ` Christoph Hellwig
2017-01-19 19:00 ` [PATCH v2 3/3] xfs: fix eofblocks race with file extending async dio writes Brian Foster
2017-01-20 10:03 ` Christoph Hellwig
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=1484852411-1137-1-git-send-email-bfoster@redhat.com \
--to=bfoster@redhat.com \
--cc=linux-xfs@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).