On Tue, Apr 03 2018 at 4:36pm -0400, Dan Williams <dan.j.williams@xxxxxxxxx> wrote: > In preparation for allowing filesystems to augment the dev_pagemap > associated with a dax_device, add an ->fs_claim() callback. The > ->fs_claim() callback is leveraged by the device-mapper dax > implementation to iterate all member devices in the map and repeat the > claim operation across the array. > > In order to resolve collisions between filesystem operations and DMA to > DAX mapped pages we need a callback when DMA completes. With a callback > we can hold off filesystem operations while DMA is in-flight and then > resume those operations when the last put_page() occurs on a DMA page. > The ->fs_claim() operation arranges for this callback to be registered, > although that implementation is saved for a later patch. > > Cc: Alasdair Kergon <agk@xxxxxxxxxx> > Cc: Mike Snitzer <snitzer@xxxxxxxxxx> > Cc: Matthew Wilcox <mawilcox@xxxxxxxxxxxxx> > Cc: Ross Zwisler <ross.zwisler@xxxxxxxxxxxxxxx> > Cc: "Jérôme Glisse" <jglisse@xxxxxxxxxx> > Cc: Christoph Hellwig <hch@xxxxxx> > Cc: Jan Kara <jack@xxxxxxx> > Signed-off-by: Dan Williams <dan.j.williams@xxxxxxxxx> > --- > Changes since v8: > * make __fs_dax_claim and __fs_dax_release private to > drivers/dax/super.c > > * rename dm_dax_iterate to dm_dax_interate_devices (Mike) > > * drop the return value from dm_dax_interate_devices since nothing uses > it (Mike) Acked-by: Mike Snitzer <snitzer@xxxxxxxxxx>