> On Feb 27, 2021, at 09:12, Chris Murphy wrote:
>
> On Wed, Feb 24, 2021 at 9:40 PM Su Yue wrote:
>>
>>
>> While playing with seed device(misc/next and v5.11), lockdep
>> complains the following:
>>
>> To reproduce:
>>
>> dev1=/dev/sdb1
>> dev2=/dev/sdb2
>>
>> umount /mnt
>>
>> mkfs.bt
From: Su Yue
This test uses tool dmsetup so add the global prereq.
Link: https://github.com/kdave/btrfs-progs/issues/192
Signed-off-by: Su Yue
---
tests/mkfs-tests/005-long-device-name-for-ssd/test.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/mkfs-tests/005-long-device-name-for
From: Su Yue
Since the commmit 8dd3e5dc2df5
("btrfs-progs: tests: fix misc-tests/029 to run on NFS") added the
compatibility of NFS, it called run_mayfail() in the last of the test.
However, run_mayfail() always return the original code. If the test
case is not running on NFS, the last `run_mayf
From: Su Yue
As the link reported, btrfs fi sh may crash while a device is removing.
valgrind reported:
==
...
==883== Invalid write of size 8
==883==at 0x13C99A: get_device_info (in /usr/bin/btrfs)
==883==by 0x13D715: g
From: Su Yue
Move "\n" at end of the sentence to print.
Fixes: 281eec7a9ddf ("btrfs-progs: check: repair inode nbytes in lowmem mode")
Signed-off-by: Su Yue
---
check/mode-lowmem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/check/mode-lowmem.c b/check/mode-lowmem.c
ind
From: Su Yue
Previously, @err are assigned immediately after check but before
repair.
repair_extent_item()'s return value also confuses the caller. If
error has been repaired and returns 0, check_extent_item() will try
to continue check the nonexistent and cause false alerts.
Here make repair_ex
From: Su Yue
For files, lowmem repair will try to check nbytes and isize,
but isize check depends nbytes.
Once bytes has been repaired, then isize should be checked and
repaired.
So move nbytes check before isize check. Also set nbytes to
extent_size once repaired successfully.
Signed-off-by: S
From: Su Yue
Since repair will do CoW, the outer path may be invalid,
add an argument path to punch_extent_hole().
When punch_extent_hole() returns, path will still point to the item
before calling punch_extent_hole();
Signed-off-by: Su Yue
---
Changelog:
v2:
Remove varaiable @ret2.
Call bt
From: Su Yue
This case contains an inode_extref:
==
...
item 1 key (257 INODE_EXTREF 3460996356) itemoff 3947 itemsize 24
index 257 parent 256 namelen 6 name: foo255
...
==
The related dir_item and
From: Su Yue
inode_extref is much similar with inode_ref, most codes are reused in
check_inode_extref().
Exception:
There is no need to check root directory, so remove it.
Make check_inode_extref() verify hash value with key offset now.
And lowmem check can detect errors about inode_extref and t
From: Su Yue
After call of check_inode_item(), path may point to the last unchecked
slot of the leaf. The outer walk_up_tree() always treats the position
as checked item then skips to next item.
If the last item was an inode item, yes, it was unchecked.
Then walk_up_tree() will think the leaf is
From: Su Yue
This patchset can be fetched from my github(based on v4.17.1):
https://github.com/Damenly/btrfs-progs/tree/lowmem_extref
The patchset aims to support check and repair errors about
inode_extref in lowmem mode.
patch[1-2] let btrfs_unlink() detect inode_extref.
patch[3] fixes a
From: Su Yue
btrfs_unlink() uses btrfs_lookup_inode_ref() to look up inode_ref
but forget inode_extref case.
Let btrfs_unlink() call btrfs_lookup_inode_extref() if inode_ref is
found and EXTENDED_IREF feature is enabled.
Fixes: 0cc75eddd093 ("btrfs-progs: Add btrfs_unlink() and btrfs_add_link()
From: Su Yue
In check_fs_roots_lowmem(), we do search and follow the resulted path
to call check_fs_root(), then call btrfs_next_item() to check next
root.
However, if repair is enabled, the root tree can be cowed, the
existed path can cause strange errors.
Solution:
If repair, save the key be
From: Su Yue
The argument index is not used in btrfs_lookup_inode_extref(),
so remove it.
And adjust positions its arguments to make it consistent with
kernel part.
No functional change.
Fixes: 260675657767 ("btrfs-progs: Import btrfs_insert/del/lookup_extref()
functions.")
Signed-off-by: Su Y
From: Su Yue
In check_dir_item, we are going to search corresponding
dir_item/index.
Commit 564901eac7a4 ("btrfs-progs: check: introduce
print_dir_item_err()") Changed argument name from key to di_key but
forgot to change the key name for dir_item search.
So @key shouldn't be used here. It shoul
From: Su Yue
inode_extref is much similar with inode_ref, most codes are reused in
check_inode_extref().
Exception:
There is no need to check root directory, so remove it.
Make check_inode_extref() verify hash value with key offset now.
And lowmem check can detect errors about inode_extref and t
From: Su Yue
After call of check_inode_item(), path may point to the last unchecked
slot of the leaf. The outer walk_up_tree() always treats the position
as checked item then skips to next item.
If the last item was an inode item, yes, it was unchecked.
Then walk_up_tree() will think the leaf is
From: Su Yue
After call of check_inode_item(), path may point to the last unchecked
slot of the leaf. The outer walk_up_tree() always treats the position
as checked item then skips to next item.
If the last item was an inode item, yes, it was unchecked.
Then walk_up_tree() will think the leaf is
From: Su Yue
This case contains an inode_extref:
==
...
item 1 key (257 INODE_EXTREF 3460996356) itemoff 3947 itemsize 24
index 257 parent 256 namelen 6 name: foo255
...
==
The related dir_item and
From: Su Yue
inode_extref is much similar with inode_ref, most codes are reused in
check_inode_extref().
Exception:
There is no need to check root directory, so remove it.
Make check_inode_extref() verify hash value with key offset now.
And lowmem check can detect errors about inode_extref and t
From: Su Yue
In check_fs_roots_lowmem(), we do search and follow the resulted path
to call check_fs_root(), then call btrfs_next_item() to check next
root.
However, if repair is enabled, the root tree can be cowed, the
existed path can cause strange errors.
Solution:
If repair, save the key be
From: Su Yue
btrfs_unlink() uses btrfs_lookup_inode_ref() to look up inode_ref
but forget inode_extref case.
Let btrfs_unlink() call btrfs_lookup_inode_extref() if inode_ref is
found and EXTENDED_IREF feature is enabled.
Fixes: 0cc75eddd093 ("btrfs-progs: Add btrfs_unlink() and btrfs_add_link()
From: Su Yue
The argument index is not used in btrfs_lookup_inode_extref(),
so remove it.
And adjust positions its arguments to make it consistent with
kernel part.
No functional change.
Fixes: 260675657767 ("btrfs-progs: Import btrfs_insert/del/lookup_extref()
functions.")
Signed-off-by: Su Y
From: Su Yue
In check_dir_item, we are going to search corresponding
dir_item/index.
Commit 564901eac7a4 ("btrfs-progs: check: introduce
print_dir_item_err()") Changed argument name from key to di_key but
forgot to change the key name for dir_item search.
So @key shouldn't be used here. It shoul
From: Su Yue
This patchset can be fetched from my github(based on v4.17.1):
https://github.com/Damenly/btrfs-progs/tree/lowmem_extref
The patchset aims to support check and repair errors about
inode_extref in lowmem mode.
patch[1-2] let btrfs_unlink() detect inode_extref.
patch[3] fixes a
From: Su Yue
Add a function init_ctx() to initialize time and count of ctx while
checking. Use it as prefn while calling task_init().
Arguments start_time and item_count of task_start() are useless,
remove them.
Signed-off-by: Su Yue
---
check/main.c | 26 ++
convert/
From: Su Yue
Previously, everytime task_start is called, arguments to be initialized
(start_time and item_count) are passed manually.
For scalability, add a member prefn() to struct task_info.
prefn() will be called before pthread_create() in task_start().
Signed-off-by: Su Yue
---
check/main
From: Su Yue
This patchset is a prepare work for further process of check.
patch[1] adds prefn() to task_info and call it before pthread_create().
patch[2] moves time and count initializations into the new init_ctx(),
assign it to prefun(). Remove arguments start_time and item_count.
Su Yue (
Sorry for the previous reply in HTML format which is not delivered to
the mail list.
I mean there is already xfstests generic/405 for the situation.
Thin provision devices need to call dmsetup to setup.
I wonder If calling dmsetup in progs tests is acceptable or not.
If it is, I will do it.
Thank
30 matches
Mail list logo