search for: allocate_vbio

Displaying 2 results from an estimated 2 matches for "allocate_vbio".

2010 Apr 07
0
[RFC] vhost-blk implementation (v2)
...+ entry = list_entry(node, struct vhost_blk_io, list); + vhost_add_used_and_signal(&blk->dev, vq, entry->head, ret); + list_del(node); + kfree(entry); + } + mutex_unlock(&vq->mutex); + unuse_mm(blk->dev.mm); + if (need_free) + kfree(vbio); +} + +static struct vhost_blk_io *allocate_vbio(int nvecs) +{ + struct vhost_blk_io *vbio; + int size = sizeof(struct vhost_blk_io) + nvecs * sizeof(struct iovec); + vbio = kmalloc(size, GFP_KERNEL); + if (vbio) { + INIT_WORK(&vbio->work, handle_io_work); + INIT_LIST_HEAD(&vbio->list); + } + return vbio; +} + +static void merge_a...
2010 Apr 07
0
[RFC] vhost-blk implementation (v2)
...+ entry = list_entry(node, struct vhost_blk_io, list); + vhost_add_used_and_signal(&blk->dev, vq, entry->head, ret); + list_del(node); + kfree(entry); + } + mutex_unlock(&vq->mutex); + unuse_mm(blk->dev.mm); + if (need_free) + kfree(vbio); +} + +static struct vhost_blk_io *allocate_vbio(int nvecs) +{ + struct vhost_blk_io *vbio; + int size = sizeof(struct vhost_blk_io) + nvecs * sizeof(struct iovec); + vbio = kmalloc(size, GFP_KERNEL); + if (vbio) { + INIT_WORK(&vbio->work, handle_io_work); + INIT_LIST_HEAD(&vbio->list); + } + return vbio; +} + +static void merge_a...