Re: [PATCH v3 1/2] fscache,cachefiles: add prepare_ondemand_read() callback

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

 



Hi Jeff,

Thanks for the comment!

On 11/16/22 7:58 PM, Jeff Layton wrote:

>>  
>> -/*
>> - * Prepare a read operation, shortening it to a cached/uncached
>> - * boundary as appropriate.
>> - */
>> -static enum netfs_io_source cachefiles_prepare_read(struct netfs_io_subrequest *subreq,
>> -						      loff_t i_size)
>> +static enum netfs_io_source cachefiles_do_prepare_read(struct netfs_cache_resources *cres,
>> +					loff_t *_start, size_t *_len,
>> +					unsigned long *_flags, loff_t i_size)
> 
> _start is never changed, so it should be passed by value instead of by
> pointer. 

Yeah, start is indeed unchanged, and I think it's also reasonable to
pass it by value rather than by pointer.


> I'd also reverse the position of the arguments for _flags and
> i_size.  Otherwise, the CPU/compiler have to shuffle things around more
> in cachefiles_prepare_ondemand_read before they call this.

Yeah I didn't notice the details.


I will fix the above two issues in a quick v4 version.

Many thanks for the feedback.



-- 
Thanks,
Jingbo



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux