mirror of
https://github.com/torvalds/linux.git
synced 2024-12-30 14:52:05 +00:00
569d0365f5
If a dax buffer from a device that does not map pages is passed to read(2) or write(2) as a target for direct-I/O it triggers SIGBUS. If gdb attempts to examine the contents of a dax buffer from a device that does not map pages it triggers SIGBUS. If fork(2) is called on a process with a dax mapping from a device that does not map pages it triggers SIGBUS. 'struct page' is required otherwise several kernel code paths break in surprising ways. Disable filesystem-dax on devices that do not map pages. In addition to needing pfn_to_page() to be valid we also require devmap pages. We need this to detect dax pages in the get_user_pages_fast() path and so that we can stop managing the VM_MIXEDMAP flag. For DAX drivers that have not supported get_user_pages() to date we allow them to opt-in to supporting DAX with the CONFIG_FS_DAX_LIMITED configuration option which requires ->direct_access() to return pfn_t_special() pfns. This leaves DAX support in brd disabled and scheduled for removal. Note that when the initial dax support was being merged a few years back there was concern that struct page was unsuitable for use with next generation persistent memory devices. The theoretical concern was that struct page access, being such a hotly used data structure in the kernel, would lead to media wear out. While that was a reasonable conservative starting position it has not held true in practice. We have long since committed to using devm_memremap_pages() to support higher order kernel functionality that needs get_user_pages() and pfn_to_page(). Cc: Jeff Moyer <jmoyer@redhat.com> Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
87 lines
2.4 KiB
Plaintext
87 lines
2.4 KiB
Plaintext
# SPDX-License-Identifier: GPL-2.0
|
|
comment "S/390 block device drivers"
|
|
depends on S390 && BLOCK
|
|
|
|
config BLK_DEV_XPRAM
|
|
def_tristate m
|
|
prompt "XPRAM disk support"
|
|
depends on S390 && BLOCK
|
|
help
|
|
Select this option if you want to use your expanded storage on S/390
|
|
or zSeries as a disk. This is useful as a _fast_ swap device if you
|
|
want to access more than 2G of memory when running in 31 bit mode.
|
|
This option is also available as a module which will be called
|
|
xpram. If unsure, say "N".
|
|
|
|
config DCSSBLK
|
|
def_tristate m
|
|
select DAX
|
|
select FS_DAX_LIMITED
|
|
prompt "DCSSBLK support"
|
|
depends on S390 && BLOCK
|
|
help
|
|
Support for dcss block device
|
|
|
|
config DASD
|
|
def_tristate y
|
|
prompt "Support for DASD devices"
|
|
depends on CCW && BLOCK
|
|
select IOSCHED_DEADLINE
|
|
help
|
|
Enable this option if you want to access DASDs directly utilizing
|
|
S/390s channel subsystem commands. This is necessary for running
|
|
natively on a single image or an LPAR.
|
|
|
|
config DASD_PROFILE
|
|
def_bool y
|
|
prompt "Profiling support for dasd devices"
|
|
depends on DASD
|
|
help
|
|
Enable this option if you want to see profiling information
|
|
in /proc/dasd/statistics.
|
|
|
|
config DASD_ECKD
|
|
def_tristate y
|
|
prompt "Support for ECKD Disks"
|
|
depends on DASD
|
|
help
|
|
ECKD devices are the most commonly used devices. You should enable
|
|
this option unless you are very sure to have no ECKD device.
|
|
|
|
config DASD_FBA
|
|
def_tristate y
|
|
prompt "Support for FBA Disks"
|
|
depends on DASD
|
|
help
|
|
Select this option to be able to access FBA devices. It is safe to
|
|
say "Y".
|
|
|
|
config DASD_DIAG
|
|
def_tristate y
|
|
prompt "Support for DIAG access to Disks"
|
|
depends on DASD
|
|
help
|
|
Select this option if you want to use Diagnose250 command to access
|
|
Disks under VM. If you are not running under VM or unsure what it is,
|
|
say "N".
|
|
|
|
config DASD_EER
|
|
def_bool y
|
|
prompt "Extended error reporting (EER)"
|
|
depends on DASD
|
|
help
|
|
This driver provides a character device interface to the
|
|
DASD extended error reporting. This is only needed if you want to
|
|
use applications written for the EER facility.
|
|
|
|
config SCM_BLOCK
|
|
def_tristate m
|
|
prompt "Support for Storage Class Memory"
|
|
depends on S390 && BLOCK && EADM_SCH && SCM_BUS
|
|
help
|
|
Block device driver for Storage Class Memory (SCM). This driver
|
|
provides a block device interface for each available SCM increment.
|
|
|
|
To compile this driver as a module, choose M here: the
|
|
module will be called scm_block.
|