Re: [PATCH v10] mm: introduce MEMORY_DEVICE_FS_DAX and CONFIG_DEV_PAGEMAP_OPS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This looks reasonable to me.  A few more comments below.

> This patch replaces and consolidates patch 2 [1] and 4 [2] from the v9
> series [3] for "dax: fix dma vs truncate/hole-punch".

Can you repost the whole series?  Otherwise things might get a little
too confusing.

>  		WARN_ON(IS_ENABLED(CONFIG_ARCH_HAS_PMEM_API));
> +		return 0;
>  	} else if (pfn_t_devmap(pfn)) {
> +		struct dev_pagemap *pgmap;

This should probably become something like:

	bool supported = false;

	...


	if (IS_ENABLED(CONFIG_FS_DAX_LIMITED) && pfn_t_special(pfn)) {
		...
		supported = true;
	} else if (pfn_t_devmap(pfn)) {
		pgmap = get_dev_pagemap(pfn_t_to_pfn(pfn), NULL);
		if (pgmap && pgmap->type == MEMORY_DEVICE_FS_DAX)
			supported = true;
		put_dev_pagemap(pgmap);
	}

	if (!supported) {
		pr_debug("VFS (%s): error: dax support not enabled\n",
			sb->s_id);
		return -EOPNOTSUPP;
	}
	return 0;

> +	select DEV_PAGEMAP_OPS if (ZONE_DEVICE && !FS_DAX_LIMITED)

Btw, what was the reason again we couldn't get rid of FS_DAX_LIMITED?

> +void generic_dax_pagefree(struct page *page, void *data)
> +{
> +	wake_up_var(&page->_refcount);
> +}
> +EXPORT_SYMBOL_GPL(generic_dax_pagefree);

Why is this here and exported instead of static in drivers/nvdimm/pmem.c?



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux