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>
This commit is contained in:
parent
923ae0ff92
commit
a7a97fc9ff
|
@ -393,14 +393,15 @@ config BLK_DEV_RAM_SIZE
|
||||||
The default value is 4096 kilobytes. Only change this if you know
|
The default value is 4096 kilobytes. Only change this if you know
|
||||||
what you are doing.
|
what you are doing.
|
||||||
|
|
||||||
config BLK_DEV_XIP
|
config BLK_DEV_RAM_DAX
|
||||||
bool "Support XIP filesystems on RAM block device"
|
bool "Support Direct Access (DAX) to RAM block devices"
|
||||||
depends on BLK_DEV_RAM
|
depends on BLK_DEV_RAM && FS_DAX
|
||||||
default n
|
default n
|
||||||
help
|
help
|
||||||
Support XIP filesystems (such as ext2 with XIP support on) on
|
Support filesystems using DAX to access RAM block devices. This
|
||||||
top of block ram device. This will slightly enlarge the kernel, and
|
avoids double-buffering data in the page cache before copying it
|
||||||
will prevent RAM block device backing store memory from being
|
to the block device. Answering Y will slightly enlarge the kernel,
|
||||||
|
and will prevent RAM block device backing store memory from being
|
||||||
allocated from highmem (only a problem for highmem systems).
|
allocated from highmem (only a problem for highmem systems).
|
||||||
|
|
||||||
config CDROM_PKTCDVD
|
config CDROM_PKTCDVD
|
||||||
|
|
|
@ -97,13 +97,13 @@ static struct page *brd_insert_page(struct brd_device *brd, sector_t sector)
|
||||||
* Must use NOIO because we don't want to recurse back into the
|
* Must use NOIO because we don't want to recurse back into the
|
||||||
* block or filesystem layers from page reclaim.
|
* block or filesystem layers from page reclaim.
|
||||||
*
|
*
|
||||||
* Cannot support XIP and highmem, because our ->direct_access
|
* Cannot support DAX and highmem, because our ->direct_access
|
||||||
* routine for XIP must return memory that is always addressable.
|
* routine for DAX must return memory that is always addressable.
|
||||||
* If XIP was reworked to use pfns and kmap throughout, this
|
* If DAX was reworked to use pfns and kmap throughout, this
|
||||||
* restriction might be able to be lifted.
|
* restriction might be able to be lifted.
|
||||||
*/
|
*/
|
||||||
gfp_flags = GFP_NOIO | __GFP_ZERO;
|
gfp_flags = GFP_NOIO | __GFP_ZERO;
|
||||||
#ifndef CONFIG_BLK_DEV_XIP
|
#ifndef CONFIG_BLK_DEV_RAM_DAX
|
||||||
gfp_flags |= __GFP_HIGHMEM;
|
gfp_flags |= __GFP_HIGHMEM;
|
||||||
#endif
|
#endif
|
||||||
page = alloc_page(gfp_flags);
|
page = alloc_page(gfp_flags);
|
||||||
|
@ -369,7 +369,7 @@ static int brd_rw_page(struct block_device *bdev, sector_t sector,
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_BLK_DEV_XIP
|
#ifdef CONFIG_BLK_DEV_RAM_DAX
|
||||||
static long brd_direct_access(struct block_device *bdev, sector_t sector,
|
static long brd_direct_access(struct block_device *bdev, sector_t sector,
|
||||||
void **kaddr, unsigned long *pfn, long size)
|
void **kaddr, unsigned long *pfn, long size)
|
||||||
{
|
{
|
||||||
|
@ -390,6 +390,8 @@ static long brd_direct_access(struct block_device *bdev, sector_t sector,
|
||||||
*/
|
*/
|
||||||
return PAGE_SIZE;
|
return PAGE_SIZE;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
#define brd_direct_access NULL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int brd_ioctl(struct block_device *bdev, fmode_t mode,
|
static int brd_ioctl(struct block_device *bdev, fmode_t mode,
|
||||||
|
@ -430,9 +432,7 @@ static const struct block_device_operations brd_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.rw_page = brd_rw_page,
|
.rw_page = brd_rw_page,
|
||||||
.ioctl = brd_ioctl,
|
.ioctl = brd_ioctl,
|
||||||
#ifdef CONFIG_BLK_DEV_XIP
|
|
||||||
.direct_access = brd_direct_access,
|
.direct_access = brd_direct_access,
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue