From: Stephen Rothwell Date: Wed, 26 Sep 2012 02:50:08 +0000 (+1000) Subject: Merge remote-tracking branch 'md/for-next' X-Git-Tag: next-20120926~52 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8f70c68d0b9e508603f9b91617e1af7688994a10;p=karo-tx-linux.git Merge remote-tracking branch 'md/for-next' Conflicts: drivers/md/raid0.c fs/bio.c --- 8f70c68d0b9e508603f9b91617e1af7688994a10 diff --cc drivers/md/raid0.c index a9e4fa95dfaa,1a8e5e3692b9..24b359717a7e --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c @@@ -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 f855e0e1869c,dbb7a6c34ebe..983ff7fce25b --- a/fs/bio.c +++ 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;