From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262153AbVHCHM2 (ORCPT ); Wed, 3 Aug 2005 03:12:28 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262158AbVHCHMX (ORCPT ); Wed, 3 Aug 2005 03:12:23 -0400 Received: from ns.virtualhost.dk ([195.184.98.160]:40908 "EHLO virtualhost.dk") by vger.kernel.org with ESMTP id S262155AbVHCHLi (ORCPT ); Wed, 3 Aug 2005 03:11:38 -0400 Date: Wed, 3 Aug 2005 09:13:03 +0200 From: Jens Axboe To: Chris Wright Cc: linux-kernel@vger.kernel.org, stable@kernel.org, Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Chuck Wolber , torvalds@osdl.org, akpm@osdl.org, alan@lxorguk.ukuu.org.uk Subject: Re: [10/13] [PATCH] bio_clone fix Message-ID: <20050803071302.GG3710@suse.de> References: <20050803064439.GO7762@shell0.pdx.osdl.net> <20050803070303.GY7762@shell0.pdx.osdl.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050803070303.GY7762@shell0.pdx.osdl.net> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 03 2005, Chris Wright wrote: > -stable review patch. If anyone has any objections, please let us know. Full ack. > > ------------------ > > [PATCH] bio_clone fix > > Fix bug introduced in 2.6.11-rc2: when we clone a BIO we need to copy over the > current index into it as well. > > It corrupts data with some MD setups. > > See http://bugzilla.kernel.org/show_bug.cgi?id=4946 > > Huuuuuuuuge thanks to Matthew Stapleton for doggedly > chasing this one down. > > Acked-by: Jens Axboe > Cc: > Cc: > Signed-off-by: Andrew Morton > Signed-off-by: Linus Torvalds > Signed-off-by: Chris Wright > --- > > fs/bio.c | 1 + > 1 files changed, 1 insertion(+) > > diff --git a/fs/bio.c b/fs/bio.c > --- a/fs/bio.c > +++ b/fs/bio.c > @@ -261,6 +261,7 @@ inline void __bio_clone(struct bio *bio, > */ > bio->bi_vcnt = bio_src->bi_vcnt; > bio->bi_size = bio_src->bi_size; > + bio->bi_idx = bio_src->bi_idx; > bio_phys_segments(q, bio); > bio_hw_segments(q, bio); > } > - > -- Jens Axboe