Skip to contentSkip to conversation

vhost-scsi: return -ENOENT when no matching tcm_vhost_tpg found

PATCH In review Wenchao Xia 3 participants 5 messages May 28, 2013 – Jun 12, 2013

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vhost-scsi: return -ENOENT when no matching tcm_vhost_tpg found

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.

---
 drivers/vhost/scsi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/vhost/scsi.c +1 -1
index 7014202..6325b1d 100644
@@ -1219,7 +1219,7 @@ static int vhost_scsi_set_endpoint(
 		}
 		ret = 0;
 	} else {
-		ret = -EEXIST;
+		ret = -ENOENT;
 	}
 
 	/*
Signature · 1 line
1.7.1
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · 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.

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

Quoted 20 lines
---
 drivers/vhost/scsi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/vhost/scsi.c +1 -1
index 7014202..6325b1d 100644
@@ -1219,7 +1219,7 @@ static int vhost_scsi_set_endpoint(
 		}
 		ret = 0;
 	} else {
-		ret = -EEXIST;
+		ret = -ENOENT;
 	}
 
 	/*
Signature · 1 line
1.7.1
Signature · 1 line
Asias
author
#2 lore raw

cc to Greg for 3.9.

Quoted 33 lines · Wenchao Xia
Quoted 5 lines

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.

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

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

1.7.1

#3 lore raw
Quoted 1 line · wenchao

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>

#4 lore raw
In reply to wenchao
Quoted 1 line · wenchao

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>