* there is a BUG in disk full case in inlinedata feature.
@ 2013-08-27 17:09 Boxi Liu
2013-08-28 1:04 ` Tao Ma
0 siblings, 1 reply; 6+ messages in thread
From: Boxi Liu @ 2013-08-27 17:09 UTC (permalink / raw)
To: linux-ext4@vger.kernel.org, Robin Dong, Theodore Tso, tm@tao.ma
Cc: lewis.liulei
there is a BUG in EXT4 inlinedata feature when the disk is full(0B).
tast case:
step1: use the dd to make the disk full,has 0B remained.
step2: touch a inlinedata file
echo -n "123456" >> test.txt
step3: make the inlinedata file test.txt convert to extent block.
echo -n
"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890">>test.txt
the step3 will write failed.and print the BUG Backtrace:
page:c1963bc0 count:-1 mapcount:0 mapping: (null) index:0x0
page flags:0x40000000()
Backtrace:
[<c004e180>] (dump_backtrace + 0x0/0x12c) from [<c07724ac>]
(dump_stack +0x18/0x1c)
r6:c0043a84 r5:c0bb688 r4:c1963bc0 r3:00000000
[<c0772494>] (dump_stack + 0x0/0x1c) from [<c00f6dd4>] (bad_page + 0xbc/0x13c)
[<c00fbd18>] (bad_page + 0x0/0x13c) from [<c00f74b80>]
(get_page_from_freelist + 0x4cc/0xb6c)
r7:c1963bd8 r6:c0043194 r5:c1963bc0 r4:00000001
[<c00f6fec>] (get_page_from_freelist +0x0/0xb6c) from [<c00f8148>]
(__alloc_pages_nodemask + 0x144/0x820)
[<c00f8004>] (__alloc_pages_nodemask +0x0/0x820) from [<c0115250>]
(handle_pte_fault + 0x574/0x758)
[<c0114cdc>] (handle_pte_fault + 0x0/0x758) from [<c0115500>]
(handle_mm_fault + 0xcc/0x110)
[<c0115434>] (handel_mm_fault + 0x0/0x110) from [<c00521a8>]
(do_page_fault + 0x16c/0x1f4)
[<c005203c>] (do_page_fault + 0x0/0x1f4) from [<c00440d0>]
(do_DataAbort + 0x40/0xac)
[<c0044090>] (do_DataAbort + 0x0/0xac) from [<c004a064>]
(ret_from_exception + 0x0/0x10)
And when the system reboot , the step2 data "123456" will alse lost.
You can cat the test.txt,but there is no data in the file.
the reason is when the inlinedata convert to extent in the limit case,
the inlinedata read to the page,then destory the inlinedata,next step
is to __block_write_begin,but it can't get block,return -ENOSPC. so
the data lost.
there is a patch may fix the bug:
in inline.c ext4_convert_inline_data_to_extent
needed_blocks = ext4_writepage_trans_blocks(inode);
+ if(EXT4_C2B(sbi,percpu_counter_read_positive(&sbi->s_freeclusters_counter))
< needed_blocks)
+ return -ENOSPC;
+
ret = ext4_get_inode_loc(inode, &iloc);
if (ret)
return ret;
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: there is a BUG in disk full case in inlinedata feature.
2013-08-27 17:09 there is a BUG in disk full case in inlinedata feature Boxi Liu
@ 2013-08-28 1:04 ` Tao Ma
2013-08-29 15:15 ` Boxi Liu
2013-10-21 16:22 ` Boxi Liu
0 siblings, 2 replies; 6+ messages in thread
From: Tao Ma @ 2013-08-28 1:04 UTC (permalink / raw)
To: Boxi Liu; +Cc: linux-ext4@vger.kernel.org, Robin Dong, Theodore Tso,
lewis.liulei
Hi Boxi,
Thanks for the detailed explanation and the bug fix. It looks good to me.
So would you mind send out a formal patch?
Thanks,
Tao
On 08/28/2013 01:09 AM, Boxi Liu wrote:
> there is a BUG in EXT4 inlinedata feature when the disk is full(0B).
> tast case:
> step1: use the dd to make the disk full,has 0B remained.
> step2: touch a inlinedata file
> echo -n "123456" >> test.txt
> step3: make the inlinedata file test.txt convert to extent block.
> echo -n
> "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890">>test.txt
> the step3 will write failed.and print the BUG Backtrace:
> page:c1963bc0 count:-1 mapcount:0 mapping: (null) index:0x0
> page flags:0x40000000()
> Backtrace:
> [<c004e180>] (dump_backtrace + 0x0/0x12c) from [<c07724ac>]
> (dump_stack +0x18/0x1c)
> r6:c0043a84 r5:c0bb688 r4:c1963bc0 r3:00000000
> [<c0772494>] (dump_stack + 0x0/0x1c) from [<c00f6dd4>] (bad_page + 0xbc/0x13c)
> [<c00fbd18>] (bad_page + 0x0/0x13c) from [<c00f74b80>]
> (get_page_from_freelist + 0x4cc/0xb6c)
> r7:c1963bd8 r6:c0043194 r5:c1963bc0 r4:00000001
> [<c00f6fec>] (get_page_from_freelist +0x0/0xb6c) from [<c00f8148>]
> (__alloc_pages_nodemask + 0x144/0x820)
> [<c00f8004>] (__alloc_pages_nodemask +0x0/0x820) from [<c0115250>]
> (handle_pte_fault + 0x574/0x758)
> [<c0114cdc>] (handle_pte_fault + 0x0/0x758) from [<c0115500>]
> (handle_mm_fault + 0xcc/0x110)
> [<c0115434>] (handel_mm_fault + 0x0/0x110) from [<c00521a8>]
> (do_page_fault + 0x16c/0x1f4)
> [<c005203c>] (do_page_fault + 0x0/0x1f4) from [<c00440d0>]
> (do_DataAbort + 0x40/0xac)
> [<c0044090>] (do_DataAbort + 0x0/0xac) from [<c004a064>]
> (ret_from_exception + 0x0/0x10)
>
> And when the system reboot , the step2 data "123456" will alse lost.
> You can cat the test.txt,but there is no data in the file.
> the reason is when the inlinedata convert to extent in the limit case,
> the inlinedata read to the page,then destory the inlinedata,next step
> is to __block_write_begin,but it can't get block,return -ENOSPC. so
> the data lost.
>
> there is a patch may fix the bug:
> in inline.c ext4_convert_inline_data_to_extent
>
> needed_blocks = ext4_writepage_trans_blocks(inode);
>
> + if(EXT4_C2B(sbi,percpu_counter_read_positive(&sbi->s_freeclusters_counter))
> < needed_blocks)
> + return -ENOSPC;
> +
> ret = ext4_get_inode_loc(inode, &iloc);
> if (ret)
> return ret;
> --
> 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] 6+ messages in thread
* Re: there is a BUG in disk full case in inlinedata feature.
2013-08-28 1:04 ` Tao Ma
@ 2013-08-29 15:15 ` Boxi Liu
2013-10-21 16:22 ` Boxi Liu
1 sibling, 0 replies; 6+ messages in thread
From: Boxi Liu @ 2013-08-29 15:15 UTC (permalink / raw)
To: Tao Ma; +Cc: linux-ext4@vger.kernel.org, Robin Dong, Theodore Tso,
lewis.liulei
diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
index c0fd1a1..f806f27 100644
--- a/fs/ext4/inline.c
+++ b/fs/ext4/inline.c
@@ -528,6 +528,7 @@ static int
ext4_convert_inline_data_to_extent(struct address_space *mapping,
struct page *page = NULL;
unsigned from, to;
struct ext4_iloc iloc;
+ struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
if (!ext4_has_inline_data(inode)) {
/*
@@ -540,6 +541,9 @@ static int
ext4_convert_inline_data_to_extent(struct address_space *mapping,
needed_blocks = ext4_writepage_trans_blocks(inode);
+ if(EXT4_C2B(sbi,percpu_counter_read_positive(&sbi->s_freeclusters_counter))
< needed_blocks)
+ return -ENOSPC;
+
ret = ext4_get_inode_loc(inode, &iloc);
if (ret)
return ret;
2013/8/28 Tao Ma <tm@tao.ma>:
> Hi Boxi,
> Thanks for the detailed explanation and the bug fix. It looks good to me.
> So would you mind send out a formal patch?
>
> Thanks,
> Tao
> On 08/28/2013 01:09 AM, Boxi Liu wrote:
>> there is a BUG in EXT4 inlinedata feature when the disk is full(0B).
>> tast case:
>> step1: use the dd to make the disk full,has 0B remained.
>> step2: touch a inlinedata file
>> echo -n "123456" >> test.txt
>> step3: make the inlinedata file test.txt convert to extent block.
>> echo -n
>> "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890">>test.txt
>> the step3 will write failed.and print the BUG Backtrace:
>> page:c1963bc0 count:-1 mapcount:0 mapping: (null) index:0x0
>> page flags:0x40000000()
>> Backtrace:
>> [<c004e180>] (dump_backtrace + 0x0/0x12c) from [<c07724ac>]
>> (dump_stack +0x18/0x1c)
>> r6:c0043a84 r5:c0bb688 r4:c1963bc0 r3:00000000
>> [<c0772494>] (dump_stack + 0x0/0x1c) from [<c00f6dd4>] (bad_page + 0xbc/0x13c)
>> [<c00fbd18>] (bad_page + 0x0/0x13c) from [<c00f74b80>]
>> (get_page_from_freelist + 0x4cc/0xb6c)
>> r7:c1963bd8 r6:c0043194 r5:c1963bc0 r4:00000001
>> [<c00f6fec>] (get_page_from_freelist +0x0/0xb6c) from [<c00f8148>]
>> (__alloc_pages_nodemask + 0x144/0x820)
>> [<c00f8004>] (__alloc_pages_nodemask +0x0/0x820) from [<c0115250>]
>> (handle_pte_fault + 0x574/0x758)
>> [<c0114cdc>] (handle_pte_fault + 0x0/0x758) from [<c0115500>]
>> (handle_mm_fault + 0xcc/0x110)
>> [<c0115434>] (handel_mm_fault + 0x0/0x110) from [<c00521a8>]
>> (do_page_fault + 0x16c/0x1f4)
>> [<c005203c>] (do_page_fault + 0x0/0x1f4) from [<c00440d0>]
>> (do_DataAbort + 0x40/0xac)
>> [<c0044090>] (do_DataAbort + 0x0/0xac) from [<c004a064>]
>> (ret_from_exception + 0x0/0x10)
>>
>> And when the system reboot , the step2 data "123456" will alse lost.
>> You can cat the test.txt,but there is no data in the file.
>> the reason is when the inlinedata convert to extent in the limit case,
>> the inlinedata read to the page,then destory the inlinedata,next step
>> is to __block_write_begin,but it can't get block,return -ENOSPC. so
>> the data lost.
>>
>> there is a patch may fix the bug:
>> in inline.c ext4_convert_inline_data_to_extent
>>
>> needed_blocks = ext4_writepage_trans_blocks(inode);
>>
>> + if(EXT4_C2B(sbi,percpu_counter_read_positive(&sbi->s_freeclusters_counter))
>> < needed_blocks)
>> + return -ENOSPC;
>> +
>> ret = ext4_get_inode_loc(inode, &iloc);
>> if (ret)
>> return ret;
>> --
>> 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 related [flat|nested] 6+ messages in thread
* Re: there is a BUG in disk full case in inlinedata feature.
2013-08-28 1:04 ` Tao Ma
2013-08-29 15:15 ` Boxi Liu
@ 2013-10-21 16:22 ` Boxi Liu
2013-10-21 17:48 ` Darrick J. Wong
2013-10-22 2:00 ` Tao Ma
1 sibling, 2 replies; 6+ messages in thread
From: Boxi Liu @ 2013-10-21 16:22 UTC (permalink / raw)
To: Tao Ma; +Cc: linux-ext4@vger.kernel.org, Robin Dong, Theodore Tso,
lewis.liulei
[-- Attachment #1: Type: text/plain, Size: 3042 bytes --]
hi,
I make the format patch about the inline_data patch .
Is there anything incomplete?
Thanks
boxi
2013/8/28 Tao Ma <tm@tao.ma>:
> Hi Boxi,
> Thanks for the detailed explanation and the bug fix. It looks good to me.
> So would you mind send out a formal patch?
>
> Thanks,
> Tao
> On 08/28/2013 01:09 AM, Boxi Liu wrote:
>> there is a BUG in EXT4 inlinedata feature when the disk is full(0B).
>> tast case:
>> step1: use the dd to make the disk full,has 0B remained.
>> step2: touch a inlinedata file
>> echo -n "123456" >> test.txt
>> step3: make the inlinedata file test.txt convert to extent block.
>> echo -n
>> "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890">>test.txt
>> the step3 will write failed.and print the BUG Backtrace:
>> page:c1963bc0 count:-1 mapcount:0 mapping: (null) index:0x0
>> page flags:0x40000000()
>> Backtrace:
>> [<c004e180>] (dump_backtrace + 0x0/0x12c) from [<c07724ac>]
>> (dump_stack +0x18/0x1c)
>> r6:c0043a84 r5:c0bb688 r4:c1963bc0 r3:00000000
>> [<c0772494>] (dump_stack + 0x0/0x1c) from [<c00f6dd4>] (bad_page + 0xbc/0x13c)
>> [<c00fbd18>] (bad_page + 0x0/0x13c) from [<c00f74b80>]
>> (get_page_from_freelist + 0x4cc/0xb6c)
>> r7:c1963bd8 r6:c0043194 r5:c1963bc0 r4:00000001
>> [<c00f6fec>] (get_page_from_freelist +0x0/0xb6c) from [<c00f8148>]
>> (__alloc_pages_nodemask + 0x144/0x820)
>> [<c00f8004>] (__alloc_pages_nodemask +0x0/0x820) from [<c0115250>]
>> (handle_pte_fault + 0x574/0x758)
>> [<c0114cdc>] (handle_pte_fault + 0x0/0x758) from [<c0115500>]
>> (handle_mm_fault + 0xcc/0x110)
>> [<c0115434>] (handel_mm_fault + 0x0/0x110) from [<c00521a8>]
>> (do_page_fault + 0x16c/0x1f4)
>> [<c005203c>] (do_page_fault + 0x0/0x1f4) from [<c00440d0>]
>> (do_DataAbort + 0x40/0xac)
>> [<c0044090>] (do_DataAbort + 0x0/0xac) from [<c004a064>]
>> (ret_from_exception + 0x0/0x10)
>>
>> And when the system reboot , the step2 data "123456" will alse lost.
>> You can cat the test.txt,but there is no data in the file.
>> the reason is when the inlinedata convert to extent in the limit case,
>> the inlinedata read to the page,then destory the inlinedata,next step
>> is to __block_write_begin,but it can't get block,return -ENOSPC. so
>> the data lost.
>>
>> there is a patch may fix the bug:
>> in inline.c ext4_convert_inline_data_to_extent
>>
>> needed_blocks = ext4_writepage_trans_blocks(inode);
>>
>> + if(EXT4_C2B(sbi,percpu_counter_read_positive(&sbi->s_freeclusters_counter))
>> < needed_blocks)
>> + return -ENOSPC;
>> +
>> ret = ext4_get_inode_loc(inode, &iloc);
>> if (ret)
>> return ret;
>> --
>> 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
>>
>
[-- Attachment #2: 0001-ext4-fix-an-ext4-inline_data-feature-file-bug.patch --]
[-- Type: application/octet-stream, Size: 1220 bytes --]
From f4194a85f0d4d221d2aa49555d90036895605de5 Mon Sep 17 00:00:00 2001
From: BoxiLiu <lewis.liulei@huawei.com>
Date: Tue, 22 Oct 2013 00:02:01 +0800
Subject: [PATCH] ext4:fix an ext4 inline_data feature file bug
when the space is full and the file will expend
to the block,forbid alloc the block to the
inline_data feature file,keep the file original.
Signed-off-by: LeiLiu <lewis.liulei@huawei.com>
---
fs/ext4/inline.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
index c3efb65..be1b6ca 100644
--- a/fs/ext4/inline.c
+++ b/fs/ext4/inline.c
@@ -529,6 +529,7 @@ static int ext4_convert_inline_data_to_extent(struct address_space *mapping,
struct page *page = NULL;
unsigned from, to;
struct ext4_iloc iloc;
+ struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
if (!ext4_has_inline_data(inode)) {
/*
@@ -541,6 +542,9 @@ static int ext4_convert_inline_data_to_extent(struct address_space *mapping,
needed_blocks = ext4_writepage_trans_blocks(inode);
+ if(EXT4_C2B(sbi,percpu_counter_read_positive(&sbi->s_freeclusters_counter)) < needed_blocks)
+ return -ENOSPC;
+
ret = ext4_get_inode_loc(inode, &iloc);
if (ret)
return ret;
--
1.8.1.msysgit.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: there is a BUG in disk full case in inlinedata feature.
2013-10-21 16:22 ` Boxi Liu
@ 2013-10-21 17:48 ` Darrick J. Wong
2013-10-22 2:00 ` Tao Ma
1 sibling, 0 replies; 6+ messages in thread
From: Darrick J. Wong @ 2013-10-21 17:48 UTC (permalink / raw)
To: Boxi Liu
Cc: Tao Ma, linux-ext4@vger.kernel.org, Robin Dong, Theodore Tso,
lewis.liulei
On Tue, Oct 22, 2013 at 12:22:34AM +0800, Boxi Liu wrote:
> hi,
> I make the format patch about the inline_data patch .
> Is there anything incomplete?
Please run scripts/checkpatch.pl on that patch and fix the errors it finds (no
signed-off-by, indentation problems, no changelog, probably more...)
--D
>
> Thanks
> boxi
>
> 2013/8/28 Tao Ma <tm@tao.ma>:
> > Hi Boxi,
> > Thanks for the detailed explanation and the bug fix. It looks good to me.
> > So would you mind send out a formal patch?
> >
> > Thanks,
> > Tao
> > On 08/28/2013 01:09 AM, Boxi Liu wrote:
> >> there is a BUG in EXT4 inlinedata feature when the disk is full(0B).
> >> tast case:
> >> step1: use the dd to make the disk full,has 0B remained.
> >> step2: touch a inlinedata file
> >> echo -n "123456" >> test.txt
> >> step3: make the inlinedata file test.txt convert to extent block.
> >> echo -n
> >> "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890">>test.txt
> >> the step3 will write failed.and print the BUG Backtrace:
> >> page:c1963bc0 count:-1 mapcount:0 mapping: (null) index:0x0
> >> page flags:0x40000000()
> >> Backtrace:
> >> [<c004e180>] (dump_backtrace + 0x0/0x12c) from [<c07724ac>]
> >> (dump_stack +0x18/0x1c)
> >> r6:c0043a84 r5:c0bb688 r4:c1963bc0 r3:00000000
> >> [<c0772494>] (dump_stack + 0x0/0x1c) from [<c00f6dd4>] (bad_page + 0xbc/0x13c)
> >> [<c00fbd18>] (bad_page + 0x0/0x13c) from [<c00f74b80>]
> >> (get_page_from_freelist + 0x4cc/0xb6c)
> >> r7:c1963bd8 r6:c0043194 r5:c1963bc0 r4:00000001
> >> [<c00f6fec>] (get_page_from_freelist +0x0/0xb6c) from [<c00f8148>]
> >> (__alloc_pages_nodemask + 0x144/0x820)
> >> [<c00f8004>] (__alloc_pages_nodemask +0x0/0x820) from [<c0115250>]
> >> (handle_pte_fault + 0x574/0x758)
> >> [<c0114cdc>] (handle_pte_fault + 0x0/0x758) from [<c0115500>]
> >> (handle_mm_fault + 0xcc/0x110)
> >> [<c0115434>] (handel_mm_fault + 0x0/0x110) from [<c00521a8>]
> >> (do_page_fault + 0x16c/0x1f4)
> >> [<c005203c>] (do_page_fault + 0x0/0x1f4) from [<c00440d0>]
> >> (do_DataAbort + 0x40/0xac)
> >> [<c0044090>] (do_DataAbort + 0x0/0xac) from [<c004a064>]
> >> (ret_from_exception + 0x0/0x10)
> >>
> >> And when the system reboot , the step2 data "123456" will alse lost.
> >> You can cat the test.txt,but there is no data in the file.
> >> the reason is when the inlinedata convert to extent in the limit case,
> >> the inlinedata read to the page,then destory the inlinedata,next step
> >> is to __block_write_begin,but it can't get block,return -ENOSPC. so
> >> the data lost.
> >>
> >> there is a patch may fix the bug:
> >> in inline.c ext4_convert_inline_data_to_extent
> >>
> >> needed_blocks = ext4_writepage_trans_blocks(inode);
> >>
> >> + if(EXT4_C2B(sbi,percpu_counter_read_positive(&sbi->s_freeclusters_counter))
> >> < needed_blocks)
> >> + return -ENOSPC;
> >> +
> >> ret = ext4_get_inode_loc(inode, &iloc);
> >> if (ret)
> >> return ret;
> >> --
> >> 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
> >>
> >
--
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] 6+ messages in thread
* Re: there is a BUG in disk full case in inlinedata feature.
2013-10-21 16:22 ` Boxi Liu
2013-10-21 17:48 ` Darrick J. Wong
@ 2013-10-22 2:00 ` Tao Ma
1 sibling, 0 replies; 6+ messages in thread
From: Tao Ma @ 2013-10-22 2:00 UTC (permalink / raw)
To: Boxi Liu; +Cc: linux-ext4@vger.kernel.org, Robin Dong, Theodore Tso,
lewis.liulei
Hi Boxi,
On 10/22/2013 12:22 AM, Boxi Liu wrote:
> hi,
> I make the format patch about the inline_data patch .
> Is there anything incomplete?
Please do as what Darrick has said. You need to run
scripts/checkpatch.pl to check these format issues.
btw, as I have already acked your change, you can add this line above
your Signed-off-by.
Acked-by: Tao Ma <boyu.mt@taobao.com>
Thanks,
Tao
>
> Thanks
> boxi
>
> 2013/8/28 Tao Ma <tm@tao.ma>:
>> Hi Boxi,
>> Thanks for the detailed explanation and the bug fix. It looks good to me.
>> So would you mind send out a formal patch?
>>
>> Thanks,
>> Tao
>> On 08/28/2013 01:09 AM, Boxi Liu wrote:
>>> there is a BUG in EXT4 inlinedata feature when the disk is full(0B).
>>> tast case:
>>> step1: use the dd to make the disk full,has 0B remained.
>>> step2: touch a inlinedata file
>>> echo -n "123456" >> test.txt
>>> step3: make the inlinedata file test.txt convert to extent block.
>>> echo -n
>>> "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890">>test.txt
>>> the step3 will write failed.and print the BUG Backtrace:
>>> page:c1963bc0 count:-1 mapcount:0 mapping: (null) index:0x0
>>> page flags:0x40000000()
>>> Backtrace:
>>> [<c004e180>] (dump_backtrace + 0x0/0x12c) from [<c07724ac>]
>>> (dump_stack +0x18/0x1c)
>>> r6:c0043a84 r5:c0bb688 r4:c1963bc0 r3:00000000
>>> [<c0772494>] (dump_stack + 0x0/0x1c) from [<c00f6dd4>] (bad_page + 0xbc/0x13c)
>>> [<c00fbd18>] (bad_page + 0x0/0x13c) from [<c00f74b80>]
>>> (get_page_from_freelist + 0x4cc/0xb6c)
>>> r7:c1963bd8 r6:c0043194 r5:c1963bc0 r4:00000001
>>> [<c00f6fec>] (get_page_from_freelist +0x0/0xb6c) from [<c00f8148>]
>>> (__alloc_pages_nodemask + 0x144/0x820)
>>> [<c00f8004>] (__alloc_pages_nodemask +0x0/0x820) from [<c0115250>]
>>> (handle_pte_fault + 0x574/0x758)
>>> [<c0114cdc>] (handle_pte_fault + 0x0/0x758) from [<c0115500>]
>>> (handle_mm_fault + 0xcc/0x110)
>>> [<c0115434>] (handel_mm_fault + 0x0/0x110) from [<c00521a8>]
>>> (do_page_fault + 0x16c/0x1f4)
>>> [<c005203c>] (do_page_fault + 0x0/0x1f4) from [<c00440d0>]
>>> (do_DataAbort + 0x40/0xac)
>>> [<c0044090>] (do_DataAbort + 0x0/0xac) from [<c004a064>]
>>> (ret_from_exception + 0x0/0x10)
>>>
>>> And when the system reboot , the step2 data "123456" will alse lost.
>>> You can cat the test.txt,but there is no data in the file.
>>> the reason is when the inlinedata convert to extent in the limit case,
>>> the inlinedata read to the page,then destory the inlinedata,next step
>>> is to __block_write_begin,but it can't get block,return -ENOSPC. so
>>> the data lost.
>>>
>>> there is a patch may fix the bug:
>>> in inline.c ext4_convert_inline_data_to_extent
>>>
>>> needed_blocks = ext4_writepage_trans_blocks(inode);
>>>
>>> + if(EXT4_C2B(sbi,percpu_counter_read_positive(&sbi->s_freeclusters_counter))
>>> < needed_blocks)
>>> + return -ENOSPC;
>>> +
>>> ret = ext4_get_inode_loc(inode, &iloc);
>>> if (ret)
>>> return ret;
>>> --
>>> 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
>>>
>>
--
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] 6+ messages in thread
end of thread, other threads:[~2013-10-22 2:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-27 17:09 there is a BUG in disk full case in inlinedata feature Boxi Liu
2013-08-28 1:04 ` Tao Ma
2013-08-29 15:15 ` Boxi Liu
2013-10-21 16:22 ` Boxi Liu
2013-10-21 17:48 ` Darrick J. Wong
2013-10-22 2:00 ` Tao Ma
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).