bio_split() for multiple bi_io_vec

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I need a function to split a bio into mutiple 
smaller bio-s. The bio_split() in Linux kernel
does not support for spliting bio with multiple
bi_io_vec. How can I support for it? 

I just removed the BUG_ONs and changed the maximum
of bi_max_vecs for second bio in bio_split(). But
it does not help.

Please help me.

--- linux-2.6.23.8/fs/bio.c.xlayer      2007-11-17 03:14:27.000000000 +0900
+++ linux-2.6.23.8/fs/bio.c     2007-12-19 16:49:59.000000000 +0900
@@ -1084,8 +1084,6 @@
        blk_add_trace_pdu_int(bdev_get_queue(bi->bi_bdev), BLK_TA_SPLIT, bi,
                                bi->bi_sector + first_sectors);

-       BUG_ON(bi->bi_vcnt != 1);
-       BUG_ON(bi->bi_idx != 0);
        atomic_set(&bp->cnt, 3);
        bp->error = 0;
        bp->bio1 = *bi;
@@ -1104,7 +1102,7 @@
        bp->bio2.bi_io_vec = &bp->bv2;

        bp->bio1.bi_max_vecs = 1;
-       bp->bio2.bi_max_vecs = 1;
+       bp->bio2.bi_max_vecs = bi->bi_max_vecs;

        bp->bio1.bi_end_io = bio_pair_end_1;
        bp->bio2.bi_end_io = bio_pair_end_2;

-- 
Seongsu Lee, http://www.senux.com/

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux