* [Qemu-devel] [PATCH for-2.0] iscsi: Don't set error if already set in iscsi_do_inquiry
@ 2014-04-04 11:53 Fam Zheng
2014-04-04 11:57 ` Paolo Bonzini
2014-04-04 12:21 ` Stefan Hajnoczi
0 siblings, 2 replies; 4+ messages in thread
From: Fam Zheng @ 2014-04-04 11:53 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, Paolo Bonzini, Peter Lieven, Stefan Hajnoczi
This eliminates the possible assertion failure in error_setg().
Signed-off-by: Fam Zheng <famz@redhat.com>
---
block/iscsi.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/block/iscsi.c b/block/iscsi.c
index 21c18a3..64a509f 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -1101,8 +1101,10 @@ static struct scsi_task *iscsi_do_inquiry(struct iscsi_context *iscsi, int lun,
return task;
fail:
- error_setg(errp, "iSCSI: Inquiry command failed : %s",
- iscsi_get_error(iscsi));
+ if (!error_is_set(errp)) {
+ error_setg(errp, "iSCSI: Inquiry command failed : %s",
+ iscsi_get_error(iscsi));
+ }
if (task != NULL) {
scsi_free_scsi_task(task);
}
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH for-2.0] iscsi: Don't set error if already set in iscsi_do_inquiry
2014-04-04 11:53 [Qemu-devel] [PATCH for-2.0] iscsi: Don't set error if already set in iscsi_do_inquiry Fam Zheng
@ 2014-04-04 11:57 ` Paolo Bonzini
2014-04-04 12:12 ` Kevin Wolf
2014-04-04 12:21 ` Stefan Hajnoczi
1 sibling, 1 reply; 4+ messages in thread
From: Paolo Bonzini @ 2014-04-04 11:57 UTC (permalink / raw)
To: Fam Zheng, qemu-devel; +Cc: Kevin Wolf, Peter Lieven, Stefan Hajnoczi
Il 04/04/2014 13:53, Fam Zheng ha scritto:
> This eliminates the possible assertion failure in error_setg().
>
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
> block/iscsi.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/block/iscsi.c b/block/iscsi.c
> index 21c18a3..64a509f 100644
> --- a/block/iscsi.c
> +++ b/block/iscsi.c
> @@ -1101,8 +1101,10 @@ static struct scsi_task *iscsi_do_inquiry(struct iscsi_context *iscsi, int lun,
> return task;
>
> fail:
> - error_setg(errp, "iSCSI: Inquiry command failed : %s",
> - iscsi_get_error(iscsi));
> + if (!error_is_set(errp)) {
> + error_setg(errp, "iSCSI: Inquiry command failed : %s",
> + iscsi_get_error(iscsi));
> + }
> if (task != NULL) {
> scsi_free_scsi_task(task);
> }
>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Kevin, Stefan, can you send the pull request for this?
Paolo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH for-2.0] iscsi: Don't set error if already set in iscsi_do_inquiry
2014-04-04 11:57 ` Paolo Bonzini
@ 2014-04-04 12:12 ` Kevin Wolf
0 siblings, 0 replies; 4+ messages in thread
From: Kevin Wolf @ 2014-04-04 12:12 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: Peter Lieven, Fam Zheng, qemu-devel, Stefan Hajnoczi
Am 04.04.2014 um 13:57 hat Paolo Bonzini geschrieben:
> Il 04/04/2014 13:53, Fam Zheng ha scritto:
> >This eliminates the possible assertion failure in error_setg().
> >
> >Signed-off-by: Fam Zheng <famz@redhat.com>
> >---
> > block/iscsi.c | 6 ++++--
> > 1 file changed, 4 insertions(+), 2 deletions(-)
> >
> >diff --git a/block/iscsi.c b/block/iscsi.c
> >index 21c18a3..64a509f 100644
> >--- a/block/iscsi.c
> >+++ b/block/iscsi.c
> >@@ -1101,8 +1101,10 @@ static struct scsi_task *iscsi_do_inquiry(struct iscsi_context *iscsi, int lun,
> > return task;
> >
> > fail:
> >- error_setg(errp, "iSCSI: Inquiry command failed : %s",
> >- iscsi_get_error(iscsi));
> >+ if (!error_is_set(errp)) {
> >+ error_setg(errp, "iSCSI: Inquiry command failed : %s",
> >+ iscsi_get_error(iscsi));
> >+ }
> > if (task != NULL) {
> > scsi_free_scsi_task(task);
> > }
> >
>
> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
>
> Kevin, Stefan, can you send the pull request for this?
Thanks, applied to the block branch.
Kevin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH for-2.0] iscsi: Don't set error if already set in iscsi_do_inquiry
2014-04-04 11:53 [Qemu-devel] [PATCH for-2.0] iscsi: Don't set error if already set in iscsi_do_inquiry Fam Zheng
2014-04-04 11:57 ` Paolo Bonzini
@ 2014-04-04 12:21 ` Stefan Hajnoczi
1 sibling, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2014-04-04 12:21 UTC (permalink / raw)
To: Fam Zheng; +Cc: Kevin Wolf, Paolo Bonzini, Peter Lieven, qemu-devel
On Fri, Apr 04, 2014 at 07:53:29PM +0800, Fam Zheng wrote:
> This eliminates the possible assertion failure in error_setg().
>
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
> block/iscsi.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-04-04 12:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-04 11:53 [Qemu-devel] [PATCH for-2.0] iscsi: Don't set error if already set in iscsi_do_inquiry Fam Zheng
2014-04-04 11:57 ` Paolo Bonzini
2014-04-04 12:12 ` Kevin Wolf
2014-04-04 12:21 ` Stefan Hajnoczi
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).