aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/dax/super.c
diff options
context:
space:
mode:
authorVishal Verma <vishal.l.verma@intel.com>2020-07-28 12:03:03 -0600
committerVishal Verma <vishal.l.verma@intel.com>2020-07-28 12:03:03 -0600
commitf4013ca6803049665a11aab07909eb0e04f22f12 (patch)
tree042df0251a254fd2ae99c561e2f5cea5663ffb0e /drivers/dax/super.c
parentLinux 5.8-rc2 (diff)
parentdrivers/dax: Expand lock scope to cover the use of addresses (diff)
downloadwireguard-linux-f4013ca6803049665a11aab07909eb0e04f22f12.tar.xz
wireguard-linux-f4013ca6803049665a11aab07909eb0e04f22f12.zip
Merge branch 'for-5.9/dax' into libnvdimm-for-next
This contains a handful of dax changes for v5.9. Of the three commits, one is a print verbosity change, and two are independent fixes that fell out of the PKS work [1]. [1]: https://lore.kernel.org/linux-nvdimm/20200717072056.73134-1-ira.weiny@intel.com
Diffstat (limited to 'drivers/dax/super.c')
-rw-r--r--drivers/dax/super.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/dax/super.c b/drivers/dax/super.c
index 8e32345be0f7..ec62752215e4 100644
--- a/drivers/dax/super.c
+++ b/drivers/dax/super.c
@@ -80,14 +80,14 @@ bool __generic_fsdax_supported(struct dax_device *dax_dev,
int err, id;
if (blocksize != PAGE_SIZE) {
- pr_debug("%s: error: unsupported blocksize for dax\n",
+ pr_info("%s: error: unsupported blocksize for dax\n",
bdevname(bdev, buf));
return false;
}
err = bdev_dax_pgoff(bdev, start, PAGE_SIZE, &pgoff);
if (err) {
- pr_debug("%s: error: unaligned partition for dax\n",
+ pr_info("%s: error: unaligned partition for dax\n",
bdevname(bdev, buf));
return false;
}
@@ -95,7 +95,7 @@ bool __generic_fsdax_supported(struct dax_device *dax_dev,
last_page = PFN_DOWN((start + sectors - 1) * 512) * PAGE_SIZE / 512;
err = bdev_dax_pgoff(bdev, last_page, PAGE_SIZE, &pgoff_end);
if (err) {
- pr_debug("%s: error: unaligned partition for dax\n",
+ pr_info("%s: error: unaligned partition for dax\n",
bdevname(bdev, buf));
return false;
}
@@ -103,11 +103,11 @@ bool __generic_fsdax_supported(struct dax_device *dax_dev,
id = dax_read_lock();
len = dax_direct_access(dax_dev, pgoff, 1, &kaddr, &pfn);
len2 = dax_direct_access(dax_dev, pgoff_end, 1, &end_kaddr, &end_pfn);
- dax_read_unlock(id);
if (len < 1 || len2 < 1) {
- pr_debug("%s: error: dax access failed (%ld)\n",
+ pr_info("%s: error: dax access failed (%ld)\n",
bdevname(bdev, buf), len < 1 ? len : len2);
+ dax_read_unlock(id);
return false;
}
@@ -137,9 +137,10 @@ bool __generic_fsdax_supported(struct dax_device *dax_dev,
put_dev_pagemap(end_pgmap);
}
+ dax_read_unlock(id);
if (!dax_enabled) {
- pr_debug("%s: error: dax support not enabled\n",
+ pr_info("%s: error: dax support not enabled\n",
bdevname(bdev, buf));
return false;
}