linux-nvdimm.lists.01.org archive mirror
 help / color / mirror / Atom feed
From: Pankaj Gupta <pagupta@redhat.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
Cc: linux-nvdimm@lists.01.org
Subject: Re: [PATCH] libnvdimm/region: Update is_nvdimm_sync check to handle volatile regions
Date: Tue, 24 Sep 2019 07:52:58 -0400 (EDT)	[thread overview]
Message-ID: <35214623.2704138.1569325978098.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20190924114327.14700-1-aneesh.kumar@linux.ibm.com>


> 
> We should consider volatile regions synchronous so that we are resilient to
> OS crashes. This is needed when we have hypervisor like KVM exporting a
> ramdisk
> as pmem dimms.
> 
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
> ---
>  drivers/nvdimm/region_devs.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/nvdimm/region_devs.c b/drivers/nvdimm/region_devs.c
> index ab91890f2486..ef423ba1a711 100644
> --- a/drivers/nvdimm/region_devs.c
> +++ b/drivers/nvdimm/region_devs.c
> @@ -1168,6 +1168,9 @@ EXPORT_SYMBOL_GPL(nvdimm_has_cache);
>  
>  bool is_nvdimm_sync(struct nd_region *nd_region)
>  {
> +	if (is_nd_volatile(&nd_region->dev))
> +		return true;
> +
>  	return is_nd_pmem(&nd_region->dev) &&
>  		!test_bit(ND_REGION_ASYNC, &nd_region->flags);
>  }
> --
> 2.21.0

Reviewed-by: Pankaj Gupta <pagupta@redhat.com>

> 
> _______________________________________________
> Linux-nvdimm mailing list
> Linux-nvdimm@lists.01.org
> https://lists.01.org/mailman/listinfo/linux-nvdimm
> 
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

  reply	other threads:[~2019-09-24 11:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-24 11:43 [PATCH] libnvdimm/region: Update is_nvdimm_sync check to handle volatile regions Aneesh Kumar K.V
2019-09-24 11:52 ` Pankaj Gupta [this message]
2019-09-24 16:57 ` Dan Williams
2019-09-24 17:12   ` Dan Williams
2019-09-25  3:54     ` Aneesh Kumar K.V

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=35214623.2704138.1569325978098.JavaMail.zimbra@redhat.com \
    --to=pagupta@redhat.com \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=linux-nvdimm@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).