> +DEFINE_MUTEX(devmap_lock); static? > +#if IS_ENABLED(CONFIG_FS_DAX) > +static void generic_dax_pagefree(struct page *page, void *data) > +{ > +} > + > +struct dax_device *fs_dax_claim_bdev(struct block_device *bdev, void *owner) > +{ > + struct dax_device *dax_dev; > + struct dev_pagemap *pgmap; > + > + if (!blk_queue_dax(bdev->bd_queue)) > + return NULL; > + dax_dev = fs_dax_get_by_host(bdev->bd_disk->disk_name); > + if (!dax_dev->pgmap) > + return dax_dev; > + pgmap = dax_dev->pgmap; > + mutex_lock(&devmap_lock); > + if ((pgmap->data && pgmap->data != owner) || pgmap->page_free > + || pgmap->page_fault > + || pgmap->type != MEMORY_DEVICE_HOST) { > + put_dax(dax_dev); > + mutex_unlock(&devmap_lock); > + return NULL; > + } > + > + pgmap->type = MEMORY_DEVICE_FS_DAX; > + pgmap->page_free = generic_dax_pagefree; > + pgmap->data = owner; > + mutex_unlock(&devmap_lock); All this deep magic will need some explanation. So far I don't understand it at all, but maybe the later patches will help.. -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html