[kata-dev] [Announce] virtio-fs released with Kata Containers support

jiangyiwen jiangyiwen at huawei.com
Fri Jan 11 01:10:16 UTC 2019


On 2019/1/10 23:57, Vivek Goyal wrote:
> On Thu, Dec 27, 2018 at 10:57:21AM +0800, jiangyiwen wrote:
> 
> [..]
>> what do I mean by "I filter O_DIRECT flag in libfuse-daemon"?
>>
>> I modify passthrough_ll.c code and ignore O_DIRECT flag when opening file,
>> then it return success. The codes as follows:
>> diff --git a/example/passthrough_ll.c b/example/passthrough_ll.c
>> index 3e37dbd..9edb5bb 100644
>> --- a/example/passthrough_ll.c
>> +++ b/example/passthrough_ll.c
>> @@ -1234,7 +1234,7 @@ static void lo_open(fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi)
>>                 fi->flags &= ~O_APPEND;
>>
>>         sprintf(buf, "/proc/self/fd/%i", lo_fd(req, ino));
>> -       fd = open(buf, fi->flags & ~O_NOFOLLOW);
>> +       fd = open(buf, fi->flags & ~(O_NOFOLLOW | O_DIRECT));
>>         if (fd == -1)
>>                 return (void) fuse_reply_err(req, errno);
> 
> Hi Yiwen,
> 
> Ok, this issue is now fixed. We still do not ignore O_DIRECT flag on host.
> I think if file is opened with O_DIRECT in guest, then it makes sense to
> open with O_DIRECT on host as well.
> 
> We were getting -EINVAL (-22) due to misaligned buffers. We were creating
> extra data copy in libfuse daemon and that copy created misalignment.
> 
> David Gilbert has now fixed it. He has got rid of that extra copy and 
> that means if guest hands over aligned buffers, I/O should succeed. This
> should also result in some speed up on write path as one extra copy has
> been avoided.
> 
> These fixes are still internal. David might push these externally soon.
> 
> Thanks
> Vivek
> 
> .
> 

Hi Vivek,

Great, I am glad to test it if this patch is pushed.

Thanks,
Yiwen.




More information about the kata-dev mailing list