* [PATCH 2/4]ext4: Remove unneeded BUG_ON() in ext4_move_extents()
@ 2009-09-02 3:17 Akira Fujita
2009-09-02 5:38 ` Peng Tao
2009-09-06 3:13 ` Theodore Tso
0 siblings, 2 replies; 4+ messages in thread
From: Akira Fujita @ 2009-09-02 3:17 UTC (permalink / raw)
To: Theodore Tso; +Cc: linux-ext4
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.
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);
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/4]ext4: Remove unneeded BUG_ON() in ext4_move_extents()
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
2009-09-02 6:48 ` Akira Fujita
2009-09-06 3:13 ` Theodore Tso
1 sibling, 1 reply; 4+ messages in thread
From: Peng Tao @ 2009-09-02 5:38 UTC (permalink / raw)
To: Akira Fujita; +Cc: Theodore Tso, linux-ext4
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/4]ext4: Remove unneeded BUG_ON() in ext4_move_extents()
2009-09-02 5:38 ` Peng Tao
@ 2009-09-02 6:48 ` Akira Fujita
0 siblings, 0 replies; 4+ messages in thread
From: Akira Fujita @ 2009-09-02 6:48 UTC (permalink / raw)
To: Peng Tao; +Cc: Theodore Tso, linux-ext4
Hi Peng,
Peng Tao wrote:
> 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.
I am looking into the issues you reported before:
http://marc.info/?l=linux-ext4&m=124975192830024&w=2
http://marc.info/?l=linux-ext4&m=124992522305319&w=2
When I send patches to the list, please review and test them.
Regards,
Akira Fujita
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/4]ext4: Remove unneeded BUG_ON() in ext4_move_extents()
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
@ 2009-09-06 3:13 ` Theodore Tso
1 sibling, 0 replies; 4+ messages in thread
From: Theodore Tso @ 2009-09-06 3:13 UTC (permalink / raw)
To: Akira Fujita; +Cc: linux-ext4
On Wed, Sep 02, 2009 at 12:17:57PM +0900, Akira Fujita wrote:
> 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.
Added to the ext4 patch queue.
- Ted
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-09-06 3:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2009-09-02 6:48 ` Akira Fujita
2009-09-06 3:13 ` Theodore Tso
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.