/[linux-patches]/genpatches-2.6/tags/2.6.12-12/1905_bio-clone-corruption.patch
Gentoo

Contents of /genpatches-2.6/tags/2.6.12-12/1905_bio-clone-corruption.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 137 - (show annotations) (download)
Tue Aug 9 21:23:12 2005 UTC (13 years, 4 months ago) by dsd
File size: 1099 byte(s)
2.6.12-12 release
1 From: Andrew Morton <akpm@osdl.org>
2 Date: Thu, 28 Jul 2005 08:07:18 +0000 (-0700)
3 Subject: [PATCH] bio_clone fix
4 X-Git-Tag: v2.6.13-rc4
5 X-Git-Url: http://www.kernel.org/git/gitweb.cgi?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=a5453be48e8def75a9c1b2177b82fa0e692c6e3a
6
7 [PATCH] bio_clone fix
8
9 Fix bug introduced in 2.6.11-rc2: when we clone a BIO we need to copy over the
10 current index into it as well.
11
12 It corrupts data with some MD setups.
13
14 See http://bugzilla.kernel.org/show_bug.cgi?id=4946
15
16 Huuuuuuuuge thanks to Matthew Stapleton <matthew4196@gmail.com> for doggedly
17 chasing this one down.
18
19 Acked-by: Jens Axboe <axboe@suse.de>
20 Cc: <linux-raid@vger.kernel.org>
21 Cc: <dm-devel@redhat.com>
22 Signed-off-by: Andrew Morton <akpm@osdl.org>
23 Signed-off-by: Linus Torvalds <torvalds@osdl.org>
24 ---
25
26 --- a/fs/bio.c
27 +++ b/fs/bio.c
28 @@ -261,6 +261,7 @@ inline void __bio_clone(struct bio *bio,
29 */
30 bio->bi_vcnt = bio_src->bi_vcnt;
31 bio->bi_size = bio_src->bi_size;
32 + bio->bi_idx = bio_src->bi_idx;
33 bio_phys_segments(q, bio);
34 bio_hw_segments(q, bio);
35 }

  ViewVC Help
Powered by ViewVC 1.1.20