aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMatthew Wilcox <willy@linux.intel.com>2015-02-16 18:59:41 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-16 20:56:04 -0500
commita7a97fc9ff6c2fcec00feb34d9b87b94452b0b78 (patch)
tree02d70a62a1dab16d8eef056f704f2c5b9e4079a5 /drivers
parent923ae0ff9250430133b3310fe62c47538cf1cbc1 (diff)
brd: rename XIP to DAX
Since this is relating to FS_XIP, not KERNEL_XIP, it should be called DAX instead of XIP. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Cc: Boaz Harrosh <boaz@plexistor.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Dave Chinner <david@fromorbit.com> Cc: Jan Kara <jack@suse.cz> Cc: Jens Axboe <axboe@kernel.dk> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Randy Dunlap <rdunlap@infradead.org> Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Theodore Ts'o <tytso@mit.edu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/Kconfig13
-rw-r--r--drivers/block/brd.c14
2 files changed, 14 insertions, 13 deletions
diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig
index 014a1cfc41c5..1b8094d4d7af 100644
--- a/drivers/block/Kconfig
+++ b/drivers/block/Kconfig
@@ -393,14 +393,15 @@ config BLK_DEV_RAM_SIZE
393 The default value is 4096 kilobytes. Only change this if you know 393 The default value is 4096 kilobytes. Only change this if you know
394 what you are doing. 394 what you are doing.
395 395
396config BLK_DEV_XIP 396config BLK_DEV_RAM_DAX
397 bool "Support XIP filesystems on RAM block device" 397 bool "Support Direct Access (DAX) to RAM block devices"
398 depends on BLK_DEV_RAM 398 depends on BLK_DEV_RAM && FS_DAX
399 default n 399 default n
400 help 400 help
401 Support XIP filesystems (such as ext2 with XIP support on) on 401 Support filesystems using DAX to access RAM block devices. This
402 top of block ram device. This will slightly enlarge the kernel, and 402 avoids double-buffering data in the page cache before copying it
403 will prevent RAM block device backing store memory from being 403 to the block device. Answering Y will slightly enlarge the kernel,
404 and will prevent RAM block device backing store memory from being
404 allocated from highmem (only a problem for highmem systems). 405 allocated from highmem (only a problem for highmem systems).
405 406
406config CDROM_PKTCDVD 407config CDROM_PKTCDVD
diff --git a/drivers/block/brd.c b/drivers/block/brd.c
index c01b921b1b4a..64ab4951e9d6 100644
--- a/drivers/block/brd.c
+++ b/drivers/block/brd.c
@@ -97,13 +97,13 @@ static struct page *brd_insert_page(struct brd_device *brd, sector_t sector)
97 * Must use NOIO because we don't want to recurse back into the 97 * Must use NOIO because we don't want to recurse back into the
98 * block or filesystem layers from page reclaim. 98 * block or filesystem layers from page reclaim.
99 * 99 *
100 * Cannot support XIP and highmem, because our ->direct_access 100 * Cannot support DAX and highmem, because our ->direct_access
101 * routine for XIP must return memory that is always addressable. 101 * routine for DAX must return memory that is always addressable.
102 * If XIP was reworked to use pfns and kmap throughout, this 102 * If DAX was reworked to use pfns and kmap throughout, this
103 * restriction might be able to be lifted. 103 * restriction might be able to be lifted.
104 */ 104 */
105 gfp_flags = GFP_NOIO | __GFP_ZERO; 105 gfp_flags = GFP_NOIO | __GFP_ZERO;
106#ifndef CONFIG_BLK_DEV_XIP 106#ifndef CONFIG_BLK_DEV_RAM_DAX
107 gfp_flags |= __GFP_HIGHMEM; 107 gfp_flags |= __GFP_HIGHMEM;
108#endif 108#endif
109 page = alloc_page(gfp_flags); 109 page = alloc_page(gfp_flags);
@@ -369,7 +369,7 @@ static int brd_rw_page(struct block_device *bdev, sector_t sector,
369 return err; 369 return err;
370} 370}
371 371
372#ifdef CONFIG_BLK_DEV_XIP 372#ifdef CONFIG_BLK_DEV_RAM_DAX
373static long brd_direct_access(struct block_device *bdev, sector_t sector, 373static long brd_direct_access(struct block_device *bdev, sector_t sector,
374 void **kaddr, unsigned long *pfn, long size) 374 void **kaddr, unsigned long *pfn, long size)
375{ 375{
@@ -390,6 +390,8 @@ static long brd_direct_access(struct block_device *bdev, sector_t sector,
390 */ 390 */
391 return PAGE_SIZE; 391 return PAGE_SIZE;
392} 392}
393#else
394#define brd_direct_access NULL
393#endif 395#endif
394 396
395static int brd_ioctl(struct block_device *bdev, fmode_t mode, 397static int brd_ioctl(struct block_device *bdev, fmode_t mode,
@@ -430,9 +432,7 @@ static const struct block_device_operations brd_fops = {
430 .owner = THIS_MODULE, 432 .owner = THIS_MODULE,
431 .rw_page = brd_rw_page, 433 .rw_page = brd_rw_page,
432 .ioctl = brd_ioctl, 434 .ioctl = brd_ioctl,
433#ifdef CONFIG_BLK_DEV_XIP
434 .direct_access = brd_direct_access, 435 .direct_access = brd_direct_access,
435#endif
436}; 436};
437 437
438/* 438/*