[PATCH 0/2] btrfs-progs: check: Handle drop_progress correctly for deleted subvolume

2016-10-13 Thread ethanwu
relocation tree of the deleted subvolume as well. ethanwu (2): btrfs-progs: check: skip keys prior to drop key in deleted subvolume correctly btrfs-progs: check: add drop key to relocation tree cmds-check.c | 66 1 file changed, 62

[PATCH 2/2] btrfs-progs: check: add drop key to relocation tree

2016-10-13 Thread ethanwu
freed and being used again. This cause btrfs check to report false alarm. Fix this by adding drop_key for deleted subvolume to its corresponding relocation tree. Signed-off-by: ethanwu --- cmds-check.c | 52 +++- 1 file changed, 51 insertions(

[PATCH 1/2] btrfs-progs: check: skip keys prior to drop key in deleted subvolume correctly

2016-10-13 Thread ethanwu
7;s descendant, so this node needs to be processed. By combinging the above conditions altogether, we only needs to skip condition 1 and condition 3.2. condition 3.1 implies next_key > this_key >= drop_key -> next_key > drop_key, so we get the result conditions. Signed-off-by: ethanw

[PATCH] btrfs: Take trans lock before access running trans in check_delayed_ref

2018-04-27 Thread ethanwu
e use_count. Signed-off-by: ethanwu --- fs/btrfs/extent-tree.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index c1618ab..c8fd37b 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -3149,7 +3149,11 @@ static n

[PATCH] btrfs: Take trans lock before access running trans in check_delayed_ref

2018-04-29 Thread ethanwu
nt. Signed-off-by: ethanwu --- V2: Use refcount_inc rather than aomitc_inc to increase use_count fs/btrfs/extent-tree.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index c1618ab..7c302ed 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/b

[PATCH] btrfs: Take trans lock before access running trans in check_delayed_ref

2018-05-01 Thread ethanwu
committing and free the transaction structure Fix this by using trans_lock and increasing the use_count. Fixes: e4c3b2dcd144 ("Btrfs: kill trans in run_delalloc_nocow and btrfs_cross_ref_exist") Signed-off-by: ethanwu Reviewed-by: Liu Bo --- V2: Use refcount_inc rather than a

[PATCH v2] btrfs: test if rename handles dir item collision correctly

2020-12-14 Thread ethanwu
ystem is forced readonly. Signed-off-by: ethanwu --- v2: - Add a python script to generate the forged name at run-time rather than from hardcoded names - Fix , Btrfs->btrfs, and typo mentioned in v1 src/btrfs_crc32c_forged_name.py | 92 + tests/btrfs/228

[PATCH] Btrfs: correctly caculate item size used when item key collision happends

2018-08-14 Thread ethanwu
inode ref index 506 namelen 26 name: abcdefghijklmnopqrstuv0003 ... inode ref index 953 namelen 26 name: abcdefghijklmnopqrstuv0450 inode ref index 452 namelen 26 name: abcdefghijklmnopqrstuv0451 Signed-off-by: ethanwu --- fs/btrfs/ctree.c | 15 +-- fs/btrfs/

[PATCH v2] Btrfs: correctly calculate item size used when item key collision happends

2018-08-15 Thread ethanwu
adjust all callers of btrfs_search_slot that intentionally pass ins_len without btrfs_item size to add size of btrfs_item from now. Fixes: 878f2d2cb355 Btrfs: fix max dir item size calculation Signed-off-by: ethanwu --- v2: modify change log, add call trace and way to reproduce it fs/btrfs/