[Virtio-fs] [PATCH RESEND][RFC] virtiofsd: do not fall back to buffer io when cache=auto/always

piaojun piaojun at huawei.com
Thu Aug 22 05:01:57 UTC 2019



On 2019/8/21 22:47, Vivek Goyal wrote:
> On Wed, Aug 21, 2019 at 10:38:39PM +0800, piaojun wrote:
> 
> [..]
>>>>
>>>> You cleared my first doubt that 'fi->direct_io' and 'fi->keep_cache'
>>>> are used to control Guest I/O mode together, and there may be different
>>>> I/O modes between Guest and Host if I undersatnd it correctly. I admit
>>>> this offers a more flexible config to user, but also introduces more
>>>> complex option. Maybe we could just use *keep_cache* to handle all
>>>> these options.
>>>>
>>>> My second doubt is that *keep_cache* is used to control whether reusing
>>>> the cache of last open(). IMO, it has nothing to do with the following
>>>> I/O path.
>>>
>>> FOPEN_KEEP_CACHE is already part of fuse protocol. cache=always is just
>>> making use of that option so that cache contents are not discarded upon
>>> next open.
>>
>> It still confused me that probably we needn't set fi->direct_io if
>> CACHE_NONE is set to indicate Guest go direct I/O path. As Guest could
>> also go direct I/O through regular path you have mentioned above.
> 
> fi->direct_io is needed so that server can *enforce* direct I/O on guest.
> If guest applications are not doing direct I/O, without fi->direct_io,
> you can't force client to do direct I/O.

I get yout point, it seems nothing wrong with it, but it indeed made me
puzzled once. Maybe we'd better wait for some response from real user in
the future.

Thanks,
Jun

> 
> Vivek
> 




More information about the Virtio-fs mailing list