diff options
author | Dan Williams <dan.j.williams@intel.com> | 2017-10-15 02:13:45 +0200 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2018-03-30 20:34:54 +0200 |
commit | 3fe0791c295cfd3cd735de7a32cc0780949c009f (patch) | |
tree | fee362b87ce6ff4289d511e154fadd05667ca184 /drivers/dax/super.c | |
parent | sched/wait: Introduce wait_var_event() (diff) | |
download | linux-3fe0791c295cfd3cd735de7a32cc0780949c009f.tar.xz linux-3fe0791c295cfd3cd735de7a32cc0780949c009f.zip |
dax: store pfns in the radix
In preparation for examining the busy state of dax pages in the truncate
path, switch from sectors to pfns in the radix.
Cc: Jeff Moyer <jmoyer@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Matthew Wilcox <mawilcox@microsoft.com>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dax/super.c')
-rw-r--r-- | drivers/dax/super.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/dax/super.c b/drivers/dax/super.c index ecdc292aa4e4..2b2332b605e4 100644 --- a/drivers/dax/super.c +++ b/drivers/dax/super.c @@ -124,10 +124,19 @@ int __bdev_dax_supported(struct super_block *sb, int blocksize) return len < 0 ? len : -EIO; } - if ((IS_ENABLED(CONFIG_FS_DAX_LIMITED) && pfn_t_special(pfn)) - || pfn_t_devmap(pfn)) + if (IS_ENABLED(CONFIG_FS_DAX_LIMITED) && pfn_t_special(pfn)) { + /* + * An arch that has enabled the pmem api should also + * have its drivers support pfn_t_devmap() + * + * This is a developer warning and should not trigger in + * production. dax_flush() will crash since it depends + * on being able to do (page_address(pfn_to_page())). + */ + WARN_ON(IS_ENABLED(CONFIG_ARCH_HAS_PMEM_API)); + } else if (pfn_t_devmap(pfn)) { /* pass */; - else { + } else { pr_debug("VFS (%s): error: dax support not enabled\n", sb->s_id); return -EOPNOTSUPP; |