* [PATCH 0/5] btrfs-progs: Bad extent item generation related bug fixes
@ 2019-12-31 7:17 Qu Wenruo
0 siblings, 0 replies; 4+ messages in thread
From: Qu Wenruo @ 2019-12-31 7:17 UTC (permalink / raw)
To: linux-btrfs
There is an issue reported in github, where an fs get corrupted
extent tree initialy, then I recommended --init-extent-tree.
Although --init-extent-tree indeed fixed the original problem, it caused
new problems, quite a lot of EXTENT_ITEMs now get bad generation number,
which failed to mount with v5.4.
The problem turns out to be a bug in backref repair code, which doesn't
initialize extent_record::generation, causing garbage in EXTENT_ITEMs.
This patch will:
- Fix the problem
Patch 1
- Enhance EXTENT_ITEM generation repair
Patch 2
- Make `btrfs check` able to detect such bad generation
Patch 3~4
- Add new test case for above ability
Patch 5
Qu Wenruo (5):
btrfs-progs: check: Initialize extent_record::generation member
btrfs-progs: check: Populate extent generation correctly for data
extents
btrfs-progs: check/lowmem: Detect invalid EXTENT_ITEM and EXTENT_DATA
generation
btrfs-progs: check/original: Detect invalid extent generation
btrfs-progs: fsck-tests: Make sure btrfs check can detect bad extent
item generation
check/main.c | 36 ++++++++++++++----
check/mode-lowmem.c | 19 +++++++++
.../bad_extent_item_gen.img.xz | Bin 0 -> 1916 bytes
.../test.sh | 19 +++++++++
4 files changed, 67 insertions(+), 7 deletions(-)
create mode 100644 tests/fsck-tests/044-invalid-extent-item-generation/bad_extent_item_gen.img.xz
create mode 100755 tests/fsck-tests/044-invalid-extent-item-generation/test.sh
--
2.24.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 0/5] btrfs-progs: Bad extent item generation related bug fixes
2019-12-31 7:12 Qu Wenruo
2019-12-31 8:05 ` Su Yue
@ 2020-01-02 18:36 ` David Sterba
1 sibling, 0 replies; 4+ messages in thread
From: David Sterba @ 2020-01-02 18:36 UTC (permalink / raw)
To: Qu Wenruo; +Cc: linux-btrfs
On Tue, Dec 31, 2019 at 03:12:15PM +0800, Qu Wenruo wrote:
> There is an issue reported in github, where an fs get corrupted
> extent tree initialy, then I recommended --init-extent-tree.
>
> Although --init-extent-tree indeed fixed the original problem, it caused
> new problems, quite a lot of EXTENT_ITEMs now get bad generation number,
> which failed to mount with v5.4.
>
> The problem turns out to be a bug in backref repair code, which doesn't
> initialize extent_record::generation, causing garbage in EXTENT_ITEMs.
>
> This patch will:
> - Fix the problem
> Patch 1
>
> - Enhance EXTENT_ITEM generation repair
> Patch 2
>
> - Make `btrfs check` able to detect such bad generation
> Patch 3~4
>
> - Add new test case for above ability
> Patch 5
>
> Qu Wenruo (5):
> btrfs-progs: check: Initialize extent_record::generation member
> btrfs-progs: check: Populate extent generation correctly for data
> extents
> btrfs-progs: check/lowmem: Detect invalid EXTENT_ITEM and EXTENT_DATA
> generation
> btrfs-progs: check/original: Detect invalid extent generation
> btrfs-progs: fsck-tests: Make sure btrfs check can detect bad extent
> item generation
Thanks for the fixes, added to devel.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 0/5] btrfs-progs: Bad extent item generation related bug fixes
2019-12-31 7:12 Qu Wenruo
@ 2019-12-31 8:05 ` Su Yue
2020-01-02 18:36 ` David Sterba
1 sibling, 0 replies; 4+ messages in thread
From: Su Yue @ 2019-12-31 8:05 UTC (permalink / raw)
To: Qu Wenruo, linux-btrfs
On 2019/12/31 3:12 PM, Qu Wenruo wrote:
> There is an issue reported in github, where an fs get corrupted
> extent tree initialy, then I recommended --init-extent-tree.
>
> Although --init-extent-tree indeed fixed the original problem, it caused
> new problems, quite a lot of EXTENT_ITEMs now get bad generation number,
> which failed to mount with v5.4.
>
> The problem turns out to be a bug in backref repair code, which doesn't
> initialize extent_record::generation, causing garbage in EXTENT_ITEMs.
>
> This patch will:
> - Fix the problem
> Patch 1
>
> - Enhance EXTENT_ITEM generation repair
> Patch 2
>
> - Make `btrfs check` able to detect such bad generation
> Patch 3~4
>
> - Add new test case for above ability
> Patch 5
>
> Qu Wenruo (5):
> btrfs-progs: check: Initialize extent_record::generation member
> btrfs-progs: check: Populate extent generation correctly for data
> extents
> btrfs-progs: check/lowmem: Detect invalid EXTENT_ITEM and EXTENT_DATA
> generation
> btrfs-progs: check/original: Detect invalid extent generation
> btrfs-progs: fsck-tests: Make sure btrfs check can detect bad extent
> item generation
>
Nice fixes.
Reviewed-by: Su Yue <Damenly_Su@gmx.com>
> check/main.c | 36 ++++++++++++++----
> check/mode-lowmem.c | 19 +++++++++
> .../bad_extent_item_gen.img.xz | Bin 0 -> 1916 bytes
> .../test.sh | 19 +++++++++
> 4 files changed, 67 insertions(+), 7 deletions(-)
> create mode 100644 tests/fsck-tests/044-invalid-extent-item-generation/bad_extent_item_gen.img.xz
> create mode 100755 tests/fsck-tests/044-invalid-extent-item-generation/test.sh
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 0/5] btrfs-progs: Bad extent item generation related bug fixes
@ 2019-12-31 7:12 Qu Wenruo
2019-12-31 8:05 ` Su Yue
2020-01-02 18:36 ` David Sterba
0 siblings, 2 replies; 4+ messages in thread
From: Qu Wenruo @ 2019-12-31 7:12 UTC (permalink / raw)
To: linux-btrfs
There is an issue reported in github, where an fs get corrupted
extent tree initialy, then I recommended --init-extent-tree.
Although --init-extent-tree indeed fixed the original problem, it caused
new problems, quite a lot of EXTENT_ITEMs now get bad generation number,
which failed to mount with v5.4.
The problem turns out to be a bug in backref repair code, which doesn't
initialize extent_record::generation, causing garbage in EXTENT_ITEMs.
This patch will:
- Fix the problem
Patch 1
- Enhance EXTENT_ITEM generation repair
Patch 2
- Make `btrfs check` able to detect such bad generation
Patch 3~4
- Add new test case for above ability
Patch 5
Qu Wenruo (5):
btrfs-progs: check: Initialize extent_record::generation member
btrfs-progs: check: Populate extent generation correctly for data
extents
btrfs-progs: check/lowmem: Detect invalid EXTENT_ITEM and EXTENT_DATA
generation
btrfs-progs: check/original: Detect invalid extent generation
btrfs-progs: fsck-tests: Make sure btrfs check can detect bad extent
item generation
check/main.c | 36 ++++++++++++++----
check/mode-lowmem.c | 19 +++++++++
.../bad_extent_item_gen.img.xz | Bin 0 -> 1916 bytes
.../test.sh | 19 +++++++++
4 files changed, 67 insertions(+), 7 deletions(-)
create mode 100644 tests/fsck-tests/044-invalid-extent-item-generation/bad_extent_item_gen.img.xz
create mode 100755 tests/fsck-tests/044-invalid-extent-item-generation/test.sh
--
2.24.1
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-01-02 18:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-31 7:17 [PATCH 0/5] btrfs-progs: Bad extent item generation related bug fixes Qu Wenruo
-- strict thread matches above, loose matches on Subject: below --
2019-12-31 7:12 Qu Wenruo
2019-12-31 8:05 ` Su Yue
2020-01-02 18:36 ` David Sterba
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).