Displaying 20 results from an estimated 30 matches for "vhost_scsi_allocate_cmd".
2013 Mar 11
4
[PATCH] tcm_vhost: Wait for pending requests in vhost_scsi_flush()
...tcm_vhost_evt, list);
llnode = llist_next(llnode);
- tcm_vhost_do_evt_work(vs, &evt->event);
+ tcm_vhost_do_evt_work(vs, evt);
tcm_vhost_free_evt(vs, evt);
}
}
@@ -568,6 +624,7 @@ static void vhost_scsi_complete_cmd_work(struct vhost_work *work)
}
static struct tcm_vhost_cmd *vhost_scsi_allocate_cmd(
+ struct vhost_scsi *vs,
struct tcm_vhost_tpg *tv_tpg,
struct virtio_scsi_cmd_req *v_req,
u32 exp_data_len,
@@ -592,6 +649,8 @@ static struct tcm_vhost_cmd *vhost_scsi_allocate_cmd(
tv_cmd->tvc_exp_data_len = exp_data_len;
tv_cmd->tvc_data_direction = data_direction;
tv_cmd->t...
2013 Mar 11
4
[PATCH] tcm_vhost: Wait for pending requests in vhost_scsi_flush()
...tcm_vhost_evt, list);
llnode = llist_next(llnode);
- tcm_vhost_do_evt_work(vs, &evt->event);
+ tcm_vhost_do_evt_work(vs, evt);
tcm_vhost_free_evt(vs, evt);
}
}
@@ -568,6 +624,7 @@ static void vhost_scsi_complete_cmd_work(struct vhost_work *work)
}
static struct tcm_vhost_cmd *vhost_scsi_allocate_cmd(
+ struct vhost_scsi *vs,
struct tcm_vhost_tpg *tv_tpg,
struct virtio_scsi_cmd_req *v_req,
u32 exp_data_len,
@@ -592,6 +649,8 @@ static struct tcm_vhost_cmd *vhost_scsi_allocate_cmd(
tv_cmd->tvc_exp_data_len = exp_data_len;
tv_cmd->tvc_data_direction = data_direction;
tv_cmd->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,
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 Mar 22
4
[PATCH V2 0/3] tcm_vhost pending requests flush
Changes in v2:
- Increase/Decrease inflight requests in
vhost_scsi_{allocate,free}_cmd and tcm_vhost_{allocate,free}_evt
Asias He (3):
tcm_vhost: Wait for pending requests in vhost_scsi_flush()
tcm_vhost: Wait for pending requests in vhost_scsi_clear_endpoint()
tcm_vhost: Fix tv_cmd leak in vhost_scsi_handle_vq
drivers/vhost/tcm_vhost.c | 131
2013 Mar 22
4
[PATCH V2 0/3] tcm_vhost pending requests flush
Changes in v2:
- Increase/Decrease inflight requests in
vhost_scsi_{allocate,free}_cmd and tcm_vhost_{allocate,free}_evt
Asias He (3):
tcm_vhost: Wait for pending requests in vhost_scsi_flush()
tcm_vhost: Wait for pending requests in vhost_scsi_clear_endpoint()
tcm_vhost: Fix tv_cmd leak in vhost_scsi_handle_vq
drivers/vhost/tcm_vhost.c | 131
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), use
ACCESS_ONCE. Thanks mst for catching this up!
Signed-off-by: Asias He <asias at redhat.com>
---
drivers/vhost/tcm_vhost.c...
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), use
ACCESS_ONCE. Thanks mst for catching this up!
Signed-off-by: Asias He <asias at redhat.com>
---
drivers/vhost/tcm_vhost.c...
2013 May 06
13
[PATCH v2 00/11] vhost cleanups
MST, This is on top of [PATCH 0/2] vhost-net fix ubuf.
Asias He (11):
vhost: Remove vhost_enable_zcopy in vhost.h
vhost: Move VHOST_NET_FEATURES to net.c
vhost: Make vhost a separate module
vhost: Remove comments for hdr in vhost.h
vhost: Simplify dev->vqs[i] access
vhost-net: Cleanup vhost_ubuf and vhost_zcopy
vhost-scsi: Remove unnecessary forward struct vhost_scsi declaration
2013 May 06
13
[PATCH v2 00/11] vhost cleanups
MST, This is on top of [PATCH 0/2] vhost-net fix ubuf.
Asias He (11):
vhost: Remove vhost_enable_zcopy in vhost.h
vhost: Move VHOST_NET_FEATURES to net.c
vhost: Make vhost a separate module
vhost: Remove comments for hdr in vhost.h
vhost: Simplify dev->vqs[i] access
vhost-net: Cleanup vhost_ubuf and vhost_zcopy
vhost-scsi: Remove unnecessary forward struct vhost_scsi declaration
2013 Apr 27
2
[PATCH v6 0/2] tcm_vhost flush
Changes in v6:
- Allow device specific fields per vq
- Track cmd per vq
- Do not track evt
- Switch to static array for inflight allocation, completely get rid of the
pain to handle inflight allocation failure.
Asias He (2):
vhost: Allow device specific fields per vq
tcm_vhost: Wait for pending requests in vhost_scsi_flush()
drivers/vhost/net.c | 60 +++++++++++--------
2013 Apr 27
2
[PATCH v6 0/2] tcm_vhost flush
Changes in v6:
- Allow device specific fields per vq
- Track cmd per vq
- Do not track evt
- Switch to static array for inflight allocation, completely get rid of the
pain to handle inflight allocation failure.
Asias He (2):
vhost: Allow device specific fields per vq
tcm_vhost: Wait for pending requests in vhost_scsi_flush()
drivers/vhost/net.c | 60 +++++++++++--------
2013 Jul 06
3
[PATCH-v2 0/3] target/vhost-scsi: Add per-cpu ida tag pre-allocation for v3.12
From: Nicholas Bellinger <nab at linux-iscsi.org>
Hi folks,
This is an updated series for adding tag pre-allocation support of
target fabric descriptor memory, utilizing Kent's latest in-flight
per-cpu ida bits here:
[PATCH v3] lib/idr.c rewrite, percpu ida/tag allocator
http://marc.info/?l=linux-kernel&m=137308733526328&w=2
Patch #1 includes target-core setup of
2013 Jul 06
3
[PATCH-v2 0/3] target/vhost-scsi: Add per-cpu ida tag pre-allocation for v3.12
From: Nicholas Bellinger <nab at linux-iscsi.org>
Hi folks,
This is an updated series for adding tag pre-allocation support of
target fabric descriptor memory, utilizing Kent's latest in-flight
per-cpu ida bits here:
[PATCH v3] lib/idr.c rewrite, percpu ida/tag allocator
http://marc.info/?l=linux-kernel&m=137308733526328&w=2
Patch #1 includes target-core setup of
2013 Jan 06
3
[PATCH] tcm_vhost: Use llist for cmd completion list
...ost_cmd,
+ tvc_completion_list);
+ llnode = llist_next(llnode);
+ se_cmd = &tv_cmd->tvc_se_cmd;
pr_debug("%s tv_cmd %p resid %u status %#02x\n", __func__,
tv_cmd, se_cmd->residual_count, se_cmd->scsi_status);
@@ -426,7 +409,6 @@ static struct tcm_vhost_cmd *vhost_scsi_allocate_cmd(
pr_err("Unable to allocate struct tcm_vhost_cmd\n");
return ERR_PTR(-ENOMEM);
}
- INIT_LIST_HEAD(&tv_cmd->tvc_completion_list);
tv_cmd->tvc_tag = v_req->tag;
tv_cmd->tvc_task_attr = v_req->task_attr;
tv_cmd->tvc_exp_data_len = exp_data_len;
@@ -859,8 +...
2013 Jan 06
3
[PATCH] tcm_vhost: Use llist for cmd completion list
...ost_cmd,
+ tvc_completion_list);
+ llnode = llist_next(llnode);
+ se_cmd = &tv_cmd->tvc_se_cmd;
pr_debug("%s tv_cmd %p resid %u status %#02x\n", __func__,
tv_cmd, se_cmd->residual_count, se_cmd->scsi_status);
@@ -426,7 +409,6 @@ static struct tcm_vhost_cmd *vhost_scsi_allocate_cmd(
pr_err("Unable to allocate struct tcm_vhost_cmd\n");
return ERR_PTR(-ENOMEM);
}
- INIT_LIST_HEAD(&tv_cmd->tvc_completion_list);
tv_cmd->tvc_tag = v_req->tag;
tv_cmd->tvc_task_attr = v_req->task_attr;
tv_cmd->tvc_exp_data_len = exp_data_len;
@@ -859,8 +...
2012 Jul 26
2
[RFC-v5] tcm_vhost: Initial merge for vhost level target fabric driver
...v_cmd);
+
+ spin_lock_bh(&vs->vs_completion_lock);
+ list_add_tail(&tv_cmd->tvc_completion_list, &vs->vs_completion_list);
+ spin_unlock_bh(&vs->vs_completion_lock);
+
+ vhost_work_queue(&vs->dev, &vs->vs_completion_work);
+}
+
+static struct tcm_vhost_cmd *vhost_scsi_allocate_cmd(
+ struct tcm_vhost_tpg *tv_tpg,
+ struct virtio_scsi_cmd_req *v_req,
+ u32 exp_data_len,
+ int data_direction)
+{
+ struct tcm_vhost_cmd *tv_cmd;
+ struct tcm_vhost_nexus *tv_nexus;
+ struct se_portal_group *se_tpg = &tv_tpg->se_tpg;
+ struct se_session *se_sess;
+ struct se_cmd *se_cmd;
+...
2012 Jul 26
2
[RFC-v5] tcm_vhost: Initial merge for vhost level target fabric driver
...v_cmd);
+
+ spin_lock_bh(&vs->vs_completion_lock);
+ list_add_tail(&tv_cmd->tvc_completion_list, &vs->vs_completion_list);
+ spin_unlock_bh(&vs->vs_completion_lock);
+
+ vhost_work_queue(&vs->dev, &vs->vs_completion_work);
+}
+
+static struct tcm_vhost_cmd *vhost_scsi_allocate_cmd(
+ struct tcm_vhost_tpg *tv_tpg,
+ struct virtio_scsi_cmd_req *v_req,
+ u32 exp_data_len,
+ int data_direction)
+{
+ struct tcm_vhost_cmd *tv_cmd;
+ struct tcm_vhost_nexus *tv_nexus;
+ struct se_portal_group *se_tpg = &tv_tpg->se_tpg;
+ struct se_session *se_sess;
+ struct se_cmd *se_cmd;
+...
2013 Aug 16
6
[PATCH-v3 0/4] target/vhost-scsi: Add per-cpu ida tag pre-allocation for v3.12
From: Nicholas Bellinger <nab at linux-iscsi.org>
Hi folks,
This is an updated series for adding tag pre-allocation support of
target fabric descriptor memory, utilizing Kent's latest per-cpu ida
bits here, along with Christoph Lameter's latest comments:
[PATCH 04/10] idr: Percpu ida
http://marc.info/?l=linux-kernel&m=137160026006974&w=2
The first patch is a
2013 Aug 16
6
[PATCH-v3 0/4] target/vhost-scsi: Add per-cpu ida tag pre-allocation for v3.12
From: Nicholas Bellinger <nab at linux-iscsi.org>
Hi folks,
This is an updated series for adding tag pre-allocation support of
target fabric descriptor memory, utilizing Kent's latest per-cpu ida
bits here, along with Christoph Lameter's latest comments:
[PATCH 04/10] idr: Percpu ida
http://marc.info/?l=linux-kernel&m=137160026006974&w=2
The first patch is a