[PATCH v2] nvmet: avoid unnecessary fsync and flush bio
Guixin Liu
kanie at linux.alibaba.com
Wed Jul 27 01:03:43 PDT 2022
在 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
More information about the Linux-nvme
mailing list