Re: [PATCH 1/2] btrfs-progs: Fix DIR_ITEM checking in lowmem

2018-03-25 Thread Qu Wenruo
On 2018年03月23日 22:48, Nikolay Borisov wrote: > When checking the validity of a DIR_ITEM item the index variable > is explicitly set to -1 so that the index check in find_inode_ref() > is ignored. This is necessary due to possible name collisions in DIR_ITEMS > (i.e multiple files with the same cr

Re: [PATCH 2/2] btrfs-progs: Add test for collision DIR_ITEM handling

2018-03-25 Thread Qu Wenruo
On 2018年03月23日 22:48, Nikolay Borisov wrote: > Verify that if we have an otherwise clean filesystem, containging collided > DIR_ITEM, btrfs check lowmem's mode can correctly handle those and not produce > any false positives. > > This if fixed by commit titled: > > "btrfs-progs: Fix DIR_ITEM

Re: [PATCH] btrfs-progs: remove BTRFS_CRC32_SIZE definition

2018-03-25 Thread Misono Tomohiro
On 2018/03/23 18:14, Qu Wenruo wrote: > > > On 2018年03月23日 16:20, Misono Tomohiro wrote: >> The kernel code no longer has BTRFS_CRC32_SIZE and only uses >> btrfs_csum_sizes[]. So, update the progs code as well. >> >> Suggested-by: Qu Wenruo >> Signed-off-by: Tomohiro Misono >> --- >> convert/c

Re: [PATCH 1/2] btrfs-progs: Fix DIR_ITEM checking in lowmem

2018-03-25 Thread Su Yue
On 03/23/2018 10:48 PM, Nikolay Borisov wrote: When checking the validity of a DIR_ITEM item the index variable is explicitly set to -1 so that the index check in find_inode_ref() is ignored. This is necessary due to possible name collisions in DIR_ITEMS (i.e multiple files with the same crc32c

Re: [PATCH] btrfs: Allow rmdir(2) to delete a subvolume

2018-03-25 Thread Misono Tomohiro
On 2018/03/23 18:09, Nikolay Borisov wrote: > > > On 23.03.2018 10:28, Misono Tomohiro wrote: >> This patch changes the behavior of rmdir(2) to allow it to delete >> an empty subvolume. >> >> In order to do that the core logic of subvolume deletion is moved from >> ioctl.c to inode.c and named a

Re: [PATCH 0/2] verify superblock checksum

2018-03-25 Thread Anand Jain
Pls ignore this set as I am including these patches in the bigger set. Thanks, Anand On 03/23/2018 08:53 PM, Anand Jain wrote: Here are the threads/context [1] in which we read the superblock(s). And this patchset will make sure the superblock csum are checked when they are read in the respe

Re: [PATCH v2] handle SB beyond blockcount mkfs.btrfs

2018-03-25 Thread Anand Jain
Pls ignore this set as I am including these patches along with other related changes. Thanks, Anand On 03/22/2018 09:01 PM, Anand Jain wrote: v2->v1: progs: update change log Adds kernel check if there is a mismatch in the FSID between primary and copy SB The kernel patch here chec

Re: [PATCH v3 0/2] Preparatory to add the csum check in the scan context

2018-03-25 Thread Anand Jain
Pls, ignore this bunch as I have included this with other cleanups. Thanks, Anand On 03/21/2018 04:14 PM, Anand Jain wrote: v2->v3: 1/2: Keep the check %(csum_type >= ARRAY_SIZE(btrfs_csum_sizes)) because it is inline to support future expansion, further btrfs-progs is alrea