[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151117201551.15053.32709.stgit@dwillia2-desk3.jf.intel.com>
Date: Tue, 17 Nov 2015 12:15:52 -0800
From: Dan Williams <dan.j.williams@...el.com>
To: linux-nvdimm@...ts.01.org
Cc: Jan Kara <jack@...e.com>, Boaz Harrosh <boaz@...xistor.com>,
Theodore Ts'o <tytso@....edu>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Dave Chinner <david@...morbit.com>,
Yigal Korman <yigal@...xistor.com>, stable@...r.kernel.org,
Jens Axboe <axboe@...com>, Jeff Moyer <jmoyer@...hat.com>,
linux-block@...r.kernel.org,
Matthew Wilcox <matthew.r.wilcox@...el.com>,
Dave Chinner <dchinner@...hat.com>,
linux-fsdevel@...r.kernel.org, willy@...ux.intel.com,
ross.zwisler@...ux.intel.com, linux-ext4@...r.kernel.org,
akpm@...ux-foundation.org,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Alexander Viro <viro@...iv.linux.org.uk>
Subject: [PATCH 0/8] dax fixes / cleanups: pmd vs thp, lifetime, and locking
Changes since last posting [1]:
1/ Further cleanups to dax_clear_blocks(): Dropped increments of 'addr'
since we call bdev_direct_access() before the next use, and dropped the
BUG_ON for sector unaligned return values from bdev_direct_access().
2/ In [PATCH 8/8] introduce blk_dax_ctl to remove the need to have
separate dax_map_atomic and __dax_map_atomic routines. Note,
blk_dax_ctl is not passed through to drivers, it gets unpacked in
bdev_direct_access. (Willy)
3/ New [PATCH 2/8]: Disable huge page dax mappings while we resolve
various crash scenarios in this development cycle.
4/ New [PATCH 4/8]: Unmap all dax mappings at block device shutdown
I have kept the reviewed-by's received to date, let me know if these
incremental updates invalidate that review.
[1]: https://lists.01.org/pipermail/linux-nvdimm/2015-November/002733.html
---
The first 4 patches in this series I consider 4.4-rc / -stable material.
The rest are for 4.5. [PATCH 4/8] needs scrutiny. It is yet another
example of where DAX behavior necessarily differs from page cache
behavior. I still maintain that we should not be surprising unaware
applications with DAX semantics, i.e. that DAX should be per-inode
opt-in, not globally enabled for all inodes at fs mount time.
The largest patch in the set, [PATCH 8/8], addresses the lifetime of the
'addr' returned by bdev_direct_access. That address is only valid while
the device driver is enabled. The new dax_map_atomic() /
dax_unmap_atomic() pairing guarantees that 'addr' stays valid for the
duration of that mapping.
While dax_map_atomic() protects against 'addr' going invalid, the new
calls to truncate_pagecache() via invalidate_inodes() protect against
the 'pfn' returned from bdev_direct_access() going invalid. Otherwise,
the storage media can be directly accessed after the driver has been
disabled.
---
[PATCH 1/8] ext2, ext4: warn when mounting with dax enabled
[PATCH 2/8] dax: disable pmd mappings
[PATCH 3/8] mm, dax: fix DAX deadlocks (COW fault)
[PATCH 4/8] mm, dax: truncate dax mappings at bdev or fs shutdown
[PATCH 5/8] pmem, dax: clean up clear_pmem()
[PATCH 6/8] dax: increase granularity of dax_clear_blocks() operations
[PATCH 7/8] dax: guarantee page aligned results from bdev_direct_access()
[PATCH 8/8] dax: fix lifetime of in-kernel dax mappings with dax_map_atomic()
arch/x86/include/asm/pmem.h | 7 -
block/blk.h | 2
fs/Kconfig | 6 +
fs/block_dev.c | 15 +--
fs/dax.c | 228 ++++++++++++++++++++++++++-----------------
fs/ext2/super.c | 2
fs/ext4/super.c | 6 +
fs/inode.c | 27 +++++
include/linux/blkdev.h | 19 +++-
mm/memory.c | 8 +-
mm/truncate.c | 13 ++
11 files changed, 217 insertions(+), 116 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists