Displaying 2 results from an estimated 2 matches for "vhost_scsi_get_first_tpgt".
2015 Jan 26
1
[PATCH] vhost-scsi: introduce an ioctl to get the minimum tpgt
...+++++++++++++++++++++++
include/uapi/linux/vhost.h | 2 ++
2 files changed, 43 insertions(+)
diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c
index d695b16..12e79b9 100644
--- a/drivers/vhost/scsi.c
+++ b/drivers/vhost/scsi.c
@@ -1522,6 +1522,38 @@ err_dev:
return ret;
}
+static int vhost_scsi_get_first_tpgt(
+ struct vhost_scsi *vs,
+ struct vhost_scsi_target *t)
+{
+ struct tcm_vhost_tpg *tv_tpg;
+ struct tcm_vhost_tport *tv_tport;
+ int tpgt = -1;
+
+ mutex_lock(&tcm_vhost_mutex);
+ mutex_lock(&vs->dev.mutex);
+
+ list_for_each_entry(tv_tpg, &tcm_vhost_list, tv_tpg_list) {
+ tv_tpo...
2015 Jan 26
1
[PATCH] vhost-scsi: introduce an ioctl to get the minimum tpgt
...+++++++++++++++++++++++
include/uapi/linux/vhost.h | 2 ++
2 files changed, 43 insertions(+)
diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c
index d695b16..12e79b9 100644
--- a/drivers/vhost/scsi.c
+++ b/drivers/vhost/scsi.c
@@ -1522,6 +1522,38 @@ err_dev:
return ret;
}
+static int vhost_scsi_get_first_tpgt(
+ struct vhost_scsi *vs,
+ struct vhost_scsi_target *t)
+{
+ struct tcm_vhost_tpg *tv_tpg;
+ struct tcm_vhost_tport *tv_tport;
+ int tpgt = -1;
+
+ mutex_lock(&tcm_vhost_mutex);
+ mutex_lock(&vs->dev.mutex);
+
+ list_for_each_entry(tv_tpg, &tcm_vhost_list, tv_tpg_list) {
+ tv_tpo...