On Tue, Apr 10, 2018 at 2:28 PM, Dave Jiang <[email protected]> wrote:
> Providing an API call in libndctl to support accessing the region deep_flush
> in sysfs.
>
> Signed-off-by: Dave Jiang <[email protected]>
> ---
>  0 files changed
>
> diff --git a/ndctl/lib/libndctl.c b/ndctl/lib/libndctl.c
> index 580a450e..fb4dca73 100644
> --- a/ndctl/lib/libndctl.c
> +++ b/ndctl/lib/libndctl.c
[..]
> @@ -1866,6 +1877,22 @@ static void *add_region(void *parent, int id, const 
> char *region_base)
>         else
>                 region->persistence_domain = region_get_pd_type(buf);
>
> +       sprintf(path, "%s/deep_flush", region_base);
> +       region->flush_fd = open(path, O_RDWR);
> +       if (region->flush_fd == -1)
> +               goto err_read;

Have you tried this on a config that does not export the 'deep_flush'
attribute? Seems like this would kill listing those regions.
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm

Reply via email to