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

--
Linux-cachefs mailing list
Linux-cachefs@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/linux-cachefs




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]
  Powered by Linux