[PATCH v2] nvmet: avoid unnecessary fsync and flush bio

Chaitanya Kulkarni chaitanyak at nvidia.com
Wed Jul 27 01:08:01 PDT 2022


On 7/27/22 01:03, Guixin Liu wrote:
> 
> 在 2022/7/26 19:33, Christoph Hellwig 写道:
>> On Mon, Jul 25, 2022 at 02:28:18PM +0800, Guixin Liu wrote:
>>>   u16 nvmet_file_flush(struct nvmet_req *req)
>>>   {
>>> -    return errno_to_nvme_status(req, vfs_fsync(req->ns->file, 1));
>>> +    if (req->ns->buffered_io)
>>> +        return errno_to_nvme_status(req, vfs_fsync(req->ns->file, 1));
>>> +    return NVME_SC_SUCCESS;
>> This is broken.  Even direct I/O needs an fsync to commit metadata
>> changes.
> 
> Well, you are right, I will send V3 patch with remove this change.
> 
> Thanks,
> 
> Guixin Liu
> 

Please provide the testlog for this patch with V3.

-ck




More information about the Linux-nvme mailing list