All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH ndctl] ndctl, region: return the rc value in region_action
@ 2019-04-15  8:23 Yi Zhang
  2019-04-15 16:28 ` Dan Williams
  0 siblings, 1 reply; 4+ messages in thread
From: Yi Zhang @ 2019-04-15  8:23 UTC (permalink / raw)
  To: dave.jiang, dan.j.williams; +Cc: linux-nvdimm

if region_action failed, return the rc valude instead of 0

Signed-off-by: Yi Zhang <yi.zhang@redhat.com>
---
 ndctl/region.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ndctl/region.c b/ndctl/region.c
index 993b3f8..7945007 100644
--- a/ndctl/region.c
+++ b/ndctl/region.c
@@ -89,7 +89,7 @@ static int region_action(struct ndctl_region *region, enum device_action mode)
 		break;
 	}
 
-	return 0;
+	return rc;
 }
 
 static int do_xable_region(const char *region_arg, enum device_action mode,
-- 
2.17.2

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

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

* Re: [PATCH ndctl] ndctl, region: return the rc value in region_action
  2019-04-15  8:23 [PATCH ndctl] ndctl, region: return the rc value in region_action Yi Zhang
@ 2019-04-15 16:28 ` Dan Williams
  2019-04-15 18:29   ` Elliott, Robert (Servers)
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Williams @ 2019-04-15 16:28 UTC (permalink / raw)
  To: Yi Zhang; +Cc: linux-nvdimm

On Mon, Apr 15, 2019 at 1:24 AM Yi Zhang <yi.zhang@redhat.com> wrote:
>
> if region_action failed, return the rc valude instead of 0
>
> Signed-off-by: Yi Zhang <yi.zhang@redhat.com>
> ---
>  ndctl/region.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ndctl/region.c b/ndctl/region.c
> index 993b3f8..7945007 100644
> --- a/ndctl/region.c
> +++ b/ndctl/region.c
> @@ -89,7 +89,7 @@ static int region_action(struct ndctl_region *region, enum device_action mode)
>                 break;
>         }
>
> -       return 0;
> +       return rc;
>  }

Looks good to me:

Reviewed-by: Dan Williams <dan.j.williams@intel.com>
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

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

* RE: [PATCH ndctl] ndctl, region: return the rc value in region_action
  2019-04-15 16:28 ` Dan Williams
@ 2019-04-15 18:29   ` Elliott, Robert (Servers)
  2019-05-08  3:12     ` Yi Zhang
  0 siblings, 1 reply; 4+ messages in thread
From: Elliott, Robert (Servers) @ 2019-04-15 18:29 UTC (permalink / raw)
  To: Dan Williams, Yi Zhang; +Cc: linux-nvdimm



> -----Original Message-----
> From: Linux-nvdimm [mailto:linux-nvdimm-bounces@lists.01.org] On Behalf Of Dan Williams
> Sent: Monday, April 15, 2019 11:29 AM
> Subject: Re: [PATCH ndctl] ndctl, region: return the rc value in region_action
> 
> On Mon, Apr 15, 2019 at 1:24 AM Yi Zhang <yi.zhang@redhat.com> wrote:
> >
> > if region_action failed, return the rc valude instead of 0

valude s/b value

> >
> > Signed-off-by: Yi Zhang <yi.zhang@redhat.com>
> > ---
> >  ndctl/region.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/ndctl/region.c b/ndctl/region.c
> > index 993b3f8..7945007 100644
> > --- a/ndctl/region.c
> > +++ b/ndctl/region.c
> > @@ -89,7 +89,7 @@ static int region_action(struct ndctl_region *region, enum device_action mode)
> >                 break;
> >         }
> >
> > -       return 0;
> > +       return rc;
> >  }
> 
> Looks good to me:
> 
> Reviewed-by: Dan Williams <dan.j.williams@intel.com>

Perhaps a similar change should be made to ndctl_namespace_disable_safe(),
one of the functions called by region_action() whose rc is propagated, to 
propagate the rc from ndctl_namespace_disable_invalidate().




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

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

* Re: [PATCH ndctl] ndctl, region: return the rc value in region_action
  2019-04-15 18:29   ` Elliott, Robert (Servers)
@ 2019-05-08  3:12     ` Yi Zhang
  0 siblings, 0 replies; 4+ messages in thread
From: Yi Zhang @ 2019-05-08  3:12 UTC (permalink / raw)
  To: Elliott, Robert (Servers); +Cc: linux-nvdimm

Hi Elliott

Thanks for your review.

On 4/16/19 2:29 AM, Elliott, Robert (Servers) wrote:
>
>> -----Original Message-----
>> From: Linux-nvdimm [mailto:linux-nvdimm-bounces@lists.01.org] On Behalf Of Dan Williams
>> Sent: Monday, April 15, 2019 11:29 AM
>> Subject: Re: [PATCH ndctl] ndctl, region: return the rc value in region_action
>>
>> On Mon, Apr 15, 2019 at 1:24 AM Yi Zhang <yi.zhang@redhat.com> wrote:
>>> if region_action failed, return the rc valude instead of 0
> valude s/b value

Sorry for the late response, I just found this patch  was merged:

https://git.kernel.org/pub/scm/utils/kernel/ndctl/ndctl.git/commit/?id=9840942d5f6dc0d0e3693956f6733bbbc4e06e3a

>>> Signed-off-by: Yi Zhang <yi.zhang@redhat.com>
>>> ---
>>>   ndctl/region.c | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/ndctl/region.c b/ndctl/region.c
>>> index 993b3f8..7945007 100644
>>> --- a/ndctl/region.c
>>> +++ b/ndctl/region.c
>>> @@ -89,7 +89,7 @@ static int region_action(struct ndctl_region *region, enum device_action mode)
>>>                  break;
>>>          }
>>>
>>> -       return 0;
>>> +       return rc;
>>>   }
>> Looks good to me:
>>
>> Reviewed-by: Dan Williams <dan.j.williams@intel.com>
> Perhaps a similar change should be made to ndctl_namespace_disable_safe(),
> one of the functions called by region_action() whose rc is propagated, to
> propagate the rc from ndctl_namespace_disable_invalidate().

I'm not familiar with the ndctl code, could you help send patch to fix 
it if the change needed.


Thanks

Yi

>
>
>
> _______________________________________________
> 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] 4+ messages in thread

end of thread, other threads:[~2019-05-08  3:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-15  8:23 [PATCH ndctl] ndctl, region: return the rc value in region_action Yi Zhang
2019-04-15 16:28 ` Dan Williams
2019-04-15 18:29   ` Elliott, Robert (Servers)
2019-05-08  3:12     ` Yi Zhang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.