Linux-NVDIMM Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] libnvdimm/region: Update is_nvdimm_sync check to handle volatile regions
@ 2019-09-24 11:43 Aneesh Kumar K.V
  2019-09-24 11:52 ` Pankaj Gupta
  2019-09-24 16:57 ` Dan Williams
  0 siblings, 2 replies; 5+ messages in thread
From: Aneesh Kumar K.V @ 2019-09-24 11:43 UTC (permalink / raw)
  To: dan.j.williams; +Cc: Aneesh Kumar K.V, linux-nvdimm

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

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] libnvdimm/region: Update is_nvdimm_sync check to handle volatile regions
  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
  2019-09-24 16:57 ` Dan Williams
  1 sibling, 0 replies; 5+ messages in thread
From: Pankaj Gupta @ 2019-09-24 11:52 UTC (permalink / raw)
  To: Aneesh Kumar K.V; +Cc: linux-nvdimm


> 
> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] libnvdimm/region: Update is_nvdimm_sync check to handle volatile regions
  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
@ 2019-09-24 16:57 ` Dan Williams
  2019-09-24 17:12   ` Dan Williams
  1 sibling, 1 reply; 5+ messages in thread
From: Dan Williams @ 2019-09-24 16:57 UTC (permalink / raw)
  To: Aneesh Kumar K.V; +Cc: linux-nvdimm

On Tue, Sep 24, 2019 at 4:43 AM Aneesh Kumar K.V
<aneesh.kumar@linux.ibm.com> wrote:
>
> 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.

We have a hard time understanding what agent is being referenced when
we use "we" in a patch changelog. We would prefer that we consider not
using "we" in favor of explicitly named agents, or otherwise review
the changelog to make sure that "we" is clearly discernable. We will
fix it up this time when applying, but we hope we have made it clear
how confusing liberal use of "we" can be.
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] libnvdimm/region: Update is_nvdimm_sync check to handle volatile regions
  2019-09-24 16:57 ` Dan Williams
@ 2019-09-24 17:12   ` Dan Williams
  2019-09-25  3:54     ` Aneesh Kumar K.V
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Williams @ 2019-09-24 17:12 UTC (permalink / raw)
  To: Aneesh Kumar K.V; +Cc: linux-nvdimm

On Tue, Sep 24, 2019 at 9:57 AM Dan Williams <dan.j.williams@intel.com> wrote:
>
> On Tue, Sep 24, 2019 at 4:43 AM Aneesh Kumar K.V
> <aneesh.kumar@linux.ibm.com> wrote:
> >
> > 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.
>
> We have a hard time understanding what agent is being referenced when
> we use "we" in a patch changelog. We would prefer that we consider not
> using "we" in favor of explicitly named agents, or otherwise review
> the changelog to make sure that "we" is clearly discernable. We will
> fix it up this time when applying, but we hope we have made it clear
> how confusing liberal use of "we" can be.

To be clear, I'm not strictly opposed to using "we" when it is
established which we is being referred and stays constant throughout
the description. This instance caught my eye again because the first
couple "we"s seems to be the kernel, and the last we seems to be a
user platform configuration.
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] libnvdimm/region: Update is_nvdimm_sync check to handle volatile regions
  2019-09-24 17:12   ` Dan Williams
@ 2019-09-25  3:54     ` Aneesh Kumar K.V
  0 siblings, 0 replies; 5+ messages in thread
From: Aneesh Kumar K.V @ 2019-09-25  3:54 UTC (permalink / raw)
  To: Dan Williams; +Cc: linux-nvdimm

Hi Dan,

On 9/24/19 10:42 PM, Dan Williams wrote:
> On Tue, Sep 24, 2019 at 9:57 AM Dan Williams <dan.j.williams@intel.com> wrote:
>>
>> On Tue, Sep 24, 2019 at 4:43 AM Aneesh Kumar K.V
>> <aneesh.kumar@linux.ibm.com> wrote:
>>>
>>> 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.
>>
>> We have a hard time understanding what agent is being referenced when
>> we use "we" in a patch changelog. We would prefer that we consider not
>> using "we" in favor of explicitly named agents, or otherwise review
>> the changelog to make sure that "we" is clearly discernable. We will
>> fix it up this time when applying, but we hope we have made it clear
>> how confusing liberal use of "we" can be.
> 
> To be clear, I'm not strictly opposed to using "we" when it is
> established which we is being referred and stays constant throughout
> the description. This instance caught my eye again because the first
> couple "we"s seems to be the kernel, and the last we seems to be a
> user platform configuration.
> 

Thanks for the feedback. I will take extra care to clearly indicate the 
component/agent next time.

Thanks for taking the patch.

-aneesh

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2019-09-24 16:57 ` Dan Williams
2019-09-24 17:12   ` Dan Williams
2019-09-25  3:54     ` Aneesh Kumar K.V

Linux-NVDIMM Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-nvdimm/0 linux-nvdimm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-nvdimm linux-nvdimm/ https://lore.kernel.org/linux-nvdimm \
		linux-nvdimm@lists.01.org linux-nvdimm@archiver.kernel.org
	public-inbox-index linux-nvdimm

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.01.lists.linux-nvdimm


AGPL code for this site: git clone https://public-inbox.org/ public-inbox