Displaying 20 results from an estimated 52 matches for "vhost_tpgt".
2013 Feb 01
1
[PATCH v2] tcm_vhost: Multi-target support
...m_vhost_tpg *tv_tpg;
+ bool match = false;
int index;
mutex_lock(&vs->dev.mutex);
@@ -771,14 +798,11 @@ 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)) {
+ 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...
2013 Feb 01
1
[PATCH v2] tcm_vhost: Multi-target support
...m_vhost_tpg *tv_tpg;
+ bool match = false;
int index;
mutex_lock(&vs->dev.mutex);
@@ -771,14 +798,11 @@ 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)) {
+ 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...
2013 Jan 31
1
[PATCH] tcm_vhost: Multi-target support
...;
for (i = 0; i < data_num; i++)
exp_data_len += vq->iov[data_first + i].iov_len;
@@ -771,14 +799,11 @@ 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)) {
+ 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...
2013 Jan 31
1
[PATCH] tcm_vhost: Multi-target support
...;
for (i = 0; i < data_num; i++)
exp_data_len += vq->iov[data_first + i].iov_len;
@@ -771,14 +799,11 @@ 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)) {
+ 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...
2013 Feb 05
0
[PATCH v3] tcm_vhost: Multi-target support
..._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->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) {
- mutex_unlock(&vs->dev.mutex);
- mutex_lock(&tv_tpg->tv_tpg_mutex);
- tv_tpg->...
2013 Feb 05
0
[PATCH v3] tcm_vhost: Multi-target support
..._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->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) {
- mutex_unlock(&vs->dev.mutex);
- mutex_lock(&tv_tpg->tv_tpg_mutex);
- tv_tpg->...
2012 Jul 24
2
[PATCH 0/2] vhost-scsi: Check for tcm_vhost ABI version
From: Nicholas Bellinger <nab at linux-iscsi.org>
Hi Anthony,
Here are the two patches against Zhi's vhost-scsi tree to check for
a supported version (VHOST_SCSI_ABI_VERSION=1) that's now exposed via
the tcm_vhost ioctl.
Please have a look and let me know if this is what you had in mind.
Thanks!
Nicholas Bellinger (2):
vhost-scsi: Rename vhost_vring_target ->
2012 Jul 24
2
[PATCH 0/2] vhost-scsi: Check for tcm_vhost ABI version
From: Nicholas Bellinger <nab at linux-iscsi.org>
Hi Anthony,
Here are the two patches against Zhi's vhost-scsi tree to check for
a supported version (VHOST_SCSI_ABI_VERSION=1) that's now exposed via
the tcm_vhost ioctl.
Please have a look and let me know if this is what you had in mind.
Thanks!
Nicholas Bellinger (2):
vhost-scsi: Rename vhost_vring_target ->
2012 Jul 31
2
[GIT PULL] tcm_vhost: Initial merge of vhost level target fabric driver
Hi Linus,
Here is the PULL request for the initial merge of tcm_vhost based on
RFC-v5 code with MST's ACK appended to the initial merge commit.
As promised, the commit is available from two different branches for you
to consider merging as for-3.6 code.
The 'for-next-merge' branch based on mainline commit 7409a6657ae using
3.5-rc2 code contains two duplicates of pre-merge vhost patch
2012 Jul 31
2
[GIT PULL] tcm_vhost: Initial merge of vhost level target fabric driver
Hi Linus,
Here is the PULL request for the initial merge of tcm_vhost based on
RFC-v5 code with MST's ACK appended to the initial merge commit.
As promised, the commit is available from two different branches for you
to consider merging as for-3.6 code.
The 'for-next-merge' branch based on mainline commit 7409a6657ae using
3.5-rc2 code contains two duplicates of pre-merge vhost patch
2012 Jul 30
0
[PATCH] tcm_vhost: Post-merge review changes requested by MST
...tpg_vhost_count)) {
+ if (tv_tpg->tv_tpg_vhost_count != 0) {
mutex_unlock(&tv_tpg->tv_tpg_mutex);
continue;
}
@@ -847,14 +839,20 @@ static int vhost_scsi_set_endpoint(
if (!strcmp(tv_tport->tport_name, t->vhost_wwpn) &&
(tv_tpg->tport_tpgt == t->vhost_tpgt)) {
- atomic_inc(&tv_tpg->tv_tpg_vhost_count);
- smp_mb__after_atomic_inc();
+ 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) {
+ mutex_unlock(&a...
2012 Jul 30
0
[PATCH] tcm_vhost: Post-merge review changes requested by MST
...tpg_vhost_count)) {
+ if (tv_tpg->tv_tpg_vhost_count != 0) {
mutex_unlock(&tv_tpg->tv_tpg_mutex);
continue;
}
@@ -847,14 +839,20 @@ static int vhost_scsi_set_endpoint(
if (!strcmp(tv_tport->tport_name, t->vhost_wwpn) &&
(tv_tpg->tport_tpgt == t->vhost_tpgt)) {
- atomic_inc(&tv_tpg->tv_tpg_vhost_count);
- smp_mb__after_atomic_inc();
+ 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) {
+ mutex_unlock(&a...
2013 May 02
5
[PATCH 0/3] vhost-scsi: file renames
This reorgs the files a bit, renaming tcm_vhost to
vhost_scsi as that's how userspace refers to it.
While at it, cleanup some leftovers from when it was a
staging driver.
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
Michael S. Tsirkin (3):
vhost: src file renames
tcm_vhost: header split up
vhost_scsi: module rename
drivers/vhost/Kconfig | 10 ++-
2013 May 02
5
[PATCH 0/3] vhost-scsi: file renames
This reorgs the files a bit, renaming tcm_vhost to
vhost_scsi as that's how userspace refers to it.
While at it, cleanup some leftovers from when it was a
staging driver.
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
Michael S. Tsirkin (3):
vhost: src file renames
tcm_vhost: header split up
vhost_scsi: module rename
drivers/vhost/Kconfig | 10 ++-
2015 Jan 26
1
[PATCH] vhost-scsi: introduce an ioctl to get the minimum tpgt
...ame, t->vhost_wwpn)) {
+ if (tpgt < 0)
+ tpgt = tv_tpg->tport_tpgt;
+ else if (tpgt > tv_tpg->tport_tpgt)
+ tpgt = tv_tpg->tport_tpgt;
+ }
+ }
+
+ mutex_unlock(&vs->dev.mutex);
+ mutex_unlock(&tcm_vhost_mutex);
+
+ if (tpgt < 0)
+ return -ENXIO;
+
+ t->vhost_tpgt = tpgt;
+ return 0;
+}
+
static int vhost_scsi_set_features(struct vhost_scsi *vs, u64 features)
{
struct vhost_virtqueue *vq;
@@ -1657,6 +1689,15 @@ vhost_scsi_ioctl(struct file *f,
if (put_user(events_missed, eventsp))
return -EFAULT;
return 0;
+ case VHOST_SCSI_GET_TPGT:
+ if (cop...
2015 Jan 26
1
[PATCH] vhost-scsi: introduce an ioctl to get the minimum tpgt
...ame, t->vhost_wwpn)) {
+ if (tpgt < 0)
+ tpgt = tv_tpg->tport_tpgt;
+ else if (tpgt > tv_tpg->tport_tpgt)
+ tpgt = tv_tpg->tport_tpgt;
+ }
+ }
+
+ mutex_unlock(&vs->dev.mutex);
+ mutex_unlock(&tcm_vhost_mutex);
+
+ if (tpgt < 0)
+ return -ENXIO;
+
+ t->vhost_tpgt = tpgt;
+ return 0;
+}
+
static int vhost_scsi_set_features(struct vhost_scsi *vs, u64 features)
{
struct vhost_virtqueue *vq;
@@ -1657,6 +1689,15 @@ vhost_scsi_ioctl(struct file *f,
if (put_user(events_missed, eventsp))
return -EFAULT;
return 0;
+ case VHOST_SCSI_GET_TPGT:
+ if (cop...
2012 Jul 24
1
[PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION
...scsi ABI.
+ *
+ * ABI Rev 0: All pre 2012 revisions used by prototype out-of-tree code
+ * ABI Rev 1: 2012 version for v3.6 kernel merge candiate
+ */
+
+#define VHOST_SCSI_ABI_VERSION 1
+
struct vhost_scsi_target {
+ int abi_version;
unsigned char vhost_wwpn[TRANSPORT_IQN_LEN];
unsigned short vhost_tpgt;
};
@@ -88,3 +98,4 @@ struct vhost_scsi_target {
/* VHOST_SCSI specific defines */
#define VHOST_SCSI_SET_ENDPOINT _IOW(VHOST_VIRTIO, 0x40, struct vhost_scsi_target)
#define VHOST_SCSI_CLEAR_ENDPOINT _IOW(VHOST_VIRTIO, 0x41, struct vhost_scsi_target)
+#define VHOST_SCSI_GET_ABI_VERSION _IOW(VHO...
2012 Jul 24
1
[PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION
...scsi ABI.
+ *
+ * ABI Rev 0: All pre 2012 revisions used by prototype out-of-tree code
+ * ABI Rev 1: 2012 version for v3.6 kernel merge candiate
+ */
+
+#define VHOST_SCSI_ABI_VERSION 1
+
struct vhost_scsi_target {
+ int abi_version;
unsigned char vhost_wwpn[TRANSPORT_IQN_LEN];
unsigned short vhost_tpgt;
};
@@ -88,3 +98,4 @@ struct vhost_scsi_target {
/* VHOST_SCSI specific defines */
#define VHOST_SCSI_SET_ENDPOINT _IOW(VHOST_VIRTIO, 0x40, struct vhost_scsi_target)
#define VHOST_SCSI_CLEAR_ENDPOINT _IOW(VHOST_VIRTIO, 0x41, struct vhost_scsi_target)
+#define VHOST_SCSI_GET_ABI_VERSION _IOW(VHO...
2012 Jul 26
2
[RFC-v5] tcm_vhost: Initial merge for vhost level target fabric driver
...v_tpg_mutex);
+ continue;
+ }
+ if (atomic_read(&tv_tpg->tv_tpg_vhost_count)) {
+ mutex_unlock(&tv_tpg->tv_tpg_mutex);
+ continue;
+ }
+ tv_tport = tv_tpg->tport;
+
+ if (!strcmp(tv_tport->tport_name, t->vhost_wwpn) &&
+ (tv_tpg->tport_tpgt == t->vhost_tpgt)) {
+ atomic_inc(&tv_tpg->tv_tpg_vhost_count);
+ smp_mb__after_atomic_inc();
+ mutex_unlock(&tv_tpg->tv_tpg_mutex);
+ mutex_unlock(&tcm_vhost_mutex);
+
+ mutex_lock(&vs->dev.mutex);
+ vs->vs_tpg = tv_tpg;
+ atomic_inc(&vs->vhost_ref_cnt);
+ smp_mb_...
2012 Jul 26
2
[RFC-v5] tcm_vhost: Initial merge for vhost level target fabric driver
...v_tpg_mutex);
+ continue;
+ }
+ if (atomic_read(&tv_tpg->tv_tpg_vhost_count)) {
+ mutex_unlock(&tv_tpg->tv_tpg_mutex);
+ continue;
+ }
+ tv_tport = tv_tpg->tport;
+
+ if (!strcmp(tv_tport->tport_name, t->vhost_wwpn) &&
+ (tv_tpg->tport_tpgt == t->vhost_tpgt)) {
+ atomic_inc(&tv_tpg->tv_tpg_vhost_count);
+ smp_mb__after_atomic_inc();
+ mutex_unlock(&tv_tpg->tv_tpg_mutex);
+ mutex_unlock(&tcm_vhost_mutex);
+
+ mutex_lock(&vs->dev.mutex);
+ vs->vs_tpg = tv_tpg;
+ atomic_inc(&vs->vhost_ref_cnt);
+ smp_mb_...