On Wed, Nov 25, 2015 at 10:37 AM, Dan Williams <dan.j.williams@xxxxxxxxx> wrote: > Currently dax mappings leak past / survive block_device shutdown. While > page cache pages are permitted to be read/written after the block_device > is torn down this is not acceptable in the dax case as all media access > must end when the device is disabled. The pfn backing a dax mapping is > permitted to be invalidated after bdev shutdown and this is indeed the > case with brd. > > When a dax capable block_device driver calls del_gendisk_queue() in its > shutdown path it needs to ensure that all DAX pfns are unmapped, and > that no new mappings can be established. This is different than the > pagecache backed case where the disk is protected by the queue being > torn down which ends I/O to the device. Since dax bypasses the page > cache we need to unconditionally unmap the inode. > > Cc: Jan Kara <jack@xxxxxxxx> > Cc: Dave Chinner <david@xxxxxxxxxxxxx> > Cc: Matthew Wilcox <willy@xxxxxxxxxxxxxxx> > Cc: Ross Zwisler <ross.zwisler@xxxxxxxxxxxxxxx> > [honza: drop changes to truncate_inode_pages_final] > [honza: ensure mappings can't be re-established] > Signed-off-by: Dan Williams <dan.j.williams@xxxxxxxxx> > --- Dave, can this patch move forward while we figure out ->shutdown() for super_operations? -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html