Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-08 Thread Kent Overstreet
On Wed, Jan 08, 2014 at 01:18:46PM -0800, Muthu Kumar wrote: > On Wed, Jan 8, 2014 at 1:14 PM, Kent Overstreet wrote: > > On Wed, Jan 08, 2014 at 09:11:49PM +, Chris Mason wrote: > >> On Wed, 2014-01-08 at 13:01 -0800, Muthu Kumar wrote: > >> > On Wed, Jan 8, 2014 at 12:51 PM, Chris Mason

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-08 Thread Jens Axboe
On 01/08/2014 02:13 PM, Chris Mason wrote: > On Tue, 2014-01-07 at 12:15 -0800, Muthu Kumar wrote: >> Thanks Fengguang. Final patch with added comment. BTW, fengguang >> mentioned that git-am has trouble with the inline patch and "quilt >> import" worked fine for him... >> >> >> In

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-08 Thread Muthu Kumar
On Wed, Jan 8, 2014 at 1:14 PM, Kent Overstreet wrote: > On Wed, Jan 08, 2014 at 09:11:49PM +, Chris Mason wrote: >> On Wed, 2014-01-08 at 13:01 -0800, Muthu Kumar wrote: >> > On Wed, Jan 8, 2014 at 12:51 PM, Chris Mason wrote: >> > > On Wed, 2014-01-08 at 12:40 -0800, Muthu Kumar wrote: >>

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-08 Thread Chris Mason
On Tue, 2014-01-07 at 12:15 -0800, Muthu Kumar wrote: > Thanks Fengguang. Final patch with added comment. BTW, fengguang > mentioned that git-am has trouble with the inline patch and "quilt > import" worked fine for him... > > > In btrfs_end_bio(), we increment bi_remaining if

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-08 Thread Kent Overstreet
On Wed, Jan 08, 2014 at 09:11:49PM +, Chris Mason wrote: > On Wed, 2014-01-08 at 13:01 -0800, Muthu Kumar wrote: > > On Wed, Jan 8, 2014 at 12:51 PM, Chris Mason wrote: > > > On Wed, 2014-01-08 at 12:40 -0800, Muthu Kumar wrote: > > >> On Wed, Jan 8, 2014 at 12:16 PM, Chris Mason wrote: > >

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-08 Thread Chris Mason
On Wed, 2014-01-08 at 13:01 -0800, Muthu Kumar wrote: > On Wed, Jan 8, 2014 at 12:51 PM, Chris Mason wrote: > > On Wed, 2014-01-08 at 12:40 -0800, Muthu Kumar wrote: > >> On Wed, Jan 8, 2014 at 12:16 PM, Chris Mason wrote: > >> > On Wed, 2014-01-08 at 11:54 -0800, Muthu Kumar wrote: > >> >>

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-08 Thread Muthu Kumar
On Wed, Jan 8, 2014 at 12:51 PM, Chris Mason wrote: > On Wed, 2014-01-08 at 12:40 -0800, Muthu Kumar wrote: >> On Wed, Jan 8, 2014 at 12:16 PM, Chris Mason wrote: >> > On Wed, 2014-01-08 at 11:54 -0800, Muthu Kumar wrote: >> >> Chris, >> >> >> >> [8.336061] WARNING: CPU: 0 PID: 0 at

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-08 Thread Chris Mason
On Wed, 2014-01-08 at 12:40 -0800, Muthu Kumar wrote: > On Wed, Jan 8, 2014 at 12:16 PM, Chris Mason wrote: > > On Wed, 2014-01-08 at 11:54 -0800, Muthu Kumar wrote: > >> Chris, > >> > >> [8.336061] WARNING: CPU: 0 PID: 0 at fs/bio.c:1778 > >> bio_endio+0xbe/0x100() > >> [8.336062]

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-08 Thread Muthu Kumar
On Wed, Jan 8, 2014 at 12:16 PM, Chris Mason wrote: > On Wed, 2014-01-08 at 11:54 -0800, Muthu Kumar wrote: >> Chris, >> >> [8.336061] WARNING: CPU: 0 PID: 0 at fs/bio.c:1778 bio_endio+0xbe/0x100() >> [8.336062] bio_endio: bio for (unknown) without endio >> >> This is my recent change to

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-08 Thread Chris Mason
On Wed, 2014-01-08 at 11:54 -0800, Muthu Kumar wrote: > Chris, > > [8.336061] WARNING: CPU: 0 PID: 0 at fs/bio.c:1778 bio_endio+0xbe/0x100() > [8.336062] bio_endio: bio for (unknown) without endio > > This is my recent change to avoid memory leak in bio_endio. But I > think the problem

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-08 Thread Muthu Kumar
Chris, [8.336061] WARNING: CPU: 0 PID: 0 at fs/bio.c:1778 bio_endio+0xbe/0x100() [8.336062] bio_endio: bio for (unknown) without endio This is my recent change to avoid memory leak in bio_endio. But I think the problem is higher up, most likely bio_endio is called twice on the same bio

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-08 Thread Chris Mason
On Tue, 2014-01-07 at 13:23 -0800, Muthu Kumar wrote: > Chris, > This is based off of Jens block tree, for-3.14/core branch... > Ok, Kent did pull in one of my hunks, one was a comment and the third was effectively the same as your patch. I tried to test the end result today, but get these on

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-08 Thread Chris Mason
On Tue, 2014-01-07 at 13:23 -0800, Muthu Kumar wrote: Chris, This is based off of Jens block tree, for-3.14/core branch... Ok, Kent did pull in one of my hunks, one was a comment and the third was effectively the same as your patch. I tried to test the end result today, but get these on boot

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-08 Thread Muthu Kumar
Chris, [8.336061] WARNING: CPU: 0 PID: 0 at fs/bio.c:1778 bio_endio+0xbe/0x100() [8.336062] bio_endio: bio for (unknown) without endio This is my recent change to avoid memory leak in bio_endio. But I think the problem is higher up, most likely bio_endio is called twice on the same bio

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-08 Thread Chris Mason
On Wed, 2014-01-08 at 11:54 -0800, Muthu Kumar wrote: Chris, [8.336061] WARNING: CPU: 0 PID: 0 at fs/bio.c:1778 bio_endio+0xbe/0x100() [8.336062] bio_endio: bio for (unknown) without endio This is my recent change to avoid memory leak in bio_endio. But I think the problem is

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-08 Thread Muthu Kumar
On Wed, Jan 8, 2014 at 12:16 PM, Chris Mason c...@fb.com wrote: On Wed, 2014-01-08 at 11:54 -0800, Muthu Kumar wrote: Chris, [8.336061] WARNING: CPU: 0 PID: 0 at fs/bio.c:1778 bio_endio+0xbe/0x100() [8.336062] bio_endio: bio for (unknown) without endio This is my recent change to

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-08 Thread Chris Mason
On Wed, 2014-01-08 at 12:40 -0800, Muthu Kumar wrote: On Wed, Jan 8, 2014 at 12:16 PM, Chris Mason c...@fb.com wrote: On Wed, 2014-01-08 at 11:54 -0800, Muthu Kumar wrote: Chris, [8.336061] WARNING: CPU: 0 PID: 0 at fs/bio.c:1778 bio_endio+0xbe/0x100() [8.336062] bio_endio:

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-08 Thread Muthu Kumar
On Wed, Jan 8, 2014 at 12:51 PM, Chris Mason c...@fb.com wrote: On Wed, 2014-01-08 at 12:40 -0800, Muthu Kumar wrote: On Wed, Jan 8, 2014 at 12:16 PM, Chris Mason c...@fb.com wrote: On Wed, 2014-01-08 at 11:54 -0800, Muthu Kumar wrote: Chris, [8.336061] WARNING: CPU: 0 PID: 0 at

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-08 Thread Chris Mason
On Wed, 2014-01-08 at 13:01 -0800, Muthu Kumar wrote: On Wed, Jan 8, 2014 at 12:51 PM, Chris Mason c...@fb.com wrote: On Wed, 2014-01-08 at 12:40 -0800, Muthu Kumar wrote: On Wed, Jan 8, 2014 at 12:16 PM, Chris Mason c...@fb.com wrote: On Wed, 2014-01-08 at 11:54 -0800, Muthu Kumar wrote:

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-08 Thread Kent Overstreet
On Wed, Jan 08, 2014 at 09:11:49PM +, Chris Mason wrote: On Wed, 2014-01-08 at 13:01 -0800, Muthu Kumar wrote: On Wed, Jan 8, 2014 at 12:51 PM, Chris Mason c...@fb.com wrote: On Wed, 2014-01-08 at 12:40 -0800, Muthu Kumar wrote: On Wed, Jan 8, 2014 at 12:16 PM, Chris Mason c...@fb.com

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-08 Thread Chris Mason
On Tue, 2014-01-07 at 12:15 -0800, Muthu Kumar wrote: Thanks Fengguang. Final patch with added comment. BTW, fengguang mentioned that git-am has trouble with the inline patch and quilt import worked fine for him... In btrfs_end_bio(), we increment bi_remaining if is_orig_bio.

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-08 Thread Muthu Kumar
On Wed, Jan 8, 2014 at 1:14 PM, Kent Overstreet k...@daterainc.com wrote: On Wed, Jan 08, 2014 at 09:11:49PM +, Chris Mason wrote: On Wed, 2014-01-08 at 13:01 -0800, Muthu Kumar wrote: On Wed, Jan 8, 2014 at 12:51 PM, Chris Mason c...@fb.com wrote: On Wed, 2014-01-08 at 12:40 -0800,

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-08 Thread Jens Axboe
On 01/08/2014 02:13 PM, Chris Mason wrote: On Tue, 2014-01-07 at 12:15 -0800, Muthu Kumar wrote: Thanks Fengguang. Final patch with added comment. BTW, fengguang mentioned that git-am has trouble with the inline patch and quilt import worked fine for him... In btrfs_end_bio(),

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-08 Thread Kent Overstreet
On Wed, Jan 08, 2014 at 01:18:46PM -0800, Muthu Kumar wrote: On Wed, Jan 8, 2014 at 1:14 PM, Kent Overstreet k...@daterainc.com wrote: On Wed, Jan 08, 2014 at 09:11:49PM +, Chris Mason wrote: On Wed, 2014-01-08 at 13:01 -0800, Muthu Kumar wrote: On Wed, Jan 8, 2014 at 12:51 PM, Chris

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-07 Thread Muthu Kumar
Chris, This is based off of Jens block tree, for-3.14/core branch... Regards, Muthu On Tue, Jan 7, 2014 at 12:29 PM, Chris Mason wrote: > On Tue, 2014-01-07 at 12:15 -0800, Muthu Kumar wrote: >> Thanks Fengguang. Final patch with added comment. BTW, fengguang >> mentioned that git-am has

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-07 Thread Chris Mason
On Tue, 2014-01-07 at 12:15 -0800, Muthu Kumar wrote: > Thanks Fengguang. Final patch with added comment. BTW, fengguang > mentioned that git-am has trouble with the inline patch and "quilt > import" worked fine for him... > > > In btrfs_end_bio(), we increment bi_remaining if

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-07 Thread Muthu Kumar
Thanks Fengguang. Final patch with added comment. BTW, fengguang mentioned that git-am has trouble with the inline patch and "quilt import" worked fine for him... In btrfs_end_bio(), we increment bi_remaining if is_orig_bio. If not, we restore the orig_bio but failed to increment

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-07 Thread Muthu Kumar
Thanks Fengguang. Final patch with added comment. BTW, fengguang mentioned that git-am has trouble with the inline patch and quilt import worked fine for him... In btrfs_end_bio(), we increment bi_remaining if is_orig_bio. If not, we restore the orig_bio but failed to increment

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-07 Thread Chris Mason
On Tue, 2014-01-07 at 12:15 -0800, Muthu Kumar wrote: Thanks Fengguang. Final patch with added comment. BTW, fengguang mentioned that git-am has trouble with the inline patch and quilt import worked fine for him... In btrfs_end_bio(), we increment bi_remaining if is_orig_bio.

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-07 Thread Muthu Kumar
Chris, This is based off of Jens block tree, for-3.14/core branch... Regards, Muthu On Tue, Jan 7, 2014 at 12:29 PM, Chris Mason c...@fb.com wrote: On Tue, 2014-01-07 at 12:15 -0800, Muthu Kumar wrote: Thanks Fengguang. Final patch with added comment. BTW, fengguang mentioned that git-am has

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-06 Thread Fengguang Wu
On Mon, Jan 06, 2014 at 04:47:38PM -0800, Muthu Kumar wrote: > OK, after a bit more staring I believe the correct fix is the following. > > Fengguang, Please try this one? Yes, it runs fine now! Tested-by: Fengguang Wu Thanks, Fengguang > > In btrfs_end_bio(), we increment

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-06 Thread Kent Overstreet
On Mon, Jan 06, 2014 at 04:47:38PM -0800, Muthu Kumar wrote: > OK, after a bit more staring I believe the correct fix is the following. This code still confuses me but I think you're correct, the fix certainly matches the evidence we have. > Fengguang, Please try this one? > > Regards, > Muthu

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-06 Thread Muthu Kumar
OK, after a bit more staring I believe the correct fix is the following. Fengguang, Please try this one? Regards, Muthu In btrfs_end_bio(), we increment bi_remaining if is_orig_bio. If not, we restore the orig_bio but failed to increment bi_remaining for orig_bio, which triggers a

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-06 Thread Kent Overstreet
Chris, the patch below seems to be incorrect - with it we get hangs, so bi_remaining (probably) isn't getting decremented when it should be. You sent Jens fixes for btrfs which I somehow lost when I rebased, do you remember how this is supposed to work? Looking at the code I'm not quite sure

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-06 Thread Kent Overstreet
Chris, the patch below seems to be incorrect - with it we get hangs, so bi_remaining (probably) isn't getting decremented when it should be. You sent Jens fixes for btrfs which I somehow lost when I rebased, do you remember how this is supposed to work? Looking at the code I'm not quite sure

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-06 Thread Muthu Kumar
OK, after a bit more staring I believe the correct fix is the following. Fengguang, Please try this one? Regards, Muthu In btrfs_end_bio(), we increment bi_remaining if is_orig_bio. If not, we restore the orig_bio but failed to increment bi_remaining for orig_bio, which triggers a

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-06 Thread Kent Overstreet
On Mon, Jan 06, 2014 at 04:47:38PM -0800, Muthu Kumar wrote: OK, after a bit more staring I believe the correct fix is the following. This code still confuses me but I think you're correct, the fix certainly matches the evidence we have. Fengguang, Please try this one? Regards, Muthu

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-06 Thread Fengguang Wu
On Mon, Jan 06, 2014 at 04:47:38PM -0800, Muthu Kumar wrote: OK, after a bit more staring I believe the correct fix is the following. Fengguang, Please try this one? Yes, it runs fine now! Tested-by: Fengguang Wu fengguang...@intel.com Thanks, Fengguang In btrfs_end_bio(),

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-05 Thread Muthu Kumar
Fengguang, Instead of rebooting, can you trigger a crash dump when this happens and send us the backtrace (to start with)? Kent, Did you do any btrfs test with your changes? Regards, Muthu On Sun, Jan 5, 2014 at 1:46 AM, Fengguang Wu wrote: > Hi Muthu, > > On Fri, Jan 03, 2014 at 11:51:31AM

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-05 Thread Muthu Kumar
Fengguang, Instead of rebooting, can you trigger a crash dump when this happens and send us the backtrace (to start with)? Kent, Did you do any btrfs test with your changes? Regards, Muthu On Sun, Jan 5, 2014 at 1:46 AM, Fengguang Wu fengguang...@intel.com wrote: Hi Muthu, On Fri, Jan 03,

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-03 Thread Muthu Kumar
Looks like Kent missed the btrfs endio in the original commit. How about this patch: - In btrfs_end_bio, call bio_endio_nodec on the restored bio so the bi_remaining is accounted for correctly. Reported-by: fengguang...@intel.com Cc: Kent Overstreet CC: Jens Axboe Signed-off-by:

Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748

2014-01-03 Thread Muthu Kumar
Looks like Kent missed the btrfs endio in the original commit. How about this patch: - In btrfs_end_bio, call bio_endio_nodec on the restored bio so the bi_remaining is accounted for correctly. Reported-by: fengguang...@intel.com Cc: Kent Overstreet k...@daterainc.com CC: Jens Axboe