search for: bio_add_page

Displaying 20 results from an estimated 28 matches for "bio_add_page".

2008 Mar 15
1
extent_io.c: bio_add_page() error check for bio ptr
bio_add_page() requires non-NULL bio ptr for dereferencing. Signed-off-by: Peter Teoh <htmldeveloper@gmail.com> --- extent_io.c.orig1 2008-03-16 12:43:59.000000000 +0800 +++ extent_io.c 2008-03-16 12:45:03.000000000 +0800 @@ -1729,6 +1729,7 @@ static int submit_extent_page(int rw, st if (bio_...
2011 Feb 17
7
Re: [Bugme-new] [Bug 29302] New: Null pointer dereference with large max_sectors_kb
...> 3TB raid10 and 10TB raid6), SuperMicro X8DTU-F. > > If I left out any important info, please let me know ;). > A btrfs bug, I suspect. > [ 605.109630] BUG: unable to handle kernel NULL pointer dereference at 0000000000000010 > [ 605.109928] IP: [<ffffffff81100a7a>] bio_add_page+0xa/0x40 > [ 605.110089] PGD 277d70067 PUD 277e0a067 PMD 0 > [ 605.110247] Oops: 0000 [#1] SMP > [ 605.110394] last sysfs file: /sys/devices/system/cpu/cpu15/cache/index2/shared_cpu_map > [ 605.110686] CPU 6 > [ 605.110698] Modules linked in: ip6table_filter ip6_tables nf_nat...
2019 Jul 24
1
[PATCH 03/12] block: bio_release_pages: use flags arg instead of bool
...+------ fs/block_dev.c | 4 ++-- fs/direct-io.c | 2 +- include/linux/bio.h | 13 ++++++++++++- 4 files changed, 21 insertions(+), 10 deletions(-) diff --git a/block/bio.c b/block/bio.c index 299a0e7651ec..7675e2de509d 100644 --- a/block/bio.c +++ b/block/bio.c @@ -833,7 +833,7 @@ int bio_add_page(struct bio *bio, struct page *page, } EXPORT_SYMBOL(bio_add_page); -void bio_release_pages(struct bio *bio, bool mark_dirty) +void bio_release_pages(struct bio *bio, enum bio_rp_flags_t flags) { struct bvec_iter_all iter_all; struct bio_vec *bvec; @@ -842,7 +842,7 @@ void bio_release_pages...
2012 May 03
1
[PATCH] Btrfs: fix crash in scrub repair code when device is missing
Fix that when scrub tries to repair an I/O or checksum error and one of the devices containing the mirror is missing, it crashes in bio_add_page because the bdev is a NULL pointer for missing devices. Reported-by: Marco L. Crociani <marco.crociani@gmail.com> Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de> --- fs/btrfs/scrub.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fs/btrfs/scrub.c b/fs/btrfs/sc...
2008 Aug 02
3
crash when mounting
...ab+0xe/0x10 Message from syslogd@btrfs at Aug 3 05:09:33 ... kernel: [mempool_alloc+66/224] ? mempool_alloc+0x42/0xe0 Message from syslogd@btrfs at Aug 3 05:09:33 ... kernel: [<e0dc23a6>] ? set_extent_bit+0xa3/0x337 [btrfs] Message from syslogd@btrfs at Aug 3 05:09:33 ... kernel: [bio_add_page+39/46] ? bio_add_page+0x27/0x2e Message from syslogd@btrfs at Aug 3 05:09:33 ... kernel: [<e0dc5ded>] ? btrfs_map_block+0x19/0x1b [btrfs] Message from syslogd@btrfs at Aug 3 05:09:33 ... kernel: [<e0dc5e4c>] ? btrfs_map_bio+0x5d/0x1b7 [btrfs] Message from syslogd@btrfs at Aug 3...
2011 Apr 05
0
[PATCH] Btrfs: don't split dio bios if we don't have to
...GFP_NOFS); + if (!bio) + return -ENOMEM; + bio->bi_private = dip; + bio->bi_end_io = btrfs_end_dio_bio; + atomic_inc(&dip->pending_bios); + while (bvec <= (orig_bio->bi_io_vec + orig_bio->bi_vcnt - 1)) { if (unlikely(map_length < submit_len + bvec->bv_len || bio_add_page(bio, bvec->bv_page, bvec->bv_len, @@ -6024,6 +6029,7 @@ static int btrfs_submit_direct_hook(int rw, struct btrfs_dio_private *dip, } } +submit: ret = __btrfs_submit_dio_bio(bio, inode, rw, file_offset, skip_sum, csums); if (!ret) -- 1.7.2.3 -- To unsubscribe from this l...
2012 Dec 18
0
[PATCH] [RFC] Btrfs: Subpagesize blocksize (WIP).
...E_CACHE_SIZE); if (bio_ret && *bio_ret) { bio = *bio_ret; @@ -2530,8 +2530,8 @@ static int submit_extent_page(int rw, struct extent_io_tree *tree, sector; if (prev_bio_flags != bio_flags || !contig || - merge_bio(tree, page, offset, page_size, bio, bio_flags) || - bio_add_page(bio, page, page_size, offset) < page_size) { + merge_bio(tree, page, offset, bio_size, bio, bio_flags) || + bio_add_page(bio, page, bio_size, offset) < bio_size) { ret = submit_one_bio(rw, bio, mirror_num, prev_bio_flags); if (ret < 0) @@ -2550,7 +2550,7 @@ sta...
2016 Jun 15
0
[PATCH v7 00/12] Support non-lru page migration
...5309>] submit_bio+0x2f8/0x324 [ 340.320075] [<ffffffff81495011>] ? generic_make_request+0x496/0x496 [ 340.320078] [<ffffffff811190fc>] ? lockdep_init_map+0x1ef/0x4b0 [ 340.320082] [<ffffffff814880a4>] submit_bio_wait+0xff/0x138 [ 340.320085] [<ffffffff81487fa5>] ? bio_add_page+0x292/0x292 [ 340.320090] [<ffffffff814ab82c>] blkdev_issue_discard+0xee/0x148 [ 340.320093] [<ffffffff814ab73e>] ? __blkdev_issue_discard+0x399/0x399 [ 340.320097] [<ffffffff8111f0ac>] ? debug_show_all_locks+0x226/0x226 [ 340.320101] [<ffffffff81404de8>] ext4_free_d...
2012 Oct 09
2
[PATCH] vhost-blk: Add vhost-blk support v2
...l = &req->pl[i]; + pl->pages_nr = pages_nr; + pl->pages = pages; + + for (j = 0; j < pages_nr; j++) { + unsigned int off, len; + page = pages[j]; + off = iov_base & ~PAGE_MASK; + len = PAGE_SIZE - off; + if (len > iov_len) + len = iov_len; + + while (!bio || bio_add_page(bio, page, len, off) <= 0) { + bio = bio_alloc(GFP_KERNEL, pages_nr); + if (!bio) + goto fail; + 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; + }...
2012 Oct 09
2
[PATCH] vhost-blk: Add vhost-blk support v2
...l = &req->pl[i]; + pl->pages_nr = pages_nr; + pl->pages = pages; + + for (j = 0; j < pages_nr; j++) { + unsigned int off, len; + page = pages[j]; + off = iov_base & ~PAGE_MASK; + len = PAGE_SIZE - off; + if (len > iov_len) + len = iov_len; + + while (!bio || bio_add_page(bio, page, len, off) <= 0) { + bio = bio_alloc(GFP_KERNEL, pages_nr); + if (!bio) + goto fail; + 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; + }...
2012 Nov 19
1
[PATCH] vhost-blk: Add vhost-blk support v5
...l = &req->pl[i]; + pl->pages_nr = pages_nr; + pl->pages = pages; + + for (j = 0; j < pages_nr; j++) { + unsigned int off, len; + page = pages[j]; + off = iov_base & ~PAGE_MASK; + len = PAGE_SIZE - off; + if (len > iov_len) + len = iov_len; + + while (!bio || bio_add_page(bio, page, len, off) <= 0) { + bio = bio_alloc(GFP_KERNEL, pages_nr); + if (!bio) + goto fail; + 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; + }...
2012 Nov 19
1
[PATCH] vhost-blk: Add vhost-blk support v5
...l = &req->pl[i]; + pl->pages_nr = pages_nr; + pl->pages = pages; + + for (j = 0; j < pages_nr; j++) { + unsigned int off, len; + page = pages[j]; + off = iov_base & ~PAGE_MASK; + len = PAGE_SIZE - off; + if (len > iov_len) + len = iov_len; + + while (!bio || bio_add_page(bio, page, len, off) <= 0) { + bio = bio_alloc(GFP_KERNEL, pages_nr); + if (!bio) + goto fail; + 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; + }...
2012 Oct 15
2
[PATCH 1/1] vhost-blk: Add vhost-blk support v4
...l = &req->pl[i]; + pl->pages_nr = pages_nr; + pl->pages = pages; + + for (j = 0; j < pages_nr; j++) { + unsigned int off, len; + page = pages[j]; + off = iov_base & ~PAGE_MASK; + len = PAGE_SIZE - off; + if (len > iov_len) + len = iov_len; + + while (!bio || bio_add_page(bio, page, len, off) <= 0) { + bio = bio_alloc(GFP_KERNEL, pages_nr); + if (!bio) + goto fail; + 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; + }...
2012 Oct 15
2
[PATCH 1/1] vhost-blk: Add vhost-blk support v4
...l = &req->pl[i]; + pl->pages_nr = pages_nr; + pl->pages = pages; + + for (j = 0; j < pages_nr; j++) { + unsigned int off, len; + page = pages[j]; + off = iov_base & ~PAGE_MASK; + len = PAGE_SIZE - off; + if (len > iov_len) + len = iov_len; + + while (!bio || bio_add_page(bio, page, len, off) <= 0) { + bio = bio_alloc(GFP_KERNEL, pages_nr); + if (!bio) + goto fail; + 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; + }...
2012 Oct 10
0
[PATCH] vhost-blk: Add vhost-blk support v3
...l = &req->pl[i]; + pl->pages_nr = pages_nr; + pl->pages = pages; + + for (j = 0; j < pages_nr; j++) { + unsigned int off, len; + page = pages[j]; + off = iov_base & ~PAGE_MASK; + len = PAGE_SIZE - off; + if (len > iov_len) + len = iov_len; + + while (!bio || bio_add_page(bio, page, len, off) <= 0) { + bio = bio_alloc(GFP_KERNEL, pages_nr); + if (!bio) + goto fail; + 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; + }...
2012 Oct 10
0
[PATCH] vhost-blk: Add vhost-blk support v3
...l = &req->pl[i]; + pl->pages_nr = pages_nr; + pl->pages = pages; + + for (j = 0; j < pages_nr; j++) { + unsigned int off, len; + page = pages[j]; + off = iov_base & ~PAGE_MASK; + len = PAGE_SIZE - off; + if (len > iov_len) + len = iov_len; + + while (!bio || bio_add_page(bio, page, len, off) <= 0) { + bio = bio_alloc(GFP_KERNEL, pages_nr); + if (!bio) + goto fail; + 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; + }...
2011 Mar 08
6
[PATCH v1 0/6] btrfs: scrub
This series adds an initial implementation for scrub. It works quite straightforward. The usermode issues an ioctl for each device in the fs. For each device, it enumerates the allocated device chunks. For each chunk, the contained extents are enumerated and the data checksums fetched. The extents are read sequentially and the checksums verified. If an error occurs (checksum or EIO), a good copy
2012 Dec 02
3
[PATCH] vhost-blk: Add vhost-blk support v6
...l = &req->pl[i]; + pl->pages_nr = pages_nr; + pl->pages = pages; + + for (j = 0; j < pages_nr; j++) { + unsigned int off, len; + page = pages[j]; + off = iov_base & ~PAGE_MASK; + len = PAGE_SIZE - off; + if (len > iov_len) + len = iov_len; + + while (!bio || bio_add_page(bio, page, len, off) <= 0) { + bio = bio_alloc(GFP_KERNEL, pages_nr_total); + if (!bio) + goto fail; + 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;...
2012 Dec 02
3
[PATCH] vhost-blk: Add vhost-blk support v6
...l = &req->pl[i]; + pl->pages_nr = pages_nr; + pl->pages = pages; + + for (j = 0; j < pages_nr; j++) { + unsigned int off, len; + page = pages[j]; + off = iov_base & ~PAGE_MASK; + len = PAGE_SIZE - off; + if (len > iov_len) + len = iov_len; + + while (!bio || bio_add_page(bio, page, len, off) <= 0) { + bio = bio_alloc(GFP_KERNEL, pages_nr_total); + if (!bio) + goto fail; + 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;...
2012 Sep 19
27
[PATCH] Persistent grant maps for xen blk drivers
...* xen_blkbk_unmap. */ - if (xen_blkbk_map(req, pending_req, seg)) + if (xen_blkbk_map(req, pending_req, seg, pages)) goto fail_flush; /* @@ -688,7 +804,7 @@ static int dispatch_rw_block_io(struct xen_blkif *blkif, for (i = 0; i < nseg; i++) { while ((bio == NULL) || (bio_add_page(bio, - blkbk->pending_page(pending_req, i), + pages[i], seg[i].nsec << 9, seg[i].buf & ~PAGE_MASK) == 0)) { @@ -743,7 +859,8 @@ static int dispatch_rw_block_io(struct xen_blkif *blkif, return 0; fail_flush: - xen_blkbk_unmap(pending_req); + i...