linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kent Overstreet <kmo@daterainc.com>
To: Muthu Kumar <muthu.lkml@gmail.com>, Chris Mason <clm@fb.com>
Cc: fengguang.wu@intel.com, Jens Axboe <axboe@kernel.dk>,
	linux-btrfs <linux-btrfs@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	lkp@linux.intel.com
Subject: Re: [block:for-3.14/core] kernel BUG at fs/bio.c:1748
Date: Mon, 6 Jan 2014 14:10:36 -0800	[thread overview]
Message-ID: <20140106221036.GE9037@kmo> (raw)
In-Reply-To: <CAFR8uee-WTy6cj8bB4aMuGP1B0sZkc70sq1Drg7uhHS49EqHcg@mail.gmail.com>

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 what's going on
here.

On Fri, Jan 03, 2014 at 11:51:31AM -0800, Muthu Kumar wrote:
> 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.wu@intel.com
> Cc: Kent Overstreet <kmo@daterainc.com>
> CC: Jens Axboe <axboe@kernel.dk>
> Signed-off-by: Muthukumar Ratty <muthur@gmail.com>
> --------
> 
>  fs/btrfs/volumes.c |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
> index f2130de..edfed52 100644
> --- a/fs/btrfs/volumes.c
> +++ b/fs/btrfs/volumes.c
> @@ -5316,7 +5316,11 @@ static void btrfs_end_bio(struct bio *bio, int err)
>                 }
>                 kfree(bbio);
> 
> -               bio_endio(bio, err);
> +                /*
> +                 * Call endio_nodec on the restored bio so the bi_remaining is
> +                 * accounted for correctly
> +                 */
> +               bio_endio_nodec(bio, err);
>         } else if (!is_orig_bio) {
>                 bio_put(bio);
>         }

  parent reply	other threads:[~2014-01-06 22:10 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-02  5:31 [block:for-3.14/core] kernel BUG at fs/bio.c:1748 fengguang.wu
2014-01-03 19:51 ` Muthu Kumar
2014-01-05  9:46   ` Fengguang Wu
2014-01-05 16:28     ` Muthu Kumar
2014-01-06  2:21       ` Fengguang Wu
2014-01-06 22:10   ` Kent Overstreet [this message]
2014-01-07  0:47     ` Muthu Kumar
2014-01-07  2:52       ` Kent Overstreet
2014-01-07  5:53       ` Fengguang Wu
2014-01-07 20:15         ` Muthu Kumar
2014-01-07 20:29           ` Chris Mason
2014-01-07 21:23             ` Muthu Kumar
2014-01-08 19:41               ` Chris Mason
2014-01-08 19:54                 ` Muthu Kumar
2014-01-08 20:16                   ` Chris Mason
2014-01-08 20:40                     ` Muthu Kumar
2014-01-08 20:51                       ` Chris Mason
2014-01-08 21:01                         ` Muthu Kumar
2014-01-08 21:11                           ` Chris Mason
2014-01-08 21:14                             ` Kent Overstreet
2014-01-08 21:18                               ` Muthu Kumar
2014-01-08 21:24                                 ` Kent Overstreet
2014-01-08 21:13           ` Chris Mason
2014-01-08 21:21             ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140106221036.GE9037@kmo \
    --to=kmo@daterainc.com \
    --cc=axboe@kernel.dk \
    --cc=clm@fb.com \
    --cc=fengguang.wu@intel.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@linux.intel.com \
    --cc=muthu.lkml@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).