Displaying 4 results from an estimated 4 matches for "bio_len".
Did you mean:
io_len
2012 Nov 19
1
[PATCH] vhost-blk: Add vhost-blk support v5
...; j < pl->pages_nr; j++) {
+ if (!req->write)
+ set_page_dirty_lock(pl->pages[j]);
+ page_cache_release(pl->pages[j]);
+ }
+ }
+
+ kfree(req->pl);
+}
+
+static int vhost_blk_bio_make(struct vhost_blk_req *req,
+ struct block_device *bdev)
+{
+ int pl_len, page_len, bio_len;
+ int pages_nr_total, i, j, ret;
+ struct iovec *iov = req->iov;
+ int iov_nr = req->iov_nr;
+ struct page **pages, *page;
+ struct bio *bio = NULL;
+ int bio_nr = 0;
+ void *buf;
+
+ pages_nr_total = 0;
+ for (i = 0; i < iov_nr; i++)
+ pages_nr_total += iov_num_pages(&iov[i]);
+
+ i...
2012 Nov 19
1
[PATCH] vhost-blk: Add vhost-blk support v5
...; j < pl->pages_nr; j++) {
+ if (!req->write)
+ set_page_dirty_lock(pl->pages[j]);
+ page_cache_release(pl->pages[j]);
+ }
+ }
+
+ kfree(req->pl);
+}
+
+static int vhost_blk_bio_make(struct vhost_blk_req *req,
+ struct block_device *bdev)
+{
+ int pl_len, page_len, bio_len;
+ int pages_nr_total, i, j, ret;
+ struct iovec *iov = req->iov;
+ int iov_nr = req->iov_nr;
+ struct page **pages, *page;
+ struct bio *bio = NULL;
+ int bio_nr = 0;
+ void *buf;
+
+ pages_nr_total = 0;
+ for (i = 0; i < iov_nr; i++)
+ pages_nr_total += iov_num_pages(&iov[i]);
+
+ i...
2012 Dec 02
3
[PATCH] vhost-blk: Add vhost-blk support v6
...1);
+ if (!bio)
+ return -ENOMEM;
+
+ bio->bi_sector = req->sector;
+ bio->bi_bdev = bdev;
+ bio->bi_private = req;
+ bio->bi_end_io = vhost_blk_req_done;
+ req->bio[bio_nr++] = bio;
+
+ goto out;
+ }
+
+ if (pages_nr_total > NR_INLINE) {
+ int pl_len, page_len, bio_len;
+
+ req->use_inline = false;
+ pl_len = iov_nr * sizeof(req->pl[0]);
+ page_len = pages_nr_total * sizeof(struct page *);
+ bio_len = pages_nr_total * sizeof(struct bio *);
+
+ buf = kmalloc(pl_len + page_len + bio_len, GFP_KERNEL);
+ if (!buf)
+ return -ENOMEM;
+
+ req->pl = buf...
2012 Dec 02
3
[PATCH] vhost-blk: Add vhost-blk support v6
...1);
+ if (!bio)
+ return -ENOMEM;
+
+ bio->bi_sector = req->sector;
+ bio->bi_bdev = bdev;
+ bio->bi_private = req;
+ bio->bi_end_io = vhost_blk_req_done;
+ req->bio[bio_nr++] = bio;
+
+ goto out;
+ }
+
+ if (pages_nr_total > NR_INLINE) {
+ int pl_len, page_len, bio_len;
+
+ req->use_inline = false;
+ pl_len = iov_nr * sizeof(req->pl[0]);
+ page_len = pages_nr_total * sizeof(struct page *);
+ bio_len = pages_nr_total * sizeof(struct bio *);
+
+ buf = kmalloc(pl_len + page_len + bio_len, GFP_KERNEL);
+ if (!buf)
+ return -ENOMEM;
+
+ req->pl = buf...