Normally corrupted leaf should be caught by csum check, but sometimes
corrupted item pointers (out of leaf range) can still pass csum check.
In fact, our fsck/005 test case image has such corrupted item pointer
and btrfs check can surprisingly fix it.
Anyway, make print-tree to skip such item and
Signed-off-by: Qu Wenruo
---
.../032-bad-item-ptr/bad_item_ptr.raw.xz | Bin 0 -> 21964 bytes
tests/misc-tests/032-bad-item-ptr/test.sh | 17 +
2 files changed, 17 insertions(+)
create mode 100644 tests/misc-tests/032-bad-item-ptr/bad_item_ptr.raw.xz
create mode 1007
From: Robbie Ko
[BUG]
Range clone can cause fiemap to return error result.
Like:
# mount /dev/vdb5 /mnt/btrfs
# dd if=/dev/zero bs=16K count=2 oflag=dsync of=/mnt/btrfs/file
# btrfs-debugfs -f file
(276 0): ram 16384 disk 2171609088 disk_size 16384
(276 16384): ram 16384 disk 2171625472 dis
From: Robbie Ko
This patchset intends to fix btrfs fiemap related bug.
The fiemap has the following problems:
1) fiemap: pass correct bytenr when fm_extent_count is zero
When user space wants to get the number of file extents,
set fm_extent_count to 0 to run fiemap and then read fm_mapped_ext
From: Robbie Ko
[BUG]
fm_mapped_extents is not correct when fm_extent_count is 0
Like:
# mount /dev/vdb5 /mnt/btrfs
# dd if=/dev/zero bs=16K count=4 oflag=dsync of=/mnt/btrfs/file
# xfs_io -c "fiemap -v" /mnt/btrfs/file
/mnt/btrfs/file:
EXT: FILE-OFFSET BLOCK-RANGE TOTAL
The QGROUP_RELATION item is very special, it always exists in pairs
(objectid and offset exchange). Its objectid and offset are the ids of a
pair of parent and child qgroups, respectively. The larger one is
parent and the smaller one is child. After the following commit, the order
of the parameters
On 2018年05月07日 15:46, Qu Wenruo wrote:
> Normally corrupted leaf should be caught by csum check, but sometimes
> corrupted item pointers (out of leaf range) can still pass csum check.
> In fact, our fsck/005 test case image has such corrupted item pointer
> and btrfs check can surprisingly fix it
Dear all
首先道歉一下,2018过去这么久了还没有TB过,导致我们现在相当富裕:p
So,年度TB首秀开始报名啦,这次的选择有午餐和KTV,如果KTV足够凑个包厢,下午我们就去嗨一下:)
报名地址:
http://www.stdp.css.fujitsu.com:8080/nnnce/schedules/view/360
--
Sincerely,
Cao jin
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majo
Sorry for the noise:(
On 05/07/2018 05:23 PM, Cao jin wrote:
> Dear all
>
> 首先道歉一下,2018过去这么久了还没有TB过,导致我们现在相当富裕:p
> So,年度TB首秀开始报名啦,这次的选择有午餐和KTV,如果KTV足够凑个包厢,下午我们就去嗨一下:)
>
> 报名地址:
> http://www.stdp.css.fujitsu.com:8080/nnnce/schedules/view/360
>
--
Sincerely,
Cao jin
--
To unsubscribe from thi
On 2018年05月07日 16:50, Lu Fengqi wrote:
> The QGROUP_RELATION item is very special, it always exists in pairs
> (objectid and offset exchange). Its objectid and offset are the ids of a
> pair of parent and child qgroups, respectively. The larger one is
> parent and the smaller one is child. After
Hi,
According to man btrfs [1], I assume that metadata_ratio=1 mount option should
force allocation of one metadata chunk after every allocated data chunk.
However,
when I set this option and start filling btrfs with "dd if=/dev/zero
of=dummyfile.dat",
only data chunks are allocated but no metad
On Mon, May 07, 2018 at 10:20:57AM +0800, Qu Wenruo wrote:
> >>> +++ b/undelete-subvol.c
> >>> @@ -0,0 +1,53 @@
> >>> +/*
> >>> + * Copyright (C) 2018 Fujitsu. All rights reserved.
> >>
> >> IIRC David will remove all such copy right line.
> >> Is there some principle about this, David?
> >
> > A
On 2018年05月07日 19:40, David Sterba wrote:
> On Mon, May 07, 2018 at 10:20:57AM +0800, Qu Wenruo wrote:
> +++ b/undelete-subvol.c
> @@ -0,0 +1,53 @@
> +/*
> + * Copyright (C) 2018 Fujitsu. All rights reserved.
IIRC David will remove all such copy right line.
Is ther
On 7 May 2018, at 7:40, Martin Svec wrote:
Hi,
According to man btrfs [1], I assume that metadata_ratio=1 mount
option should
force allocation of one metadata chunk after every allocated data
chunk. However,
when I set this option and start filling btrfs with "dd if=/dev/zero
of=dummyfile.da
On Fri, May 04, 2018 at 10:53:05AM +0300, Nikolay Borisov wrote:
> This function is used in only one place and devid argument is always
> passed 0. So just remove it, similarly to how it was removed in the
> userspace code.
>
> Signed-off-by: Nikolay Borisov
Reviewed-by: David Sterba
--
To unsu
On Fri, May 04, 2018 at 12:11:12PM +0100, Colin King wrote:
> From: Colin Ian King
>
> Trivial fix to spelling mistake of function name in btrfs_err message
>
> Signed-off-by: Colin Ian King
Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body
On Thu, May 03, 2018 at 09:59:02AM +0800, Qu Wenruo wrote:
> When debugging quota rescan race, some times btrfs rescan could account
> some old (committed) leaf and then re-account newly committed leaf
> in next generation.
>
> This race needs extra transid to locate, so add @transid for
> trace_b
The fs_info is always available from the context so we don't need to
store it in the structure.
Signed-off-by: David Sterba
---
fs/btrfs/ioctl.c | 3 +--
fs/btrfs/volumes.c | 7 +++
fs/btrfs/volumes.h | 5 ++---
3 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/fs/btrfs/ioctl.
Hello Chris,
Dne 7.5.2018 v 16:49 Chris Mason napsal(a):
> On 7 May 2018, at 7:40, Martin Svec wrote:
>
>> Hi,
>>
>> According to man btrfs [1], I assume that metadata_ratio=1 mount option
>> should
>> force allocation of one metadata chunk after every allocated data chunk.
>> However,
>> when I
On 7 May 2018, at 12:16, Martin Svec wrote:
Hello Chris,
Dne 7.5.2018 v 16:49 Chris Mason napsal(a):
On 7 May 2018, at 7:40, Martin Svec wrote:
Hi,
According to man btrfs [1], I assume that metadata_ratio=1 mount
option should
force allocation of one metadata chunk after every allocated
On Wed, Jan 17, 2018 at 01:17:07PM +0800, Qu Wenruo wrote:
> Sebastian reported a filesystem corruption where DIR_INDEX has wrong
> filetype against INODE_ITEM.
>
> Lowmem mode normally handles such problem by checking DIR_INDEX,
> DIR_ITEM and INODE_REF/INODE_ITEM to determine the correct file ty
On Thu, Feb 08, 2018 at 11:27:19AM +0800, Su Yue wrote:
> This patchset can be fetched from my github:
> https://github.com/Damenly/btrfs-progs/tree/lowmem
> based on unmerged patchset whose cover:
> [PATCH 0/3] btrfs-progs: Split original mode check to its own
> Author: Qu Wenruo
>
On Tue, Feb 27, 2018 at 05:12:55PM +0800, Qu Wenruo wrote:
> Log-writes tool from Josef exposed btrfs data corruption.
>
> Although still digging, at least enhance --check-data-csum option so
> that log-replay --check can stop exactly at the point where btrfs data
> get corrupted, instead of manua
On 05/07/2018 11:44 PM, David Sterba wrote:
The fs_info is always available from the context so we don't need to
store it in the structure.
Signed-off-by: David Sterba
Reviewed-by: Anand Jain
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message
On Fri, Apr 27, 2018 at 12:21:49PM +0300, Nikolay Borisov wrote:
> After investigating crashes on generic/176 it turned that the culprit in fact
> is the random failure induced by generic/019. As it happens, if on unmount
> the
> filesystem is in BTRFS_FS_STATE_ERROR then btrfs_error_commit_super
Hi,
I'm curious about btrfs, and maybe considering it for my new laptop
installation (a Lenovo T470).
I was going to install my usual lvm+ext4+full disk encryption setup, but
thought I should maybe give a try to btrfs.
Is it possible to meet all these criteria?
- operating system: debian sid
On Mon, May 07, 2018 at 07:19:32PM +0800, Qu Wenruo wrote:
>
>
>On 2018年05月07日 16:50, Lu Fengqi wrote:
>> The QGROUP_RELATION item is very special, it always exists in pairs
>> (objectid and offset exchange). Its objectid and offset are the ids of a
>> pair of parent and child qgroups, respectively
On Mon, May 7, 2018 at 2:49 PM, robbieko wrote:
> Hi,
>
> When send process requires memory allocation, shrinker may be triggered due
> to insufficient memory.
> Then evict_inode gets called when inode is dropped, and this function may
> need to start transaction.
> However, the journal_info is al
On 05/08/2018 02:17 AM, David Sterba wrote:
On Thu, Feb 08, 2018 at 11:27:19AM +0800, Su Yue wrote:
This patchset can be fetched from my github:
https://github.com/Damenly/btrfs-progs/tree/lowmem
based on unmerged patchset whose cover:
[PATCH 0/3] btrfs-progs: Split original mode check
On 2018年05月08日 10:09, Su Yue wrote:
>
>
> On 05/08/2018 02:17 AM, David Sterba wrote:
>> On Thu, Feb 08, 2018 at 11:27:19AM +0800, Su Yue wrote:
>>> This patchset can be fetched from my github:
>>> https://github.com/Damenly/btrfs-progs/tree/lowmem
>>> based on unmerged patchset whose cover:
>>
On 05/08/2018 10:06 AM, Qu Wenruo wrote:
On 2018年05月08日 10:09, Su Yue wrote:
On 05/08/2018 02:17 AM, David Sterba wrote:
On Thu, Feb 08, 2018 at 11:27:19AM +0800, Su Yue wrote:
This patchset can be fetched from my github:
https://github.com/Damenly/btrfs-progs/tree/lowmem
based on unmerg
From: Robbie Ko
At present, we check if the directory can be deleted.
We need to check whether all the files under this directory
have been processed every time we finished processing an
entry under that directory.
Example: 2,000,000 files in 1 directory.
Parent snapshot:
| dir/ (ino 257, di
On 8.05.2018 01:58, David Sterba wrote:
> On Fri, Apr 27, 2018 at 12:21:49PM +0300, Nikolay Borisov wrote:
>> After investigating crashes on generic/176 it turned that the culprit in fact
>> is the random failure induced by generic/019. As it happens, if on unmount
>> the
>> filesystem is in B
The QGROUP_RELATION item is very special, it always exists in pairs
(objectid and offset exchange). Its objectid and offset are the ids of a
pair of parent and child qgroups, respectively. The larger one is
parent and the smaller one is child. After the following commit, the order
of the parameters
Since commit aaf2dac5ef37 ("btrfs-progs: qgroup: split update_qgroup to
reduce arguments") cause qgroup show to output the wrong qgroup
parent-child relationship, in addition to fixing the problem, a test case
is needed to prevent the similar problem in the future.
Signed-off-by: Lu Fengqi
---
.
On 2018年05月08日 13:48, Lu Fengqi wrote:
> The QGROUP_RELATION item is very special, it always exists in pairs
> (objectid and offset exchange). Its objectid and offset are the ids of a
> pair of parent and child qgroups, respectively. The larger one is
> parent and the smaller one is child. After
The testcase checks the functionality of "btrfs rescue undelete-subvol",
including recovering an intact subvolume, and handling correctly
incomplete subvolume.
Signed-off-by: Lu Fengqi
---
V3.1: remove unnecessary check_prereq btrfs-image
V3:
rename testcase to 031-undelete-subvol;
rename images
On 2018年05月08日 13:48, Lu Fengqi wrote:
> Since commit aaf2dac5ef37 ("btrfs-progs: qgroup: split update_qgroup to
> reduce arguments") cause qgroup show to output the wrong qgroup
> parent-child relationship, in addition to fixing the problem, a test case
> is needed to prevent the similar problem
Nothing interesting, since such combination can be handled easily by
qgroup-verify.
Signed-off-by: Qu Wenruo
---
.../mkfs-tests/017-rootdir-with-quota/test.sh | 51 +++
1 file changed, 51 insertions(+)
create mode 100755 tests/mkfs-tests/017-rootdir-with-quota/test.sh
diff --gi
Can be fetched from github:
https://github.com/adam900710/btrfs-progs/tree/mkfs_qgroup
Which is based on v4.16 tag.
This patchset adds quota support, which means the result fs will have
quota enabled by default, and its accounting is already consistent, no
manually rescan or quota enable is neede
The original qgroup-verify integrates qgroup classification into
report_qgroups().
This behavior makes silent qgroup repair (or offline rescan) impossible.
To repair qgroup, we must call report_qgroups() to trigger bad qgroup
classification, which will output error message.
This patch moves bad q
Only test if btrfs check (which will check qgroup by default) and kernel
mount success.
Comprehensive qgroup test cases still belongs to fstests.
Signed-off-by: Qu Wenruo
---
tests/mkfs-tests/001-basic-profiles/test.sh | 10 ++
1 file changed, 10 insertions(+)
diff --git a/tests/mkfs-t
Introduce quota runtime feature for mkfs.
The result fs will has quota enabled, with consistent qgroup accounting.
This is quite handy to test quota with fstests, which doesn't support to
call ioctl for btrfs at mount time.
Signed-off-by: Qu Wenruo
---
Documentation/mkfs.btrfs.asciidoc | 7 +++
Introduce a new function, setup_quota_root(), which will create quota
root, and do an offline rescan to ensure all quota accounting numbers
are correct.
Signed-off-by: Qu Wenruo
---
mkfs/main.c | 86 +
1 file changed, 86 insertions(+)
diff --g
Just like -O|--features, introduce -R|--runtime-features to enable
features like qgroup, and maybe space cache later.
Currently only mkfs is supported, mainly for test purpose.
Convert is not supported yet.
Signed-off-by: Qu Wenruo
---
Documentation/mkfs.btrfs.asciidoc | 16 +
mkfs/main
Current kernel only supports qgroup version 1.
Make qgroup-verify to follow this standard.
Signed-off-by: Qu Wenruo
---
ctree.h | 1 +
qgroup-verify.c | 2 ++
2 files changed, 3 insertions(+)
diff --git a/ctree.h b/ctree.h
index fa861ba0b4c3..cf99df1c90a8 100644
--- a/ctree.h
+++ b/ctre
Allow repair_qgroups() to do silent repair, so it can acts as offline
qgroup rescan.
This provides the basis for later mkfs quota support.
Signed-off-by: Qu Wenruo
---
check/main.c| 2 +-
qgroup-verify.c | 19 +++
qgroup-verify.h | 2 +-
3 files changed, 13 insertions(+),
Introduce runtime_features for fsfeatures.[ch], and related functions:
btrfs_list_all_runtime_features()
btrfs_parse_runtime_features()
btrfs_process_runtime_features()
btrfs_parse_runtime_features_to_string()
And rename one function to avoid confusion:
btrfs_parse_features_to_string() -> btrfs_pa
In fact qgroup-verify is just kind of offline qgroup rescan, and later
mkfs qgroup support will reuse it.
So qgroup-verify doesn't really need to rely the global variable @repair
to check if it should repair qgroups.
Instead check fs_info->readonly to do the repair.
Signed-off-by: Qu Wenruo
---
Introduce a new function, btrfs_create_tree(), to create an empty tree.
Currently, there is only one caller to create new tree, namely
data reloc tree in mkfs.
However it's copying fs tree to create a new root.
This copy fs tree method is not a good idea if we only need an empty
tree.
So here in
Introduce a new function, insert_qgroup_items(), to insert qgroup info
item and qgroup limit item for later mkfs qgroup support.
Signed-off-by: Qu Wenruo
---
mkfs/main.c | 34 ++
1 file changed, 34 insertions(+)
diff --git a/mkfs/main.c b/mkfs/main.c
index b65b18
51 matches
Mail list logo