[Virtio-fs] [PATCH v7 3/6] virtiofsd: add 'dax=' option

JeffleXu jefflexu at linux.alibaba.com
Fri Dec 10 03:02:54 UTC 2021



On 12/10/21 4:00 AM, Vivek Goyal wrote:
> On Tue, Nov 02, 2021 at 01:56:43PM +0800, Jeffle Xu wrote:
>> This option is used to specify the policy of constructing per-inode DAX
>> attribute when guest virtiofs is mounted with "-o dax=inode".
>>
>> Currently there are two valid policies, "inode" and "filesize".
> 
> General thoughts.
> 
> I think additional policies like "dax=always" and "dax=none" will
> also make sense. "dax=always" will set ATTR_FLAG_DAX on all inodes.
> "dax=none" is default as of now but if somebody wants to enforce
> it, they can pass it explicitly, just in case default changes later
> down the line.
> 
> It should be trivial to add these two policies as well now.

Make sense. I will add "dax=always" and "dax=none" in the next version.

> 
> I am little concenred with "dax=filesize". It has implicit threshold
> of 32KB. What if somebody wants threshold of 64KB or 1MB or even
> higher? One option would be to add another option say,
> --dax-filesize-threshold=<foo> and that will allow one to override
> default. Or we could hardcode threshold in policy name say
> filesize_32KB or filesize_1MB etc.
> 
> I guess adding a separate option to modify filesize threshold
> is better because it will allow wide range of values. So "dax=filesize"
> will just mean that there is an inbuilt threshold of 32KB to enable
> dax and and user can override it by passing new option
> --dax-filesize-threshold (TBD in future when somebody needs it).
> 

Yes, at least for now, the "--dax-filesize-threshold" shall be more
flexible.

-- 
Thanks,
Jeffle




More information about the Virtio-fs mailing list