Re: parent transid verify failed / ERROR: could not setup extent tree

2021-03-21 Thread Dave T
On Sun, Mar 21, 2021 at 2:03 PM Chris Murphy wrote: > > On Sat, Mar 20, 2021 at 11:54 PM Dave T wrote: > > > > # btrfs check -r 2853787942912 /dev/mapper/xyz > > Opening filesystem to check... > > parent transid verify failed on 2853787942912 wanted 29436 found 29433 > > parent transid verify fai

Re: [RFC] btrfs: Allow read-only mount with corrupted extent tree

2021-03-21 Thread Zygo Blaxell
On Mon, Mar 22, 2021 at 05:13:13AM +0200, Dāvis Mosāns wrote: > pirmd., 2021. g. 22. marts, plkst. 02:25 — lietotājs Qu Wenruo > () rakstīja: > > > > > > > > On 2021/3/22 上午5:54, Dāvis Mosāns wrote: > > > sestd., 2021. g. 20. marts, plkst. 02:34 — lietotājs Qu Wenruo > > > () rakstīja: > > >> > > >

Re: [RFC] btrfs: Allow read-only mount with corrupted extent tree

2021-03-21 Thread Dāvis Mosāns
pirmd., 2021. g. 22. marts, plkst. 02:25 — lietotājs Qu Wenruo () rakstīja: > > > > On 2021/3/22 上午5:54, Dāvis Mosāns wrote: > > sestd., 2021. g. 20. marts, plkst. 02:34 — lietotājs Qu Wenruo > > () rakstīja: > >> > >> > >> > >> On 2021/3/19 下午11:34, Dāvis Mosāns wrote: > >>> ceturtd., 2021. g. 18.

[PATCH] btrfs-progs: For btrfs-map-logical proceed even with some extent corruption

2021-03-21 Thread Dāvis Mosāns
If extent tree is corrupted then open_ctree without OPEN_CTREE_NO_BLOCK_GROUPS does fail preventing use of btrfs-map-logical at all. Also even if we can't find extent it still can be useful to get physical offset which could be correct. Signed-off-by: Dāvis Mosāns --- btrfs-map-logical.c | 7 +++

[PATCH] btrfs-progs: btrfs-map-logical fix case when extent isn't found

2021-03-21 Thread Dāvis Mosāns
Given extents: [21057146519552,21057146535936) [21057146552320,21057146568704) and trying to map 21057146535936 we would find 21057146519552 which would give us extent with length of 0 because > real_logical = max(logical, cur_logical); // logical (21057146535936) > real_len = min(logical + bytes

Re: Simple question for comment in btrfs-progs qgroup code

2021-03-21 Thread Qu Wenruo
On 2021/3/21 下午7:33, Sidong Yang wrote: Hello! I see an comment in qgroup cmds below. diff --git a/cmds/qgroup.c b/cmds/qgroup.c index 2da83ffd..a71089e9 100644 --- a/cmds/qgroup.c +++ b/cmds/qgroup.c @@ -84,6 +84,7 @@ static int _cmd_qgroup_assign(const struct cmd_struct *cmd, int assign,

Re: [RFC] btrfs: Allow read-only mount with corrupted extent tree

2021-03-21 Thread Qu Wenruo
On 2021/3/22 上午5:54, Dāvis Mosāns wrote: sestd., 2021. g. 20. marts, plkst. 02:34 — lietotājs Qu Wenruo () rakstīja: On 2021/3/19 下午11:34, Dāvis Mosāns wrote: ceturtd., 2021. g. 18. marts, plkst. 01:49 — lietotājs Qu Wenruo () rakstīja: On 2021/3/18 上午5:03, Dāvis Mosāns wrote: trešd.

Re: [RFC] btrfs: Allow read-only mount with corrupted extent tree

2021-03-21 Thread Dāvis Mosāns
sestd., 2021. g. 20. marts, plkst. 02:34 — lietotājs Qu Wenruo () rakstīja: > > > > On 2021/3/19 下午11:34, Dāvis Mosāns wrote: > > ceturtd., 2021. g. 18. marts, plkst. 01:49 — lietotājs Qu Wenruo > > () rakstīja: > >> > >> > >> > >> On 2021/3/18 上午5:03, Dāvis Mosāns wrote: > >>> trešd., 2021. g. 17.

[PATCH] btrfs: Allow read-only mount with corrupted extent tree

2021-03-21 Thread Dāvis Mosāns
Currently if there's any corruption at all in extent tree (eg. even single bit) then mounting will fail with: "failed to read block groups: -5" (-EIO) It happens because we immediately abort on first error when searching in extent tree for block groups. Now with this patch if `ignorebadroots` opti

[PATCH] btrfs: Use readahead_batch_length

2021-03-21 Thread Matthew Wilcox (Oracle)
Implement readahead_batch_length() to determine the number of bytes in the current batch of readahead pages and use it in btrfs. Signed-off-by: Matthew Wilcox (Oracle) --- fs/btrfs/extent_io.c| 6 ++ include/linux/pagemap.h | 9 + 2 files changed, 11 insertions(+), 4 deletions(-)

Re: parent transid verify failed / ERROR: could not setup extent tree

2021-03-21 Thread Chris Murphy
On Sat, Mar 20, 2021 at 11:54 PM Dave T wrote: > > # btrfs check -r 2853787942912 /dev/mapper/xyz > Opening filesystem to check... > parent transid verify failed on 2853787942912 wanted 29436 found 29433 > parent transid verify failed on 2853787942912 wanted 29436 found 29433 > parent transid veri

Re: [PATCH] btrfs/232: fix umount failure due to fsstress still running

2021-03-21 Thread Eryu Guan
On Thu, Mar 18, 2021 at 11:48:15AM +, fdman...@kernel.org wrote: > From: Filipe Manana > > We start a process that runs fsstress, then kill the process, wait for it > to die and then end the test, where we attempt to unmount the fs which > often fails because the fsstress subcommand started b

Simple question for comment in btrfs-progs qgroup code

2021-03-21 Thread Sidong Yang
Hello! I see an comment in qgroup cmds below. diff --git a/cmds/qgroup.c b/cmds/qgroup.c index 2da83ffd..a71089e9 100644 --- a/cmds/qgroup.c +++ b/cmds/qgroup.c @@ -84,6 +84,7 @@ static int _cmd_qgroup_assign(const struct cmd_struct *cmd, int assign, /* * FIXME src should accept s