linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vhost-scsi: return -ENOENT when no matching tcm_vhost_tpg found
@ 2013-05-28  8:54 Wenchao Xia
  2013-05-28  9:25 ` Asias He
  0 siblings, 1 reply; 4+ messages in thread
From: Wenchao Xia @ 2013-05-28  8:54 UTC (permalink / raw)
  To: linux-next
  Cc: wenchaolinuxkvm, mst, kvm, virtualization, asias, pbonzini, nab,
	Wenchao Xia

ioctl for VHOST_SCSI_SET_ENDPOINT report file exist errori, when I forget
to set it correctly in configfs, make user confused. Actually it fail
to find a matching one, so change the error value.

Signed-off-by: Wenchao Xia <wenchaolinux@gmail.com>
---
 drivers/vhost/scsi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c
index 7014202..6325b1d 100644
--- a/drivers/vhost/scsi.c
+++ b/drivers/vhost/scsi.c
@@ -1219,7 +1219,7 @@ static int vhost_scsi_set_endpoint(
 		}
 		ret = 0;
 	} else {
-		ret = -EEXIST;
+		ret = -ENOENT;
 	}
 
 	/*
-- 
1.7.1


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

* Re: [PATCH] vhost-scsi: return -ENOENT when no matching tcm_vhost_tpg found
  2013-05-28  8:54 [PATCH] vhost-scsi: return -ENOENT when no matching tcm_vhost_tpg found Wenchao Xia
@ 2013-05-28  9:25 ` Asias He
  2013-06-12  1:39   ` wenchao
  0 siblings, 1 reply; 4+ messages in thread
From: Asias He @ 2013-05-28  9:25 UTC (permalink / raw)
  To: Wenchao Xia
  Cc: kvm, mst, virtualization, linux-next, wenchaolinuxkvm, pbonzini

On Tue, May 28, 2013 at 04:54:44PM +0800, Wenchao Xia wrote:
> ioctl for VHOST_SCSI_SET_ENDPOINT report file exist errori, when I forget
> to set it correctly in configfs, make user confused. Actually it fail
> to find a matching one, so change the error value.
> 
> Signed-off-by: Wenchao Xia <wenchaolinux@gmail.com>

Acked-by: Asias He <asias@redhat.com>

BTW, It would be nice to print more informative info in qemu when wwpn
is not available as well.

> ---
>  drivers/vhost/scsi.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c
> index 7014202..6325b1d 100644
> --- a/drivers/vhost/scsi.c
> +++ b/drivers/vhost/scsi.c
> @@ -1219,7 +1219,7 @@ static int vhost_scsi_set_endpoint(
>  		}
>  		ret = 0;
>  	} else {
> -		ret = -EEXIST;
> +		ret = -ENOENT;
>  	}
>  
>  	/*
> -- 
> 1.7.1
> 

-- 
Asias

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

* Re: [PATCH] vhost-scsi: return -ENOENT when no matching tcm_vhost_tpg found
  2013-05-28  9:25 ` Asias He
@ 2013-06-12  1:39   ` wenchao
  2013-06-12  3:03     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 4+ messages in thread
From: wenchao @ 2013-06-12  1:39 UTC (permalink / raw)
  To: Asias He
  Cc: kvm, mst, Greg Kroah-Hartman, virtualization, linux-next,
	wenchaolinuxkvm, pbonzini

cc to Greg for 3.9.

> On Tue, May 28, 2013 at 04:54:44PM +0800, Wenchao Xia wrote:
>> ioctl for VHOST_SCSI_SET_ENDPOINT report file exist errori, when I forget
>> to set it correctly in configfs, make user confused. Actually it fail
>> to find a matching one, so change the error value.
>>
>> Signed-off-by: Wenchao Xia <wenchaolinux@gmail.com>
>
> Acked-by: Asias He <asias@redhat.com>
>
> BTW, It would be nice to print more informative info in qemu when wwpn
> is not available as well.
>
>> ---
>>   drivers/vhost/scsi.c |    2 +-
>>   1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c
>> index 7014202..6325b1d 100644
>> --- a/drivers/vhost/scsi.c
>> +++ b/drivers/vhost/scsi.c
>> @@ -1219,7 +1219,7 @@ static int vhost_scsi_set_endpoint(
>>   		}
>>   		ret = 0;
>>   	} else {
>> -		ret = -EEXIST;
>> +		ret = -ENOENT;
>>   	}
>>
>>   	/*
>> --
>> 1.7.1
>>
>

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

* Re: [PATCH] vhost-scsi: return -ENOENT when no matching tcm_vhost_tpg found
  2013-06-12  1:39   ` wenchao
@ 2013-06-12  3:03     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2013-06-12  3:03 UTC (permalink / raw)
  To: wenchao
  Cc: Asias He, linux-next, wenchaolinuxkvm, mst, kvm, virtualization,
	pbonzini, nab

On Wed, Jun 12, 2013 at 09:39:50AM +0800, wenchao wrote:
> cc to Greg for 3.9.

<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree.  Please read Documentation/stable_kernel_rules.txt
for how to do this properly.

</formletter>

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

end of thread, other threads:[~2013-06-12  3:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-28  8:54 [PATCH] vhost-scsi: return -ENOENT when no matching tcm_vhost_tpg found Wenchao Xia
2013-05-28  9:25 ` Asias He
2013-06-12  1:39   ` wenchao
2013-06-12  3:03     ` Greg Kroah-Hartman

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