On 9.09.19 г. 17:26 ч., Qu Wenruo wrote: > > > On 2019/9/9 下午9:42, Nikolay Borisov wrote: >> >> >> On 5.09.19 г. 10:57 ч., Qu Wenruo wrote: >>> Introduce a function, find_file_type(), to find filetype using >>> INODE_REF. >> >> This is confusing, there is not a single reference to INODE_REF in the >> code. I guess you must replace this with DIR_ITEM/DIR_INDEX ? > > Don't forget how you get the @dirid @index,@name,@namelen from. > > All these info are from INODE_REF item. > > But I totally understand your concern, it's sometimes really easy to get > confused about 1) what we are searching for 2) what the search indexes > are from. Yes but that is only apparent when one reads the next patch. When you take this function in isolation it really gets input data and based on that tries to search for relevant DIR_ITEM/DIR_INDEX. Think about someone stumbling on this commit 6 months from now, without necessarily having reviewed the whole series. > > Thanks, > Qu > >
- [PATCH v2 0/6] btrfs-progs: check: Repair invalid inode mo... Qu Wenruo
- [PATCH v2 2/6] btrfs-progs: check/common: Introduce a... Qu Wenruo
- Re: [PATCH v2 2/6] btrfs-progs: check/common: Int... Nikolay Borisov
- Re: [PATCH v2 2/6] btrfs-progs: check/common:... Qu Wenruo
- Re: [PATCH v2 2/6] btrfs-progs: check/com... Nikolay Borisov
- Re: [PATCH v2 2/6] btrfs-progs: check/common: Int... Nikolay Borisov
- Re: [PATCH v2 2/6] btrfs-progs: check/common:... Qu Wenruo
- Re: [PATCH v2 2/6] btrfs-progs: check/com... Nikolay Borisov
- [PATCH v2 1/6] btrfs-progs: check: Export btrfs_type_... Qu Wenruo
- [PATCH v2 5/6] btrfs-progs: check/original: Fix inode... Qu Wenruo
- [PATCH v2 6/6] btrfs-progs: tests/fsck: Add new image... Qu Wenruo
- Re: [PATCH v2 6/6] btrfs-progs: tests/fsck: Add n... Nikolay Borisov
- [PATCH v2 4/6] btrfs-progs: check/lowmem: Repair bad ... Qu Wenruo
- Re: [PATCH v2 4/6] btrfs-progs: check/lowmem: Rep... Nikolay Borisov
- [PATCH v2 3/6] btrfs-progs: check/common: Make repair... Qu Wenruo
- Re: [PATCH v2 3/6] btrfs-progs: check/common: Mak... Nikolay Borisov