From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Mason Subject: Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748 Date: Wed, 8 Jan 2014 21:13:47 +0000 Message-ID: <1389215654.23310.39.camel@ret.masoncoding.com> References: <20140102053101.GA29352@localhost> <20140106221036.GE9037@kmo> <20140107055318.GA19016@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-7" Content-Transfer-Encoding: 8BIT Cc: "kmo@daterainc.com" , "linux-btrfs@vger.kernel.org" , "fengguang.wu@intel.com" , "linux-kernel@vger.kernel.org" , "lkp@linux.intel.com" , "axboe@kernel.dk" , "linux-fsdevel@vger.kernel.org" To: "muthu.lkml@gmail.com" Return-path: In-Reply-To: Content-Language: en-US Content-ID: <0DAC6286D060EA46A5DFA725F90EABC1@fb.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Tue, 2014-01-07 at 12:15 -0800, Muthu Kumar wrote: +AD4- Thanks Fengguang. Final patch with added comment. BTW, fengguang +AD4- mentioned that git-am has trouble with the inline patch and +ACI-quilt +AD4- import+ACI- worked fine for him... +AD4- +AD4- ------------ +AD4- In btrfs+AF8-end+AF8-bio(), we increment bi+AF8-remaining if is+AF8-orig+AF8-bio. If not, +AD4- we restore the orig+AF8-bio but failed to increment bi+AF8-remaining for +AD4- orig+AF8-bio, which triggers a BUG+AF8-ON later when bio+AF8-endio is called. Fix +AD4- is to increment bi+AF8-remaining when we restore the orig bio as well. +AD4- +AD4- Reported-and-Tested-by: Fengguang wu +ADw-fengguang.wu+AEA-intel.com+AD4- +AD4- CC: Kent Overstreet +ADw-kmo+AEA-daterainc.com+AD4- +AD4- CC: Jens Axboe +ADw-axboe+AEA-kernel.dk+AD4- +AD4- CC: Chris Mason +ADw-clm+AEA-fb.com+AD4- +AD4- Signed-off-by: Muthukumar Ratty +ADw-muthur+AEA-gmail.com+AD4- +AD4- Reviewed-by: Chris Mason +ADw-clm+AEA-fb.com+AD4- Jens, please pull this one in. +AD4- ----------- +AD4- fs/btrfs/volumes.c +AHw- 8 +-+-+-+-+-+--- +AD4- 1 files changed, 6 insertions(+-), 2 deletions(-) +AD4- +AD4- diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c +AD4- index 37972d5..34aba2b 100644 +AD4- --- a/fs/btrfs/volumes.c +AD4- +-+-+- b/fs/btrfs/volumes.c +AD4- +AEAAQA- -5297,9 +-5297,13 +AEAAQA- static void btrfs+AF8-end+AF8-bio(struct bio +ACo-bio, int err) +AD4- if (+ACE-is+AF8-orig+AF8-bio) +AHs- +AD4- bio+AF8-put(bio)+ADs- +AD4- bio +AD0- bbio-+AD4-orig+AF8-bio+ADs- +AD4- - +AH0- else +AHs- +AD4- - atomic+AF8-inc(+ACY-bio-+AD4-bi+AF8-remaining)+ADs- +AD4- +AH0- +AD4- +- /+ACo- +AD4- +- +ACo- We have original bio now. So increment bi+AF8-remaining to +AD4- +- +ACo- account for it in endio +AD4- +- +ACo-/ +AD4- +- atomic+AF8-inc(+ACY-bio-+AD4-bi+AF8-remaining)+ADs- +AD4- +- +AD4- bio-+AD4-bi+AF8-private +AD0- bbio-+AD4-private+ADs- +AD4- bio-+AD4-bi+AF8-end+AF8-io +AD0- bbio-+AD4-end+AF8-io+ADs- +AD4- btrfs+AF8-io+AF8-bio(bio)-+AD4-mirror+AF8-num +AD0- bbio-+AD4-mirror+AF8-num+ADs- +AD4- +AD4- -------------------------------------