On Fri, May 13, 2022 at 2:56 PM Dan Williams <[email protected]> wrote:
>
> From: Jane Chu <[email protected]>
>
> 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 <[email protected]>
> Signed-off-by: Jane Chu <[email protected]>
> Reviewed-by: Christoph Hellwig <[email protected]>
> Cc: Vivek Goyal <[email protected]>
> Cc: Mike Snitzer <[email protected]>
> Signed-off-by: Dan Williams <[email protected]>
[..]
> 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.