On Fri, May 13, 2022 at 2:56 PM Dan Williams <dan.j.williams@xxxxxxxxx> wrote: > > From: Jane Chu <jane.chu@xxxxxxxxxx> > > Up till now, dax_direct_access() is used implicitly for normal > access, but for the purpose of recovery write, dax range with > poison is requested. To make the interface clear, introduce > enum dax_access_mode { > DAX_ACCESS, > DAX_RECOVERY_WRITE, > } > where DAX_ACCESS is used for normal dax access, and > DAX_RECOVERY_WRITE is used for dax recovery write. > > Suggested-by: Dan Williams <dan.j.williams@xxxxxxxxx> > Signed-off-by: Jane Chu <jane.chu@xxxxxxxxxx> > Reviewed-by: Christoph Hellwig <hch@xxxxxx> > Cc: Vivek Goyal <vgoyal@xxxxxxxxxx> > Cc: Mike Snitzer <snitzer@xxxxxxxxxx> > Signed-off-by: Dan Williams <dan.j.williams@xxxxxxxxx> [..] > diff --git a/tools/testing/nvdimm/pmem-dax.c b/tools/testing/nvdimm/pmem-dax.c > index af19c85558e7..dcc328eba811 100644 > --- a/tools/testing/nvdimm/pmem-dax.c > +++ b/tools/testing/nvdimm/pmem-dax.c > @@ -8,7 +8,8 @@ > #include <nd.h> > > long __pmem_direct_access(struct pmem_device *pmem, pgoff_t pgoff, > - long nr_pages, void **kaddr, pfn_t *pfn) > + long nr_pages, enum dax_access_mode mode, void **kaddr, > + pfn_t *pfn) Local build test reports: tools/testing/nvdimm/pmem-dax.c:11:53: error: parameter 4 (‘mode’) has incomplete type 11 | long nr_pages, enum dax_access_mode mode, void **kaddr, | ~~~~~~~~~~~~~~~~~~~~~^~~~ ...so need to include linux/dax.h in this file now for that definition. -- dm-devel mailing list dm-devel@xxxxxxxxxx https://listman.redhat.com/mailman/listinfo/dm-devel