]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge remote-tracking branch 'md/for-next'
authorStephen Rothwell <sfr@canb.auug.org.au>
Wed, 26 Sep 2012 02:50:08 +0000 (12:50 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 26 Sep 2012 02:50:08 +0000 (12:50 +1000)
Conflicts:
drivers/md/raid0.c
fs/bio.c

1  2 
block/blk-core.c
drivers/md/md.c
drivers/md/raid0.c
fs/bio.c

Simple merge
diff --cc drivers/md/md.c
Simple merge
index a9e4fa95dfaa76ac1d38434ac8153a6ffe1132c6,1a8e5e3692b90c43d587a0fa4080680c5c258633..24b359717a7e8917a4955e36651e6eb4009dc393
@@@ -422,7 -431,7 +431,8 @@@ static int raid0_run(struct mddev *mdde
        if (md_check_no_bitmap(mddev))
                return -EINVAL;
        blk_queue_max_hw_sectors(mddev->queue, mddev->chunk_sectors);
 +      blk_queue_max_write_same_sectors(mddev->queue, mddev->chunk_sectors);
+       blk_queue_max_discard_sectors(mddev->queue, mddev->chunk_sectors);
  
        /* if private is not null, we are here after takeover */
        if (mddev->private == NULL) {
diff --cc fs/bio.c
index f855e0e1869cc5d85ddcfb4ed612a2582ac03355,dbb7a6c34ebe19dfdc7ca5e024d5bb82ba1786d3..983ff7fce25bebce2042d0b38d357cb1f20409bb
+++ b/fs/bio.c
@@@ -1485,20 -1511,19 +1485,21 @@@ struct bio_pair *bio_split(struct bio *
        bp->bio2.bi_size -= first_sectors << 9;
        bp->bio1.bi_size = first_sectors << 9;
  
-       bp->bv1 = bi->bi_io_vec[0];
-       bp->bv2 = bi->bi_io_vec[0];
-       if (bio_is_rw(bi)) {
-               bp->bv2.bv_offset += first_sectors << 9;
-               bp->bv2.bv_len -= first_sectors << 9;
-               bp->bv1.bv_len = first_sectors << 9;
-       }
+       if (bi->bi_vcnt != 0) {
+               bp->bv1 = bi->bi_io_vec[0];
+               bp->bv2 = bi->bi_io_vec[0];
 -              bp->bv2.bv_offset += first_sectors << 9;
 -              bp->bv2.bv_len -= first_sectors << 9;
 -              bp->bv1.bv_len = first_sectors << 9;
++              if (bio_is_rw(bi)) {
++                      bp->bv2.bv_offset += first_sectors << 9;
++                      bp->bv2.bv_len -= first_sectors << 9;
++                      bp->bv1.bv_len = first_sectors << 9;
++              }
  
-       bp->bio1.bi_io_vec = &bp->bv1;
-       bp->bio2.bi_io_vec = &bp->bv2;
+               bp->bio1.bi_io_vec = &bp->bv1;
+               bp->bio2.bi_io_vec = &bp->bv2;
  
-       bp->bio1.bi_max_vecs = 1;
-       bp->bio2.bi_max_vecs = 1;
+               bp->bio1.bi_max_vecs = 1;
+               bp->bio2.bi_max_vecs = 1;
+       }
  
        bp->bio1.bi_end_io = bio_pair_end_1;
        bp->bio2.bi_end_io = bio_pair_end_2;