Displaying 20 results from an estimated 89 matches for "vhost_scsi_set_endpoint".
2023 Feb 23
5
[PATCH 0/5] vhost-scsi: Fix management operation hangs
The following patches were made over Linus tree and also apply over
mst tree's vhost branch. The patches fix an issue where management
operations like LUN mapping/unmapping and device addition hang for 30
seconds or up to N minutes depending on the device.
The problem is that we use a global mutex to protect the list of tpgs
but we hold that mutex during those management operations. So if you
2013 May 28
2
[PATCH] 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.
Signed-off-by: Wenchao Xia <wenchaolinux at gmail.com>
---
drivers/vhost/scsi.c | 2 +-
1 files changed, 1 insertions(+), 1 del...
2013 May 28
2
[PATCH] 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.
Signed-off-by: Wenchao Xia <wenchaolinux at gmail.com>
---
drivers/vhost/scsi.c | 2 +-
1 files changed, 1 insertions(+), 1 del...
2019 Apr 16
2
[PATCH] vhost/scsi: drop unnecessary smp_mb__after_atomic()
The vhost_scsi.ko code used several atomic variables at one point.
Later they were dropped or converted to regular ints protected by a
mutex.
The commit that made these changes left an unused smp_mb__after_atomic()
in vhost_scsi_set_endpoint(). It was previously used after incrementing
vhost_scsi->vhost_ref_cnt but this field has been dropped:
- atomic_inc(&vs->vhost_ref_cnt);
smp_mb__after_atomic_inc();
Reported-by: Andrea Parri <andrea.parri at amarulasolutions.com>
Fixes: 101998f6fcd680 ("tcm_vh...
2019 Apr 16
2
[PATCH] vhost/scsi: drop unnecessary smp_mb__after_atomic()
The vhost_scsi.ko code used several atomic variables at one point.
Later they were dropped or converted to regular ints protected by a
mutex.
The commit that made these changes left an unused smp_mb__after_atomic()
in vhost_scsi_set_endpoint(). It was previously used after incrementing
vhost_scsi->vhost_ref_cnt but this field has been dropped:
- atomic_inc(&vs->vhost_ref_cnt);
smp_mb__after_atomic_inc();
Reported-by: Andrea Parri <andrea.parri at amarulasolutions.com>
Fixes: 101998f6fcd680 ("tcm_vh...
2013 Jan 31
1
[PATCH] tcm_vhost: Multi-target support
...PORT_IQN_LEN];
+ int vs_num_target;
};
/* Local pointer to allocated TCM configfs fabric module */
@@ -564,13 +569,7 @@ static void vhost_scsi_handle_vq(struct vhost_scsi *vs)
u32 exp_data_len, data_first, data_num, data_direction;
unsigned out, in, i;
int head, ret;
-
- /* Must use ioctl VHOST_SCSI_SET_ENDPOINT */
- tv_tpg = vs->vs_tpg;
- if (unlikely(!tv_tpg)) {
- pr_err("%s endpoint not set\n", __func__);
- return;
- }
+ u8 target;
mutex_lock(&vq->mutex);
vhost_disable_notify(&vs->dev, vq);
@@ -637,6 +636,35 @@ static void vhost_scsi_handle_vq(struct vhost_scsi *vs)...
2013 Jan 31
1
[PATCH] tcm_vhost: Multi-target support
...PORT_IQN_LEN];
+ int vs_num_target;
};
/* Local pointer to allocated TCM configfs fabric module */
@@ -564,13 +569,7 @@ static void vhost_scsi_handle_vq(struct vhost_scsi *vs)
u32 exp_data_len, data_first, data_num, data_direction;
unsigned out, in, i;
int head, ret;
-
- /* Must use ioctl VHOST_SCSI_SET_ENDPOINT */
- tv_tpg = vs->vs_tpg;
- if (unlikely(!tv_tpg)) {
- pr_err("%s endpoint not set\n", __func__);
- return;
- }
+ u8 target;
mutex_lock(&vq->mutex);
vhost_disable_notify(&vs->dev, vq);
@@ -637,6 +636,35 @@ static void vhost_scsi_handle_vq(struct vhost_scsi *vs)...
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 ->
2013 Feb 01
1
[PATCH v2] tcm_vhost: Multi-target support
...N_LEN];
+ bool vs_endpoint;
+
struct vhost_dev dev;
struct vhost_virtqueue vqs[3];
@@ -564,13 +570,11 @@ static void vhost_scsi_handle_vq(struct vhost_scsi *vs)
u32 exp_data_len, data_first, data_num, data_direction;
unsigned out, in, i;
int head, ret;
+ u8 target;
/* Must use ioctl VHOST_SCSI_SET_ENDPOINT */
- tv_tpg = vs->vs_tpg;
- if (unlikely(!tv_tpg)) {
- pr_err("%s endpoint not set\n", __func__);
+ if (unlikely(!vs->vs_endpoint))
return;
- }
mutex_lock(&vq->mutex);
vhost_disable_notify(&vs->dev, vq);
@@ -637,6 +641,28 @@ static void vhost_scsi_handle_vq(s...
2013 Feb 01
1
[PATCH v2] tcm_vhost: Multi-target support
...N_LEN];
+ bool vs_endpoint;
+
struct vhost_dev dev;
struct vhost_virtqueue vqs[3];
@@ -564,13 +570,11 @@ static void vhost_scsi_handle_vq(struct vhost_scsi *vs)
u32 exp_data_len, data_first, data_num, data_direction;
unsigned out, in, i;
int head, ret;
+ u8 target;
/* Must use ioctl VHOST_SCSI_SET_ENDPOINT */
- tv_tpg = vs->vs_tpg;
- if (unlikely(!tv_tpg)) {
- pr_err("%s endpoint not set\n", __func__);
+ if (unlikely(!vs->vs_endpoint))
return;
- }
mutex_lock(&vq->mutex);
vhost_disable_notify(&vs->dev, vq);
@@ -637,6 +641,28 @@ static void vhost_scsi_handle_vq(s...
2013 Feb 05
0
[PATCH v3] tcm_vhost: Multi-target support
...No need to pass the tpgt number in struct vhost_scsi_target to
tcm_vhost.ko. Only wwpn is needed.
3. We can always pass max_target = 255 to guest now, since we abort the
request who's target id does not exist.
Changes in v2:
- Handle non-contiguous tpgt
Changes in v3:
- Simplfy lock in vhost_scsi_set_endpoint
- Return -EEXIST when does not match
Signed-off-by: Asias He <asias at redhat.com>
---
drivers/vhost/tcm_vhost.c | 131 +++++++++++++++++++++++++++++-----------------
drivers/vhost/tcm_vhost.h | 4 +-
2 files changed, 85 insertions(+), 50 deletions(-)
diff --git a/drivers/vhost/tcm_vhost...
2013 Feb 05
0
[PATCH v3] tcm_vhost: Multi-target support
...No need to pass the tpgt number in struct vhost_scsi_target to
tcm_vhost.ko. Only wwpn is needed.
3. We can always pass max_target = 255 to guest now, since we abort the
request who's target id does not exist.
Changes in v2:
- Handle non-contiguous tpgt
Changes in v3:
- Simplfy lock in vhost_scsi_set_endpoint
- Return -EEXIST when does not match
Signed-off-by: Asias He <asias at redhat.com>
---
drivers/vhost/tcm_vhost.c | 131 +++++++++++++++++++++++++++++-----------------
drivers/vhost/tcm_vhost.h | 4 +-
2 files changed, 85 insertions(+), 50 deletions(-)
diff --git a/drivers/vhost/tcm_vhost...
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
2023 Mar 21
8
[PATCH v2 0/7] vhost-scsi: Fix crashes and management op hangs
The following patches were made over Linus tree. The patches fix 3
issues:
1. If a user performs LIO LUN unmapping before the endpoint has been
cleared then we can end up trying to free a bogus tmf struct if the
TMF is still exucuting when we do the unmap.
2. If vhost_scsi_setup_vq_cmds fails we can leave the tpg->vhost_scsi
pointer set and we can end up trying to access a freed struct.
3.
2020 Nov 02
1
[PATCH 07/17] vhost scsi: support delayed IO vq creation
...t_dev_init(create 128 vqs and then later we setup and use N of
>> them);
>>
>> Qemu does ioctl(VHOST_SET_OWNER)
>> vhost_dev_set_owner()
>>
>> For N vqs userspace does:
>> // virtqueue setup related ioctls
>>
>> Qemu does ioctl(VHOST_SCSI_SET_ENDPOINT)
>> - match LIO/target port to vhost_dev
>>
>>
>> So we could change that to:
>>
>> For N IO vqs userspace does
>> open(/dev/vhost-scsi)
>> vhost_dev_init(create IO, evt, and ctl);
>>
>> for N IO vqs Qemu...
2012 Jul 30
0
[PATCH] tcm_vhost: Post-merge review changes requested by MST
...(post-merge) changes, this includes:
- Add locking comment
- Move vhost_scsi_complete_cmd ahead of TFO callbacks in order to
drop forward declarations
- Drop extra '!= NULL' usage in vhost_scsi_complete_cmd_work()
- Change vhost_scsi_*_handle_kick() to use pr_debug
- Fix possible race in vhost_scsi_set_endpoint() for vs->vs_tpg checking
+ assignment.
- Convert tv_tpg->tpg_vhost_count + ->tv_tpg_port_count from atomic_t ->
int, and make sure reference is protected by ->tv_tpg_mutex.
- Drop unnecessary vhost_scsi->vhost_ref_cnt
- Add 'err:' label for exception path in vhost_scs...
2012 Jul 30
0
[PATCH] tcm_vhost: Post-merge review changes requested by MST
...(post-merge) changes, this includes:
- Add locking comment
- Move vhost_scsi_complete_cmd ahead of TFO callbacks in order to
drop forward declarations
- Drop extra '!= NULL' usage in vhost_scsi_complete_cmd_work()
- Change vhost_scsi_*_handle_kick() to use pr_debug
- Fix possible race in vhost_scsi_set_endpoint() for vs->vs_tpg checking
+ assignment.
- Convert tv_tpg->tpg_vhost_count + ->tv_tpg_port_count from atomic_t ->
int, and make sure reference is protected by ->tv_tpg_mutex.
- Drop unnecessary vhost_scsi->vhost_ref_cnt
- Add 'err:' label for exception path in vhost_scs...
2019 Apr 17
0
[PATCH] vhost/scsi: drop unnecessary smp_mb__after_atomic()
On 2019/4/16 ??6:47, Stefan Hajnoczi wrote:
> The vhost_scsi.ko code used several atomic variables at one point.
> Later they were dropped or converted to regular ints protected by a
> mutex.
>
> The commit that made these changes left an unused smp_mb__after_atomic()
> in vhost_scsi_set_endpoint(). It was previously used after incrementing
> vhost_scsi->vhost_ref_cnt but this field has been dropped:
>
> - atomic_inc(&vs->vhost_ref_cnt);
> smp_mb__after_atomic_inc();
>
> Reported-by: Andrea Parri <andrea.parri at amarulasolutions.com>
>...