linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peng Tao <bergwolf@gmail.com>
To: Akira Fujita <a-fujita@rs.jp.nec.com>
Cc: Theodore Tso <tytso@mit.edu>, linux-ext4@vger.kernel.org
Subject: Re: [PATCH 2/4]ext4: Remove unneeded BUG_ON() in ext4_move_extents()
Date: Wed, 2 Sep 2009 13:38:03 +0800	[thread overview]
Message-ID: <6149e97b0909012238i6be6d8deg457a6f308608f1f8@mail.gmail.com> (raw)
In-Reply-To: <4A9DE3E5.8080104@rs.jp.nec.com>

2009/9/2 Akira Fujita <a-fujita@rs.jp.nec.com>:
> ext4: Remove unneeded BUG_ON() in ext4_move_extents()
>
> From: Akira Fujita <a-fujita@rs.jp.nec.com>
>
> ext4_move_extents() checks with BUG_ON() whether
> the exchanged blocks count accords with request blocks count.
> But, if the target range (orig_start + len) includes sparse block(s),
> 'moved_len' (exchanged blocks count) does not accord with
> 'len' (request blocks count),
> since sparse block is not counted in 'moved_len'.
> Therefore we hit BUG_ON(), though it succeeded.
I can confirm the bug in my test cases too.

>
> Signed-off-by: Akira Fujita <a-fujita@rs.jp.nec.com>
> ---
>  fs/ext4/move_extent.c |    3 ---
>  1 files changed, 0 insertions(+), 3 deletions(-)
>
> diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c
> index 60ed567..643156a 100644
> --- a/fs/ext4/move_extent.c
> +++ b/fs/ext4/move_extent.c
> @@ -1323,8 +1323,5 @@ out2:
>        if (ret)
>                return ret;
>
> -       /* All of the specified blocks must be exchanged in succeed */
> -       BUG_ON(*moved_len != len);
> -
>        return 0;
>  }
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>



-- 
Cheers,
Peng Tao
State Key Laboratory of Networking and Switching Technology
Beijing Univ. of Posts and Telecoms.
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2009-09-02  5:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-02  3:17 [PATCH 2/4]ext4: Remove unneeded BUG_ON() in ext4_move_extents() Akira Fujita
2009-09-02  5:38 ` Peng Tao [this message]
2009-09-02  6:48   ` Akira Fujita
2009-09-06  3:13 ` Theodore Tso

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=6149e97b0909012238i6be6d8deg457a6f308608f1f8@mail.gmail.com \
    --to=bergwolf@gmail.com \
    --cc=a-fujita@rs.jp.nec.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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).