lkml.org 
[lkml]   [2022]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v3 1/2] fscache,cachefiles: add prepare_ondemand_read() callback
From
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

\
 
 \ /
  Last update: 2022-11-16 13:21    [W:0.064 / U:0.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site