[dm-devel] [PATCH v10 4/7] dax: introduce DAX_RECOVERY_WRITE dax access mode

Dan Williams dan.j.williams at intel.com
Fri May 13 22:09:32 UTC 2022


On Fri, May 13, 2022 at 2:56 PM Dan Williams <dan.j.williams at intel.com> wrote:
>
> From: Jane Chu <jane.chu at oracle.com>
>
> 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 at intel.com>
> Signed-off-by: Jane Chu <jane.chu at oracle.com>
> Reviewed-by: Christoph Hellwig <hch at lst.de>
> Cc: Vivek Goyal <vgoyal at redhat.com>
> Cc: Mike Snitzer <snitzer at redhat.com>
> Signed-off-by: Dan Williams <dan.j.williams at intel.com>
[..]
> 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.



More information about the dm-devel mailing list