From: Ross Zwisler <ross.zwisler@linux.intel.com>
To: linux-kernel@vger.kernel.org
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>,
"J. Bruce Fields" <bfields@fieldses.org>,
Theodore Ts'o <tytso@mit.edu>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Andreas Dilger <adilger.kernel@dilger.ca>,
Andrew Morton <akpm@linux-foundation.org>,
Dan Williams <dan.j.williams@intel.com>,
Dave Chinner <david@fromorbit.com>, Jan Kara <jack@suse.com>,
Jeff Layton <jlayton@poochiereds.net>,
Jens Axboe <axboe@kernel.dk>,
Matthew Wilcox <willy@linux.intel.com>,
linux-block@vger.kernel.org, linux-ext4@vger.kernel.org,
linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
linux-nvdimm@lists.01.org, xfs@oss.sgi.com
Subject: [PATCH v3 0/6] DAX fixes, move flushing calls to FS
Date: Tue, 16 Feb 2016 20:34:13 -0700 [thread overview]
Message-ID: <1455680059-20126-1-git-send-email-ross.zwisler@linux.intel.com> (raw)
This patch series fixes several issues with the current DAX code:
1) DAX is used by default on raw block devices that are capable of
supporting it. This creates an issue because there are still uses of the
block device that use the page cache, and having one block device user
doing DAX I/O and another doing page cache I/O can lead to data corruption.
2) When S_DAX is set on an inode we assume that if there are pages attached
to the mapping (mapping->nrpages != 0), those pages are clean zero pages
that were used to service reads from holes. This wasn't true in all cases.
3) ext4 online defrag combined with DAX I/O could lead to data corruption.
4) The DAX block/sector zeroing code needs a valid struct block_device,
which it wasn't always getting.
5) The DAX writeback code needs a valid struct block_device, which it
wasn't always getting.
6) The DAX writeback code needs to be called for sync(2) and syncfs(2).
The last patch in this series reenables the DAX I/O path for raw block
devices when they would otherwise be doing direct I/O. It can be dropped
if it is too controversial.
Thank you to Dan Williams and Jan Kara for their code contributions to this
set.
A working tree can be found here:
https://git.kernel.org/cgit/linux/kernel/git/zwisler/linux.git/log/?h=fsync_bdev_v3
Dan Williams (2):
block: disable block device DAX by default
block: use dax_do_io() if blkdev_dax_capable()
Ross Zwisler (4):
ext2, ext4: only set S_DAX for regular inodes
ext4: Online defrag not supported with DAX
dax: give DAX clearing code correct bdev
dax: move writeback calls into the filesystems
block/Kconfig | 13 +++++++++++++
block/ioctl.c | 1 +
fs/block_dev.c | 22 +++++++++++++++++++---
fs/dax.c | 21 +++++++++++----------
fs/ext2/inode.c | 16 +++++++++++++---
fs/ext4/inode.c | 6 +++++-
fs/ext4/ioctl.c | 5 +++++
fs/xfs/xfs_aops.c | 6 +++++-
fs/xfs/xfs_aops.h | 1 +
fs/xfs/xfs_bmap_util.c | 3 ++-
include/linux/dax.h | 8 +++++---
include/linux/fs.h | 31 +++++++++++++++++++++----------
mm/filemap.c | 12 ++++--------
13 files changed, 105 insertions(+), 40 deletions(-)
--
2.5.0
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next reply other threads:[~2016-02-17 3:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-17 3:34 Ross Zwisler [this message]
2016-02-17 3:34 ` [PATCH v3 1/6] block: disable block device DAX by default Ross Zwisler
2016-02-17 21:55 ` Jan Kara
2016-02-17 3:34 ` [PATCH v3 2/6] ext2, ext4: only set S_DAX for regular inodes Ross Zwisler
2016-02-17 21:33 ` Jan Kara
2016-02-17 3:34 ` [PATCH v3 3/6] ext4: Online defrag not supported with DAX Ross Zwisler
2016-02-17 21:34 ` Jan Kara
2016-02-17 21:50 ` Ross Zwisler
2016-02-17 22:10 ` Jan Kara
2016-02-18 0:12 ` Dave Chinner
2016-02-17 3:34 ` [PATCH v3 4/6] dax: give DAX clearing code correct bdev Ross Zwisler
2016-02-17 21:37 ` Jan Kara
2016-02-17 3:34 ` [PATCH v3 5/6] dax: move writeback calls into the filesystems Ross Zwisler
2016-02-17 3:34 ` [PATCH v3 6/6] block: use dax_do_io() if blkdev_dax_capable() Ross Zwisler
2016-02-17 21:54 ` Jan Kara
2016-02-17 22:18 ` Dan Williams
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=1455680059-20126-1-git-send-email-ross.zwisler@linux.intel.com \
--to=ross.zwisler@linux.intel.com \
--cc=adilger.kernel@dilger.ca \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=bfields@fieldses.org \
--cc=dan.j.williams@intel.com \
--cc=david@fromorbit.com \
--cc=jack@suse.com \
--cc=jlayton@poochiereds.net \
--cc=linux-block@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nvdimm@lists.01.org \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@linux.intel.com \
--cc=xfs@oss.sgi.com \
/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).