search for: tv_tpg

Displaying 20 results from an estimated 46 matches for "tv_tpg".

2013 Jan 31
1
[PATCH] tcm_vhost: Multi-target support
...arget; }; /* 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) break;...
2013 Jan 31
1
[PATCH] tcm_vhost: Multi-target support
...arget; }; /* 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) break;...
2013 Feb 01
1
[PATCH v2] tcm_vhost: Multi-target support
...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(struct vhost_...
2013 Feb 01
1
[PATCH v2] tcm_vhost: Multi-target support
...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(struct vhost_...
2013 Feb 05
0
[PATCH v3] tcm_vhost: Multi-target support
...struct vhost_dev dev; struct vhost_virtqueue vqs[3]; @@ -564,10 +570,10 @@ 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)) + if (unlikely(!vs->vs_endpoint)) return; mutex_lock(&vq->mutex); @@ -635,6 +641,28 @@ static void vhost_scsi_handle_vq(struct vhost_scsi *vs) break; } + /* Extract the tpgt */ + target = v_req.lun[1]; + tv_tpg = vs->vs_tpg[t...
2013 Feb 05
0
[PATCH v3] tcm_vhost: Multi-target support
...struct vhost_dev dev; struct vhost_virtqueue vqs[3]; @@ -564,10 +570,10 @@ 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)) + if (unlikely(!vs->vs_endpoint)) return; mutex_lock(&vq->mutex); @@ -635,6 +641,28 @@ static void vhost_scsi_handle_vq(struct vhost_scsi *vs) break; } + /* Extract the tpgt */ + target = v_req.lun[1]; + tv_tpg = vs->vs_tpg[t...
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, 245 insertions(+), 224 deletions(-) -- 1.8.1.4
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, 245 insertions(+), 224 deletions(-) -- 1.8.1.4
2012 Jul 30
0
[PATCH] tcm_vhost: Post-merge review changes requested by MST
...omplete_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_scsi_clear_endpoint() - Add enum for VQ numbers, add usage in vho...
2012 Jul 30
0
[PATCH] tcm_vhost: Post-merge review changes requested by MST
...omplete_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_scsi_clear_endpoint() - Add enum for VQ numbers, add usage in vho...
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 02
1
[PATCH] tcm_vhost: Use ACCESS_ONCE for vs->vs_tpg[target] access
In vhost_scsi_handle_vq: tv_tpg = vs->vs_tpg[target]; if (!tv_tpg) { .... return } tv_cmd = vhost_scsi_allocate_cmd(tv_tpg, &v_req, 1) vs->vs_tpg[target] might change after the NULL check and 2) the above line might access tv_tpg from vs->vs_tpg[target]. To prevent 2),...
2013 Apr 02
1
[PATCH] tcm_vhost: Use ACCESS_ONCE for vs->vs_tpg[target] access
In vhost_scsi_handle_vq: tv_tpg = vs->vs_tpg[target]; if (!tv_tpg) { .... return } tv_cmd = vhost_scsi_allocate_cmd(tv_tpg, &v_req, 1) vs->vs_tpg[target] might change after the NULL check and 2) the above line might access tv_tpg from vs->vs_tpg[target]. To prevent 2),...
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
2013 May 06
13
[PATCH v2 00/11] vhost cleanups
...vhost: Simplify dev->vqs[i] access vhost-net: Cleanup vhost_ubuf and vhost_zcopy 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/Kconfig | 8 + drivers/vhost/Makefile | 3 +- drivers/vhost/net.c | 64 ++++--- drivers/vhost/scsi.c | 470 ++++++++++++++++++++++++++----------------------- drivers/vhost/vhost.c | 86 +++++++-- drivers/...
2013 May 06
13
[PATCH v2 00/11] vhost cleanups
...vhost: Simplify dev->vqs[i] access vhost-net: Cleanup vhost_ubuf and vhost_zcopy 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/Kconfig | 8 + drivers/vhost/Makefile | 3 +- drivers/vhost/net.c | 64 ++++--- drivers/vhost/scsi.c | 470 ++++++++++++++++++++++++++----------------------- drivers/vhost/vhost.c | 86 +++++++-- drivers/...
2013 Mar 05
3
[PATCH] tcm_vhost: Add hotplug/hotunplug support
...iner_of(vq->dev, struct vhost_scsi, dev); + + if (vs->vs_events_dropped) + tcm_vhost_send_evt(vs, NULL, NULL, VIRTIO_SCSI_T_NO_EVENT, 0); + } static void vhost_scsi_handle_kick(struct vhost_work *work) @@ -815,6 +936,7 @@ static int vhost_scsi_set_endpoint( return -EEXIST; } tv_tpg->tv_tpg_vhost_count++; + tv_tpg->vhost_scsi = vs; vs->vs_tpg[tv_tpg->tport_tpgt] = tv_tpg; smp_mb__after_atomic_inc(); match = true; @@ -875,6 +997,7 @@ static int vhost_scsi_clear_endpoint( goto err; } tv_tpg->tv_tpg_vhost_count--; + tv_tpg->vhost_scsi =...
2013 Mar 05
3
[PATCH] tcm_vhost: Add hotplug/hotunplug support
...iner_of(vq->dev, struct vhost_scsi, dev); + + if (vs->vs_events_dropped) + tcm_vhost_send_evt(vs, NULL, NULL, VIRTIO_SCSI_T_NO_EVENT, 0); + } static void vhost_scsi_handle_kick(struct vhost_work *work) @@ -815,6 +936,7 @@ static int vhost_scsi_set_endpoint( return -EEXIST; } tv_tpg->tv_tpg_vhost_count++; + tv_tpg->vhost_scsi = vs; vs->vs_tpg[tv_tpg->tport_tpgt] = tv_tpg; smp_mb__after_atomic_inc(); match = true; @@ -875,6 +997,7 @@ static int vhost_scsi_clear_endpoint( goto err; } tv_tpg->tv_tpg_vhost_count--; + tv_tpg->vhost_scsi =...