Re: [PATCH v2 2/6] btrfs-progs: check/common: Introduce a function to find imode using INODE_REF

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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
> 
> 



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux