search for: llnode

Displaying 20 results from an estimated 39 matches for "llnode".

Did you mean: linode
2013 Jan 06
3
[PATCH] tcm_vhost: Use llist for cmd completion list
...e are called with the owner @@ -377,12 +354,18 @@ static void vhost_scsi_complete_cmd_work(struct vhost_work *work) { struct vhost_scsi *vs = container_of(work, struct vhost_scsi, vs_completion_work); + struct virtio_scsi_cmd_resp v_rsp; struct tcm_vhost_cmd *tv_cmd; + struct llist_node *llnode; + struct se_cmd *se_cmd; + int ret; - while ((tv_cmd = vhost_scsi_get_cmd_from_completion(vs))) { - struct virtio_scsi_cmd_resp v_rsp; - struct se_cmd *se_cmd = &tv_cmd->tvc_se_cmd; - int ret; + llnode = llist_del_all(&vs->vs_completion_list); + while (llnode) { + tv_cmd = llis...
2013 Jan 06
3
[PATCH] tcm_vhost: Use llist for cmd completion list
...e are called with the owner @@ -377,12 +354,18 @@ static void vhost_scsi_complete_cmd_work(struct vhost_work *work) { struct vhost_scsi *vs = container_of(work, struct vhost_scsi, vs_completion_work); + struct virtio_scsi_cmd_resp v_rsp; struct tcm_vhost_cmd *tv_cmd; + struct llist_node *llnode; + struct se_cmd *se_cmd; + int ret; - while ((tv_cmd = vhost_scsi_get_cmd_from_completion(vs))) { - struct virtio_scsi_cmd_resp v_rsp; - struct se_cmd *se_cmd = &tv_cmd->tvc_se_cmd; - int ret; + llnode = llist_del_all(&vs->vs_completion_list); + while (llnode) { + tv_cmd = llis...
2017 Nov 09
2
[PATCH] vhost/scsi: Use safe iteration in vhost_scsi_complete_cmd_work()
...rivers/vhost/scsi.c @@ -519,7 +519,7 @@ static void vhost_scsi_complete_cmd_work(struct vhost_work *work) vs_completion_work); DECLARE_BITMAP(signal, VHOST_SCSI_MAX_VQ); struct virtio_scsi_cmd_resp v_rsp; - struct vhost_scsi_cmd *cmd; + struct vhost_scsi_cmd *cmd, *t; struct 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)...
2017 Nov 09
2
[PATCH] vhost/scsi: Use safe iteration in vhost_scsi_complete_cmd_work()
...rivers/vhost/scsi.c @@ -519,7 +519,7 @@ static void vhost_scsi_complete_cmd_work(struct vhost_work *work) vs_completion_work); DECLARE_BITMAP(signal, VHOST_SCSI_MAX_VQ); struct virtio_scsi_cmd_resp v_rsp; - struct vhost_scsi_cmd *cmd; + struct vhost_scsi_cmd *cmd, *t; struct 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)...
2013 Mar 11
4
[PATCH] tcm_vhost: Wait for pending requests in vhost_scsi_flush()
...vt *evt) { struct vhost_virtqueue *vq = &vs->vqs[VHOST_SCSI_VQ_EVT]; + struct virtio_scsi_event *event = &evt->event; struct virtio_scsi_event __user *eventp; unsigned out, in; int head, ret; @@ -511,7 +567,7 @@ static void tcm_vhost_evt_work(struct vhost_work *work) while (llnode) { evt = llist_entry(llnode, struct 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 *wo...
2013 Mar 11
4
[PATCH] tcm_vhost: Wait for pending requests in vhost_scsi_flush()
...vt *evt) { struct vhost_virtqueue *vq = &vs->vqs[VHOST_SCSI_VQ_EVT]; + struct virtio_scsi_event *event = &evt->event; struct virtio_scsi_event __user *eventp; unsigned out, in; int head, ret; @@ -511,7 +567,7 @@ static void tcm_vhost_evt_work(struct vhost_work *work) while (llnode) { evt = llist_entry(llnode, struct 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 *wo...
2013 Mar 05
3
[PATCH] tcm_vhost: Add hotplug/hotunplug support
...+ pr_err("Faulted on tcm_vhost_send_event\n"); +out: + mutex_unlock(&vq->mutex); +} + +static void tcm_vhost_evt_work(struct vhost_work *work) +{ + struct vhost_scsi *vs = container_of(work, struct vhost_scsi, + vs_event_work); + struct tcm_vhost_evt *evt; + struct llist_node *llnode; + + llnode = llist_del_all(&vs->vs_event_list); + while (llnode) { + evt = llist_entry(llnode, struct tcm_vhost_evt, list); + llnode = llist_next(llnode); + tcm_vhost_do_evt_work(vs, &evt->event); + tcm_vhost_free_evt(evt); + } +} + /* Fill in status and signal that we are done...
2013 Mar 05
3
[PATCH] tcm_vhost: Add hotplug/hotunplug support
...+ pr_err("Faulted on tcm_vhost_send_event\n"); +out: + mutex_unlock(&vq->mutex); +} + +static void tcm_vhost_evt_work(struct vhost_work *work) +{ + struct vhost_scsi *vs = container_of(work, struct vhost_scsi, + vs_event_work); + struct tcm_vhost_evt *evt; + struct llist_node *llnode; + + llnode = llist_del_all(&vs->vs_event_list); + while (llnode) { + evt = llist_entry(llnode, struct tcm_vhost_evt, list); + llnode = llist_next(llnode); + tcm_vhost_do_evt_work(vs, &evt->event); + tcm_vhost_free_evt(evt); + } +} + /* Fill in status and signal that we are done...
2012 Oct 09
2
[PATCH] vhost-blk: Add vhost-blk support v2
...+#include "vhost.h" +#include "blk.h" + +#define BLK_HDR 0 + +static DEFINE_IDA(vhost_blk_index_ida); + +enum { + VHOST_BLK_VQ_REQ = 0, + VHOST_BLK_VQ_MAX = 1, +}; + +struct req_page_list { + struct page **pages; + int pages_nr; +}; + +struct vhost_blk_req { + struct llist_node llnode; + struct req_page_list *pl; + struct vhost_blk *blk; + + struct iovec *iov; + int iov_nr; + + struct bio **bio; + atomic_t bio_nr; + + sector_t sector; + int write; + u16 head; + long len; + + u8 *status; +}; + +struct vhost_blk { + struct task_struct *host_kick; + struct vhost_blk_req *reqs; + st...
2012 Oct 09
2
[PATCH] vhost-blk: Add vhost-blk support v2
...+#include "vhost.h" +#include "blk.h" + +#define BLK_HDR 0 + +static DEFINE_IDA(vhost_blk_index_ida); + +enum { + VHOST_BLK_VQ_REQ = 0, + VHOST_BLK_VQ_MAX = 1, +}; + +struct req_page_list { + struct page **pages; + int pages_nr; +}; + +struct vhost_blk_req { + struct llist_node llnode; + struct req_page_list *pl; + struct vhost_blk *blk; + + struct iovec *iov; + int iov_nr; + + struct bio **bio; + atomic_t bio_nr; + + sector_t sector; + int write; + u16 head; + long len; + + u8 *status; +}; + +struct vhost_blk { + struct task_struct *host_kick; + struct vhost_blk_req *reqs; + st...
2012 Nov 19
1
[PATCH] vhost-blk: Add vhost-blk support v5
...e "vhost.c" +#include "vhost.h" +#include "blk.h" + +static DEFINE_IDA(vhost_blk_index_ida); + +enum { + VHOST_BLK_VQ_REQ = 0, + VHOST_BLK_VQ_MAX = 1, +}; + +struct req_page_list { + struct page **pages; + int pages_nr; +}; + +struct vhost_blk_req { + struct llist_node llnode; + struct req_page_list *pl; + struct vhost_blk *blk; + + struct iovec *iov; + int iov_nr; + + struct bio **bio; + atomic_t bio_nr; + + struct iovec status[1]; + + sector_t sector; + int write; + u16 head; + long len; +}; + +struct vhost_blk { + struct task_struct *host_kick; + struct iovec iov[UIO...
2012 Nov 19
1
[PATCH] vhost-blk: Add vhost-blk support v5
...e "vhost.c" +#include "vhost.h" +#include "blk.h" + +static DEFINE_IDA(vhost_blk_index_ida); + +enum { + VHOST_BLK_VQ_REQ = 0, + VHOST_BLK_VQ_MAX = 1, +}; + +struct req_page_list { + struct page **pages; + int pages_nr; +}; + +struct vhost_blk_req { + struct llist_node llnode; + struct req_page_list *pl; + struct vhost_blk *blk; + + struct iovec *iov; + int iov_nr; + + struct bio **bio; + atomic_t bio_nr; + + struct iovec status[1]; + + sector_t sector; + int write; + u16 head; + long len; +}; + +struct vhost_blk { + struct task_struct *host_kick; + struct iovec iov[UIO...
2012 Oct 15
2
[PATCH 1/1] vhost-blk: Add vhost-blk support v4
...+/* The block header is in the first and separate buffer. */ +#define BLK_HDR 0 + +static DEFINE_IDA(vhost_blk_index_ida); + +enum { + VHOST_BLK_VQ_REQ = 0, + VHOST_BLK_VQ_MAX = 1, +}; + +struct req_page_list { + struct page **pages; + int pages_nr; +}; + +struct vhost_blk_req { + struct llist_node llnode; + struct req_page_list *pl; + struct vhost_blk *blk; + + struct iovec *iov; + int iov_nr; + + struct bio **bio; + atomic_t bio_nr; + + sector_t sector; + int write; + u16 head; + long len; + + u8 __user *status; +}; + +struct vhost_blk { + struct task_struct *host_kick; + struct vhost_blk_req *req...
2012 Oct 15
2
[PATCH 1/1] vhost-blk: Add vhost-blk support v4
...+/* The block header is in the first and separate buffer. */ +#define BLK_HDR 0 + +static DEFINE_IDA(vhost_blk_index_ida); + +enum { + VHOST_BLK_VQ_REQ = 0, + VHOST_BLK_VQ_MAX = 1, +}; + +struct req_page_list { + struct page **pages; + int pages_nr; +}; + +struct vhost_blk_req { + struct llist_node llnode; + struct req_page_list *pl; + struct vhost_blk *blk; + + struct iovec *iov; + int iov_nr; + + struct bio **bio; + atomic_t bio_nr; + + sector_t sector; + int write; + u16 head; + long len; + + u8 __user *status; +}; + +struct vhost_blk { + struct task_struct *host_kick; + struct vhost_blk_req *req...
2017 Nov 16
0
[PATCH] vhost/scsi: Use safe iteration in vhost_scsi_complete_cmd_work()
...si_complete_cmd_work(struct vhost_work *work) > > vs_completion_work); > > DECLARE_BITMAP(signal, VHOST_SCSI_MAX_VQ); > > struct virtio_scsi_cmd_resp v_rsp; > > - struct vhost_scsi_cmd *cmd; > > + struct vhost_scsi_cmd *cmd, *t; > > struct 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...
2017 Nov 15
1
[PATCH] vhost/scsi: Use safe iteration in vhost_scsi_complete_cmd_work()
...+519,7 @@ static void vhost_scsi_complete_cmd_work(struct vhost_work *work) > vs_completion_work); > DECLARE_BITMAP(signal, VHOST_SCSI_MAX_VQ); > struct virtio_scsi_cmd_resp v_rsp; > - struct vhost_scsi_cmd *cmd; > + struct vhost_scsi_cmd *cmd, *t; > struct 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...
2013 Mar 11
1
[PATCH -next] vhost-blk: remove unused variable
...+++ b/drivers/vhost/blk.c @@ -419,8 +419,6 @@ static void vhost_blk_handle_guest_kick(struct vhost_work *work) /* Host kick us for I/O completion */ static void vhost_blk_handle_host_kick(struct vhost_work *work) { - - struct vhost_virtqueue *vq; struct vhost_blk_req *req; struct llist_node *llnode; struct vhost_blk *blk; @@ -429,7 +427,6 @@ static void vhost_blk_handle_host_kick(struct vhost_work *work) int ret; blk = container_of(work, struct vhost_blk, work); - vq = &blk->vq; llnode = llist_del_all(&blk->llhead); added = false;
2013 Mar 11
1
[PATCH -next] vhost-blk: remove unused variable
...+++ b/drivers/vhost/blk.c @@ -419,8 +419,6 @@ static void vhost_blk_handle_guest_kick(struct vhost_work *work) /* Host kick us for I/O completion */ static void vhost_blk_handle_host_kick(struct vhost_work *work) { - - struct vhost_virtqueue *vq; struct vhost_blk_req *req; struct llist_node *llnode; struct vhost_blk *blk; @@ -429,7 +427,6 @@ static void vhost_blk_handle_host_kick(struct vhost_work *work) int ret; blk = container_of(work, struct vhost_blk, work); - vq = &blk->vq; llnode = llist_del_all(&blk->llhead); added = false;
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