mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-11-01 23:04:54 +01:00
dcssblk: mark DAX broken, remove FS_DAX_LIMITED support
The dcssblk driver has long needed special case supoprt to enable limited dax operation, so called CONFIG_FS_DAX_LIMITED. This mode works around the incomplete support for ZONE_DEVICE on s390 by forgoing the ability of dax-mapped pages to support GUP. Now, pending cleanups to fsdax that fix its reference counting [1] depend on the ability of all dax drivers to supply ZONE_DEVICE pages. To allow that work to move forward, dax support needs to be paused for dcssblk until ZONE_DEVICE support arrives. That work has been known for a few years [2], and the removal of "pte_devmap" requirements [3] makes the conversion easier. For now, place the support behind CONFIG_BROKEN, and remove PFN_SPECIAL (dcssblk was the only user). Link: http://lore.kernel.org/cover.9f0e45d52f5cff58807831b6b867084d0b14b61c.1725941415.git-series.apopple@nvidia.com [1] Link: http://lore.kernel.org/20210820210318.187742e8@thinkpad/ [2] Link: http://lore.kernel.org/4511465a4f8429f45e2ac70d2e65dc5e1df1eb47.1725941415.git-series.apopple@nvidia.com [3] Link: https://lkml.kernel.org/r/33eef2379c0d240f40cc15453fad2df1a4ae34c8.1740713401.git-series.apopple@nvidia.com Signed-off-by: Dan Williams <[email protected]> Reviewed-by: Gerald Schaefer <[email protected]> Tested-by: Alexander Gordeev <[email protected]> Acked-by: David Hildenbrand <[email protected]> Tested-by: Alison Schofield <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: Vasily Gorbik <[email protected]> Cc: Christian Borntraeger <[email protected]> Cc: Sven Schnelle <[email protected]> Cc: Jan Kara <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Alistair Popple <[email protected]> Cc: Asahi Lina <[email protected]> Cc: Balbir Singh <[email protected]> Cc: Bjorn Helgaas <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Chunyan Zhang <[email protected]> Cc: "Darrick J. Wong" <[email protected]> Cc: Dave Chinner <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Dave Jiang <[email protected]> Cc: Huacai Chen <[email protected]> Cc: Ira Weiny <[email protected]> Cc: Jason Gunthorpe <[email protected]> Cc: Jason Gunthorpe <[email protected]> Cc: John Hubbard <[email protected]> Cc: linmiaohe <[email protected]> Cc: Logan Gunthorpe <[email protected]> Cc: Michael "Camp Drill Sergeant" Ellerman <[email protected]> Cc: Nicholas Piggin <[email protected]> Cc: Peter Xu <[email protected]> Cc: Ted Ts'o <[email protected]> Cc: Vishal Verma <[email protected]> Cc: Vivek Goyal <[email protected]> Cc: WANG Xuerui <[email protected]> Cc: Will Deacon <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
This commit is contained in:
1 parent
e5cb232563
commit
653d7825c1
3 files changed
+27
-13
No files matched your search
@@ -207,7 +207,6 @@ implement direct_access.
|
||||
|
||||
These block devices may be used for inspiration:
|
||||
- brd: RAM backed block device driver
|
||||
- dcssblk: s390 dcss block device driver
|
||||
- pmem: NVDIMM persistent memory driver
|
||||
|
||||
|
||||
|
||||
@@ -4,13 +4,21 @@ comment "S/390 block device drivers"
|
||||
|
||||
config DCSSBLK
|
||||
def_tristate m
|
||||
select FS_DAX_LIMITED
|
||||
select DAX
|
||||
prompt "DCSSBLK support"
|
||||
depends on S390 && BLOCK
|
||||
help
|
||||
Support for dcss block device
|
||||
|
||||
config DCSSBLK_DAX
|
||||
def_bool y
|
||||
depends on DCSSBLK
|
||||
# requires S390 ZONE_DEVICE support
|
||||
depends on BROKEN
|
||||
select DAX
|
||||
prompt "DCSSBLK DAX support"
|
||||
help
|
||||
Enable DAX operation for the dcss block device
|
||||
|
||||
config DASD
|
||||
def_tristate y
|
||||
prompt "Support for DASD devices"
|
||||
|
||||
@@ -534,6 +534,21 @@ static const struct attribute_group *dcssblk_dev_attr_groups[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static int dcssblk_setup_dax(struct dcssblk_dev_info *dev_info)
|
||||
{
|
||||
struct dax_device *dax_dev;
|
||||
|
||||
if (!IS_ENABLED(CONFIG_DCSSBLK_DAX))
|
||||
return 0;
|
||||
|
||||
dax_dev = alloc_dax(dev_info, &dcssblk_dax_ops);
|
||||
if (IS_ERR(dax_dev))
|
||||
return PTR_ERR(dax_dev);
|
||||
set_dax_synchronous(dax_dev);
|
||||
dev_info->dax_dev = dax_dev;
|
||||
return dax_add_host(dev_info->dax_dev, dev_info->gd);
|
||||
}
|
||||
|
||||
/*
|
||||
* device attribute for adding devices
|
||||
*/
|
||||
@@ -547,7 +562,6 @@ dcssblk_add_store(struct device *dev, struct device_attribute *attr, const char
|
||||
int rc, i, j, num_of_segments;
|
||||
struct dcssblk_dev_info *dev_info;
|
||||
struct segment_info *seg_info, *temp;
|
||||
struct dax_device *dax_dev;
|
||||
char *local_buf;
|
||||
unsigned long seg_byte_size;
|
||||
|
||||
@@ -674,14 +688,7 @@ dcssblk_add_store(struct device *dev, struct device_attribute *attr, const char
|
||||
if (rc)
|
||||
goto put_dev;
|
||||
|
||||
dax_dev = alloc_dax(dev_info, &dcssblk_dax_ops);
|
||||
if (IS_ERR(dax_dev)) {
|
||||
rc = PTR_ERR(dax_dev);
|
||||
goto put_dev;
|
||||
}
|
||||
set_dax_synchronous(dax_dev);
|
||||
dev_info->dax_dev = dax_dev;
|
||||
rc = dax_add_host(dev_info->dax_dev, dev_info->gd);
|
||||
rc = dcssblk_setup_dax(dev_info);
|
||||
if (rc)
|
||||
goto out_dax;
|
||||
|
||||
@@ -917,7 +924,7 @@ __dcssblk_direct_access(struct dcssblk_dev_info *dev_info, pgoff_t pgoff,
|
||||
*kaddr = __va(dev_info->start + offset);
|
||||
if (pfn)
|
||||
*pfn = __pfn_to_pfn_t(PFN_DOWN(dev_info->start + offset),
|
||||
PFN_DEV|PFN_SPECIAL);
|
||||
PFN_DEV);
|
||||
|
||||
return (dev_sz - offset) / PAGE_SIZE;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user