Displaying 20 results from an estimated 28 matches for "tcm_vhost_mutex".
2013 Apr 25
9
[PATCH v11 0/4] tcm_vhost hotplug
Changes in v11
- Drop change log histroy in commit log
Changes in v10
- Drop comments about lun
- Add Enable VIRTIO_SCSI_F_HOTPLUG to this series
Changes in v9
- Drop tcm_vhost_check_feature
- Add Refactor the lock nesting rule to this sereis
Asias He (4):
tcm_vhost: Refactor the lock nesting rule
tcm_vhost: Add hotplug/hotunplug support
tcm_vhost: Add ioctl to get and set events missed
2013 Apr 25
9
[PATCH v11 0/4] tcm_vhost hotplug
Changes in v11
- Drop change log histroy in commit log
Changes in v10
- Drop comments about lun
- Add Enable VIRTIO_SCSI_F_HOTPLUG to this series
Changes in v9
- Drop tcm_vhost_check_feature
- Add Refactor the lock nesting rule to this sereis
Asias He (4):
tcm_vhost: Refactor the lock nesting rule
tcm_vhost: Add hotplug/hotunplug support
tcm_vhost: Add ioctl to get and set events missed
2013 Apr 25
6
[PATCH v10 0/4] tcm_vhost hotplug
Asias He (4):
tcm_vhost: Refactor the lock nesting rule
tcm_vhost: Add hotplug/hotunplug support
tcm_vhost: Add ioctl to get and set events missed flag
tcm_vhost: Enable VIRTIO_SCSI_F_HOTPLUG
drivers/vhost/tcm_vhost.c | 262 +++++++++++++++++++++++++++++++++++++++++++---
drivers/vhost/tcm_vhost.h | 13 +++
2 files changed, 259 insertions(+), 16 deletions(-)
--
1.8.1.4
2013 Apr 25
6
[PATCH v10 0/4] tcm_vhost hotplug
Asias He (4):
tcm_vhost: Refactor the lock nesting rule
tcm_vhost: Add hotplug/hotunplug support
tcm_vhost: Add ioctl to get and set events missed flag
tcm_vhost: Enable VIRTIO_SCSI_F_HOTPLUG
drivers/vhost/tcm_vhost.c | 262 +++++++++++++++++++++++++++++++++++++++++++---
drivers/vhost/tcm_vhost.h | 13 +++
2 files changed, 259 insertions(+), 16 deletions(-)
--
1.8.1.4
2015 Jan 26
1
[PATCH] vhost-scsi: introduce an ioctl to get the minimum tpgt
...ers/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_tport = tv_tpg->tport;
+
+ if (!strcmp(tv_tport->tport_name, t->vhost_wwpn)) {
+ if (tpgt < 0)
+ tpgt = tv_tpg->tport_tpgt;
+ else if (tpgt > tv_tpg->tport_t...
2015 Jan 26
1
[PATCH] vhost-scsi: introduce an ioctl to get the minimum tpgt
...ers/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_tport = tv_tpg->tport;
+
+ if (!strcmp(tv_tport->tport_name, t->vhost_wwpn)) {
+ if (tpgt < 0)
+ tpgt = tv_tpg->tport_tpgt;
+ else if (tpgt > tv_tpg->tport_t...
2013 Feb 05
0
[PATCH v3] tcm_vhost: Multi-target support
...tpg *tv_tpg;
- int index;
+ bool match = false;
+ int index, ret;
mutex_lock(&vs->dev.mutex);
/* Verify that ring has been setup correctly. */
@@ -754,7 +783,6 @@ static int vhost_scsi_set_endpoint(
return -EFAULT;
}
}
- mutex_unlock(&vs->dev.mutex);
mutex_lock(&tcm_vhost_mutex);
list_for_each_entry(tv_tpg, &tcm_vhost_list, tv_tpg_list) {
@@ -769,30 +797,33 @@ static int vhost_scsi_set_endpoint(
}
tv_tport = tv_tpg->tport;
- if (!strcmp(tv_tport->tport_name, t->vhost_wwpn) &&
- (tv_tpg->tport_tpgt == t->vhost_tpgt)) {
- tv_tpg-...
2013 Feb 05
0
[PATCH v3] tcm_vhost: Multi-target support
...tpg *tv_tpg;
- int index;
+ bool match = false;
+ int index, ret;
mutex_lock(&vs->dev.mutex);
/* Verify that ring has been setup correctly. */
@@ -754,7 +783,6 @@ static int vhost_scsi_set_endpoint(
return -EFAULT;
}
}
- mutex_unlock(&vs->dev.mutex);
mutex_lock(&tcm_vhost_mutex);
list_for_each_entry(tv_tpg, &tcm_vhost_list, tv_tpg_list) {
@@ -769,30 +797,33 @@ static int vhost_scsi_set_endpoint(
}
tv_tport = tv_tpg->tport;
- if (!strcmp(tv_tport->tport_name, t->vhost_wwpn) &&
- (tv_tpg->tport_tpgt == t->vhost_tpgt)) {
- tv_tpg-...
2013 Feb 01
1
[PATCH v2] tcm_vhost: Multi-target support
...tport;
- if (!strcmp(tv_tport->tport_name, t->vhost_wwpn) &&
- (tv_tpg->tport_tpgt == t->vhost_tpgt)) {
+ if (!strcmp(tv_tport->tport_name, t->vhost_wwpn)) {
tv_tpg->tv_tpg_vhost_count++;
- mutex_unlock(&tv_tpg->tv_tpg_mutex);
- mutex_unlock(&tcm_vhost_mutex);
mutex_lock(&vs->dev.mutex);
- if (vs->vs_tpg) {
+ if (vs->vs_tpg[tv_tpg->tport_tpgt]) {
mutex_unlock(&vs->dev.mutex);
mutex_lock(&tv_tpg->tv_tpg_mutex);
tv_tpg->tv_tpg_vhost_count--;
@@ -786,15 +810,24 @@ static int vhost_scsi_set_endpoint...
2013 Feb 01
1
[PATCH v2] tcm_vhost: Multi-target support
...tport;
- if (!strcmp(tv_tport->tport_name, t->vhost_wwpn) &&
- (tv_tpg->tport_tpgt == t->vhost_tpgt)) {
+ if (!strcmp(tv_tport->tport_name, t->vhost_wwpn)) {
tv_tpg->tv_tpg_vhost_count++;
- mutex_unlock(&tv_tpg->tv_tpg_mutex);
- mutex_unlock(&tcm_vhost_mutex);
mutex_lock(&vs->dev.mutex);
- if (vs->vs_tpg) {
+ if (vs->vs_tpg[tv_tpg->tport_tpgt]) {
mutex_unlock(&vs->dev.mutex);
mutex_lock(&tv_tpg->tv_tpg_mutex);
tv_tpg->tv_tpg_vhost_count--;
@@ -786,15 +810,24 @@ static int vhost_scsi_set_endpoint...
2013 Jan 31
1
[PATCH] tcm_vhost: Multi-target support
...tport;
- if (!strcmp(tv_tport->tport_name, t->vhost_wwpn) &&
- (tv_tpg->tport_tpgt == t->vhost_tpgt)) {
+ if (!strcmp(tv_tport->tport_name, t->vhost_wwpn)) {
tv_tpg->tv_tpg_vhost_count++;
- mutex_unlock(&tv_tpg->tv_tpg_mutex);
- mutex_unlock(&tcm_vhost_mutex);
mutex_lock(&vs->dev.mutex);
- if (vs->vs_tpg) {
+ if (vs->vs_tpg[tv_tpg->tport_tpgt - 1]) {
mutex_unlock(&vs->dev.mutex);
mutex_lock(&tv_tpg->tv_tpg_mutex);
tv_tpg->tv_tpg_vhost_count--;
@@ -786,15 +811,17 @@ static int vhost_scsi_set_endp...
2013 Jan 31
1
[PATCH] tcm_vhost: Multi-target support
...tport;
- if (!strcmp(tv_tport->tport_name, t->vhost_wwpn) &&
- (tv_tpg->tport_tpgt == t->vhost_tpgt)) {
+ if (!strcmp(tv_tport->tport_name, t->vhost_wwpn)) {
tv_tpg->tv_tpg_vhost_count++;
- mutex_unlock(&tv_tpg->tv_tpg_mutex);
- mutex_unlock(&tcm_vhost_mutex);
mutex_lock(&vs->dev.mutex);
- if (vs->vs_tpg) {
+ if (vs->vs_tpg[tv_tpg->tport_tpgt - 1]) {
mutex_unlock(&vs->dev.mutex);
mutex_lock(&tv_tpg->tv_tpg_mutex);
tv_tpg->tv_tpg_vhost_count--;
@@ -786,15 +811,17 @@ static int vhost_scsi_set_endp...
2013 May 03
5
[PATCH 0/5] vhost-scsi cleanup
Asias He (5):
vhost-scsi: Remove unnecessary forward struct vhost_scsi declaration
vhost-scsi: Rename struct vhost_scsi *s to *vs
vhost-scsi: Make func indention more consistent
vhost-scsi: Rename struct tcm_vhost_tpg *tv_tpg to *tpg
vhost-scsi: Rename struct tcm_vhost_cmd *tv_cmd to *cmd
drivers/vhost/scsi.c | 469 +++++++++++++++++++++++++++------------------------
1 file changed,
2013 May 03
5
[PATCH 0/5] vhost-scsi cleanup
Asias He (5):
vhost-scsi: Remove unnecessary forward struct vhost_scsi declaration
vhost-scsi: Rename struct vhost_scsi *s to *vs
vhost-scsi: Make func indention more consistent
vhost-scsi: Rename struct tcm_vhost_tpg *tv_tpg to *tpg
vhost-scsi: Rename struct tcm_vhost_cmd *tv_cmd to *cmd
drivers/vhost/scsi.c | 469 +++++++++++++++++++++++++++------------------------
1 file changed,
2012 Jul 26
2
[RFC-v5] tcm_vhost: Initial merge for vhost level target fabric driver
...ion_list */
+};
+
+/* Local pointer to allocated TCM configfs fabric module */
+static struct target_fabric_configfs *tcm_vhost_fabric_configfs;
+
+static struct workqueue_struct *tcm_vhost_workqueue;
+
+/* Global spinlock to protect tcm_vhost TPG list for vhost IOCTL access */
+static DEFINE_MUTEX(tcm_vhost_mutex);
+static LIST_HEAD(tcm_vhost_list);
+
+static int tcm_vhost_check_true(struct se_portal_group *se_tpg)
+{
+ return 1;
+}
+
+static int tcm_vhost_check_false(struct se_portal_group *se_tpg)
+{
+ return 0;
+}
+
+static char *tcm_vhost_get_fabric_name(void)
+{
+ return "vhost";
+}
+
+static...
2012 Jul 26
2
[RFC-v5] tcm_vhost: Initial merge for vhost level target fabric driver
...ion_list */
+};
+
+/* Local pointer to allocated TCM configfs fabric module */
+static struct target_fabric_configfs *tcm_vhost_fabric_configfs;
+
+static struct workqueue_struct *tcm_vhost_workqueue;
+
+/* Global spinlock to protect tcm_vhost TPG list for vhost IOCTL access */
+static DEFINE_MUTEX(tcm_vhost_mutex);
+static LIST_HEAD(tcm_vhost_list);
+
+static int tcm_vhost_check_true(struct se_portal_group *se_tpg)
+{
+ return 1;
+}
+
+static int tcm_vhost_check_false(struct se_portal_group *se_tpg)
+{
+ return 0;
+}
+
+static char *tcm_vhost_get_fabric_name(void)
+{
+ return "vhost";
+}
+
+static...
2012 Jul 30
0
[PATCH] tcm_vhost: Post-merge review changes requested by MST
...}
static void vhost_scsi_handle_kick(struct vhost_work *work)
@@ -825,11 +822,6 @@ static int vhost_scsi_set_endpoint(
return -EFAULT;
}
}
-
- if (vs->vs_tpg) {
- mutex_unlock(&vs->dev.mutex);
- return -EEXIST;
- }
mutex_unlock(&vs->dev.mutex);
mutex_lock(&tcm_vhost_mutex);
@@ -839,7 +831,7 @@ static int vhost_scsi_set_endpoint(
mutex_unlock(&tv_tpg->tv_tpg_mutex);
continue;
}
- if (atomic_read(&tv_tpg->tv_tpg_vhost_count)) {
+ if (tv_tpg->tv_tpg_vhost_count != 0) {
mutex_unlock(&tv_tpg->tv_tpg_mutex);
continue;
}
@@ -...
2012 Jul 30
0
[PATCH] tcm_vhost: Post-merge review changes requested by MST
...}
static void vhost_scsi_handle_kick(struct vhost_work *work)
@@ -825,11 +822,6 @@ static int vhost_scsi_set_endpoint(
return -EFAULT;
}
}
-
- if (vs->vs_tpg) {
- mutex_unlock(&vs->dev.mutex);
- return -EEXIST;
- }
mutex_unlock(&vs->dev.mutex);
mutex_lock(&tcm_vhost_mutex);
@@ -839,7 +831,7 @@ static int vhost_scsi_set_endpoint(
mutex_unlock(&tv_tpg->tv_tpg_mutex);
continue;
}
- if (atomic_read(&tv_tpg->tv_tpg_vhost_count)) {
+ if (tv_tpg->tv_tpg_vhost_count != 0) {
mutex_unlock(&tv_tpg->tv_tpg_mutex);
continue;
}
@@ -...
2012 Jul 18
6
[RFC-v3 0/4] tcm_vhost+cmwq fabric driver code for-3.6
From: Nicholas Bellinger <nab at linux-iscsi.org>
Hi folks,
The following is the RFC-v3 series of tcm_vhost target fabric driver code
currently in-flight for-3.6 mainline code.
With the merge window opening soon, the tcm_vhost code has started seeing
time in linux-next. The v2 -> v3 changelog from the last week is currently
looking like:
*) Unlock on error in tcm_vhost_drop_nexus()
2012 Jul 18
6
[RFC-v3 0/4] tcm_vhost+cmwq fabric driver code for-3.6
From: Nicholas Bellinger <nab at linux-iscsi.org>
Hi folks,
The following is the RFC-v3 series of tcm_vhost target fabric driver code
currently in-flight for-3.6 mainline code.
With the merge window opening soon, the tcm_vhost code has started seeing
time in linux-next. The v2 -> v3 changelog from the last week is currently
looking like:
*) Unlock on error in tcm_vhost_drop_nexus()