search for: llist_next

Displaying 20 results from an estimated 30 matches for "llist_next".

2013 Jan 06
3
[PATCH] tcm_vhost: Use llist for cmd completion list
..._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 = llist_entry(llnode, struct tcm_vhost_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 str...
2013 Jan 06
3
[PATCH] tcm_vhost: Use llist for cmd completion list
..._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 = llist_entry(llnode, struct tcm_vhost_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 str...
2013 Mar 11
4
[PATCH] tcm_vhost: Wait for pending requests in vhost_scsi_flush()
...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 *work) } static struct tcm_vhost_cmd *vhost_scsi_allocate_cmd( + struct vhost_scsi...
2013 Mar 11
4
[PATCH] tcm_vhost: Wait for pending requests in vhost_scsi_flush()
...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 *work) } static struct tcm_vhost_cmd *vhost_scsi_allocate_cmd( + struct vhost_scsi...
2013 Mar 05
3
[PATCH] tcm_vhost: Add hotplug/hotunplug support
...k *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 processing this command * * This is scheduled in the vhost work queue so we are called with the owner @@ -757,9 +846,41 @@ static void vhost_scsi_ctl_ha...
2013 Mar 05
3
[PATCH] tcm_vhost: Add hotplug/hotunplug support
...k *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 processing this command * * This is scheduled in the vhost work queue so we are called with the owner @@ -757,9 +846,41 @@ static void vhost_scsi_ctl_ha...
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 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 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 Mar 22
6
[PATCH V4 0/2] tcm_vhost hotplug
Asias He (2): tcm_vhost: Introduce tcm_vhost_check_feature() tcm_vhost: Add hotplug/hotunplug support drivers/vhost/tcm_vhost.c | 224 ++++++++++++++++++++++++++++++++++++++++++++-- drivers/vhost/tcm_vhost.h | 10 +++ 2 files changed, 229 insertions(+), 5 deletions(-) -- 1.8.1.4
2013 Mar 22
6
[PATCH V4 0/2] tcm_vhost hotplug
Asias He (2): tcm_vhost: Introduce tcm_vhost_check_feature() tcm_vhost: Add hotplug/hotunplug support drivers/vhost/tcm_vhost.c | 224 ++++++++++++++++++++++++++++++++++++++++++++-- drivers/vhost/tcm_vhost.h | 10 +++ 2 files changed, 229 insertions(+), 5 deletions(-) -- 1.8.1.4
2013 Mar 08
8
[PATCH V2 0/6] tcm_vhost hotplug/hotunplug support and locking/flushing fix
Changes in v2: - Remove code duplication in tcm_vhost_{hotplug,hotunplug} - Fix racing of vs_events_nr - Add flush fix patch to this series Asias He (6): tcm_vhost: Add missed lock in vhost_scsi_clear_endpoint() tcm_vhost: Introduce tcm_vhost_check_feature() tcm_vhost: Introduce tcm_vhost_check_endpoint() tcm_vhost: Fix vs->vs_endpoint checking in vhost_scsi_handle_vq() tcm_vhost:
2013 Mar 08
8
[PATCH V2 0/6] tcm_vhost hotplug/hotunplug support and locking/flushing fix
Changes in v2: - Remove code duplication in tcm_vhost_{hotplug,hotunplug} - Fix racing of vs_events_nr - Add flush fix patch to this series Asias He (6): tcm_vhost: Add missed lock in vhost_scsi_clear_endpoint() tcm_vhost: Introduce tcm_vhost_check_feature() tcm_vhost: Introduce tcm_vhost_check_endpoint() tcm_vhost: Fix vs->vs_endpoint checking in vhost_scsi_handle_vq() tcm_vhost:
2012 Oct 09
2
[PATCH] vhost-blk: Add vhost-blk support v2
...= llist_del_all(&blk->llhead); + if (!llnode) { + set_current_state(TASK_INTERRUPTIBLE); + schedule(); + if (unlikely(kthread_should_stop())) + break; + continue; + } + added = false; + while (llnode) { + req = llist_entry(llnode, struct vhost_blk_req, llnode); + llnode = llist_next(llnode); + + vhost_blk_req_umap(req); + + status = req->len > 0 ? + VIRTIO_BLK_S_OK : VIRTIO_BLK_S_IOERR; + ret = copy_to_user(req->status, &status, + sizeof(status)); + if (unlikely(ret)) { + vq_err(&blk->vq, "Failed to write status\n"); + ret...
2012 Oct 09
2
[PATCH] vhost-blk: Add vhost-blk support v2
...= llist_del_all(&blk->llhead); + if (!llnode) { + set_current_state(TASK_INTERRUPTIBLE); + schedule(); + if (unlikely(kthread_should_stop())) + break; + continue; + } + added = false; + while (llnode) { + req = llist_entry(llnode, struct vhost_blk_req, llnode); + llnode = llist_next(llnode); + + vhost_blk_req_umap(req); + + status = req->len > 0 ? + VIRTIO_BLK_S_OK : VIRTIO_BLK_S_IOERR; + ret = copy_to_user(req->status, &status, + sizeof(status)); + if (unlikely(ret)) { + vq_err(&blk->vq, "Failed to write status\n"); + ret...
2012 Nov 19
1
[PATCH] vhost-blk: Add vhost-blk support v5
...); + if (!llnode) { + schedule(); + if (unlikely(kthread_should_stop())) + break; + continue; + } + set_current_state(TASK_RUNNING); + + if (need_resched()) + schedule(); + + added = false; + while (llnode) { + req = llist_entry(llnode, struct vhost_blk_req, llnode); + llnode = llist_next(llnode); + + vhost_blk_req_umap(req); + + status = req->len > 0 ? + VIRTIO_BLK_S_OK : VIRTIO_BLK_S_IOERR; + ret = vhost_blk_set_status(req, status); + if (unlikely(ret)) + continue; + vhost_add_used(&blk->vq, req->head, req->len); + added = true; + } + if (li...
2012 Nov 19
1
[PATCH] vhost-blk: Add vhost-blk support v5
...); + if (!llnode) { + schedule(); + if (unlikely(kthread_should_stop())) + break; + continue; + } + set_current_state(TASK_RUNNING); + + if (need_resched()) + schedule(); + + added = false; + while (llnode) { + req = llist_entry(llnode, struct vhost_blk_req, llnode); + llnode = llist_next(llnode); + + vhost_blk_req_umap(req); + + status = req->len > 0 ? + VIRTIO_BLK_S_OK : VIRTIO_BLK_S_IOERR; + ret = vhost_blk_set_status(req, status); + if (unlikely(ret)) + continue; + vhost_add_used(&blk->vq, req->head, req->len); + added = true; + } + if (li...