search for: tvc_completion_list

Displaying 20 results from an estimated 31 matches for "tvc_completion_list".

2013 Jan 06
3
[PATCH] tcm_vhost: Use llist for cmd completion list
...tion queue */ }; /* Local pointer to allocated TCM configfs fabric module */ @@ -301,9 +301,7 @@ static void vhost_scsi_complete_cmd(struct tcm_vhost_cmd *tv_cmd) { struct vhost_scsi *vs = tv_cmd->tvc_vhost; - 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); + llist_add(&tv_cmd->tvc_completion_list, &vs->vs_completion_list); vhost_work_queue(&vs->dev, &vs->vs_completion_work); } @@ -347,27 +345,6 @@ static void vhost_scsi_free_cmd(struct...
2013 Jan 06
3
[PATCH] tcm_vhost: Use llist for cmd completion list
...tion queue */ }; /* Local pointer to allocated TCM configfs fabric module */ @@ -301,9 +301,7 @@ static void vhost_scsi_complete_cmd(struct tcm_vhost_cmd *tv_cmd) { struct vhost_scsi *vs = tv_cmd->tvc_vhost; - 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); + llist_add(&tv_cmd->tvc_completion_list, &vs->vs_completion_list); vhost_work_queue(&vs->dev, &vs->vs_completion_work); } @@ -347,27 +345,6 @@ static void vhost_scsi_free_cmd(struct...
2017 Nov 09
2
[PATCH] vhost/scsi: Use safe iteration in vhost_scsi_complete_cmd_work()
...ct llist_node *llnode; struct se_cmd *se_cmd; struct iov_iter iov_iter; @@ -527,7 +527,7 @@ static void vhost_scsi_complete_cmd_work(struct vhost_work *work) bitmap_zero(signal, VHOST_SCSI_MAX_VQ); llnode = llist_del_all(&vs->vs_completion_list); - llist_for_each_entry(cmd, llnode, tvc_completion_list) { + llist_for_each_entry_safe(cmd, t, llnode, tvc_completion_list) { se_cmd = &cmd->tvc_se_cmd; pr_debug("%s tv_cmd %p resid %u status %#02x\n", __func__, -- 1.9.1
2017 Nov 09
2
[PATCH] vhost/scsi: Use safe iteration in vhost_scsi_complete_cmd_work()
...ct llist_node *llnode; struct se_cmd *se_cmd; struct iov_iter iov_iter; @@ -527,7 +527,7 @@ static void vhost_scsi_complete_cmd_work(struct vhost_work *work) bitmap_zero(signal, VHOST_SCSI_MAX_VQ); llnode = llist_del_all(&vs->vs_completion_list); - llist_for_each_entry(cmd, llnode, tvc_completion_list) { + llist_for_each_entry_safe(cmd, t, llnode, tvc_completion_list) { se_cmd = &cmd->tvc_se_cmd; pr_debug("%s tv_cmd %p resid %u status %#02x\n", __func__, -- 1.9.1
2017 Nov 16
0
[PATCH] vhost/scsi: Use safe iteration in vhost_scsi_complete_cmd_work()
...struct iov_iter iov_iter; > > @@ -527,7 +527,7 @@ static void vhost_scsi_complete_cmd_work(struct vhost_work *work) > > > > bitmap_zero(signal, VHOST_SCSI_MAX_VQ); > > llnode = llist_del_all(&vs->vs_completion_list); > > - llist_for_each_entry(cmd, llnode, tvc_completion_list) { > > + llist_for_each_entry_safe(cmd, t, llnode, tvc_completion_list) { > > se_cmd = &cmd->tvc_se_cmd; > > > > pr_debug("%s tv_cmd %p resid %u status %#02x\n", __func__, > > -- > > 1.9.1
2017 Nov 15
1
[PATCH] vhost/scsi: Use safe iteration in vhost_scsi_complete_cmd_work()
...t se_cmd *se_cmd; > struct iov_iter iov_iter; > @@ -527,7 +527,7 @@ static void vhost_scsi_complete_cmd_work(struct vhost_work *work) > > bitmap_zero(signal, VHOST_SCSI_MAX_VQ); > llnode = llist_del_all(&vs->vs_completion_list); > - llist_for_each_entry(cmd, llnode, tvc_completion_list) { > + llist_for_each_entry_safe(cmd, t, llnode, tvc_completion_list) { > se_cmd = &cmd->tvc_se_cmd; > > pr_debug("%s tv_cmd %p resid %u status %#02x\n", __func__, > -- > 1.9.1
2013 Mar 11
4
[PATCH] tcm_vhost: Wait for pending requests in vhost_scsi_flush()
...light; struct tcm_vhost_cmd { /* Descriptor from vhost_get_vq_desc() for virt_queue segment */ int tvc_vq_desc; @@ -37,6 +38,7 @@ struct tcm_vhost_cmd { unsigned char tvc_sense_buf[TRANSPORT_SENSE_BUFFER]; /* Completed commands list, serviced from vhost worker thread */ struct llist_node tvc_completion_list; + struct vhost_scsi_inflight *inflight; }; struct tcm_vhost_nexus { @@ -91,6 +93,7 @@ struct tcm_vhost_evt { struct virtio_scsi_event event; /* virtio_scsi event list, serviced from vhost worker thread */ struct llist_node list; + struct vhost_scsi_inflight *inflight; }; /* -- 1.8.1...
2013 Mar 11
4
[PATCH] tcm_vhost: Wait for pending requests in vhost_scsi_flush()
...light; struct tcm_vhost_cmd { /* Descriptor from vhost_get_vq_desc() for virt_queue segment */ int tvc_vq_desc; @@ -37,6 +38,7 @@ struct tcm_vhost_cmd { unsigned char tvc_sense_buf[TRANSPORT_SENSE_BUFFER]; /* Completed commands list, serviced from vhost worker thread */ struct llist_node tvc_completion_list; + struct vhost_scsi_inflight *inflight; }; struct tcm_vhost_nexus { @@ -91,6 +93,7 @@ struct tcm_vhost_evt { struct virtio_scsi_event event; /* virtio_scsi event list, serviced from vhost worker thread */ struct llist_node list; + struct vhost_scsi_inflight *inflight; }; /* -- 1.8.1...
2012 Jul 26
2
[RFC-v5] tcm_vhost: Initial merge for vhost level target fabric driver
...st_scsi *vs) +{ + struct tcm_vhost_cmd *tv_cmd = NULL; + + spin_lock_bh(&vs->vs_completion_lock); + if (list_empty(&vs->vs_completion_list)) { + spin_unlock_bh(&vs->vs_completion_lock); + return NULL; + } + + list_for_each_entry(tv_cmd, &vs->vs_completion_list, + tvc_completion_list) { + list_del(&tv_cmd->tvc_completion_list); + break; + } + spin_unlock_bh(&vs->vs_completion_lock); + return tv_cmd; +} + +/* Fill in status and signal that we are done processing this command + * + * This is scheduled in the vhost work queue so we are called with the owner + * pro...
2012 Jul 26
2
[RFC-v5] tcm_vhost: Initial merge for vhost level target fabric driver
...st_scsi *vs) +{ + struct tcm_vhost_cmd *tv_cmd = NULL; + + spin_lock_bh(&vs->vs_completion_lock); + if (list_empty(&vs->vs_completion_list)) { + spin_unlock_bh(&vs->vs_completion_lock); + return NULL; + } + + list_for_each_entry(tv_cmd, &vs->vs_completion_list, + tvc_completion_list) { + list_del(&tv_cmd->tvc_completion_list); + break; + } + spin_unlock_bh(&vs->vs_completion_lock); + return tv_cmd; +} + +/* Fill in status and signal that we are done processing this command + * + * This is scheduled in the vhost work queue so we are called with the owner + * pro...
2012 Jul 30
0
[PATCH] tcm_vhost: Post-merge review changes requested by MST
...ruct se_cmd *se_cmd) return 0; } -static void vhost_scsi_complete_cmd(struct tcm_vhost_cmd *); +static void vhost_scsi_complete_cmd(struct tcm_vhost_cmd *tv_cmd) +{ + struct vhost_scsi *vs = tv_cmd->tvc_vhost; + + 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 int tcm_vhost_queue_data_in(struct se_cmd *se_cmd) { @@ -381,7 +391,7 @@ static void vhost_scsi_complete_cmd_work(struct vhost_wor...
2012 Jul 30
0
[PATCH] tcm_vhost: Post-merge review changes requested by MST
...ruct se_cmd *se_cmd) return 0; } -static void vhost_scsi_complete_cmd(struct tcm_vhost_cmd *); +static void vhost_scsi_complete_cmd(struct tcm_vhost_cmd *tv_cmd) +{ + struct vhost_scsi *vs = tv_cmd->tvc_vhost; + + 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 int tcm_vhost_queue_data_in(struct se_cmd *se_cmd) { @@ -381,7 +391,7 @@ static void vhost_scsi_complete_cmd_work(struct vhost_wor...
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 ++-
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()
2012 Jul 11
7
[RFC-v2 0/4] tcm_vhost+cmwq fabric driver code for-3.6
From: Nicholas Bellinger <nab at linux-iscsi.org> Hi folks, The following is a RFC-v2 series of tcm_vhost target fabric driver code currently in-flight for-3.6 mainline code. After last week's developments along with the help of some new folks, the changelog v1 -> v2 so far looks like: *) Fix drivers/vhost/test.c to use VHOST_NET_FEATURES in patch #1 (Asias He) *) Fix tv_cmd
2012 Jul 11
7
[RFC-v2 0/4] tcm_vhost+cmwq fabric driver code for-3.6
From: Nicholas Bellinger <nab at linux-iscsi.org> Hi folks, The following is a RFC-v2 series of tcm_vhost target fabric driver code currently in-flight for-3.6 mainline code. After last week's developments along with the help of some new folks, the changelog v1 -> v2 so far looks like: *) Fix drivers/vhost/test.c to use VHOST_NET_FEATURES in patch #1 (Asias He) *) Fix tv_cmd
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,