lkml.org 
[lkml]   [2023]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] loop: change fsync to fdatasync when update dio
On Thu, Jan 26, 2023 at 2:31 PM Christoph Hellwig <hch@lst.de> wrote:
>
> On Thu, Jan 26, 2023 at 02:16:57PM +0900, Huijin Park wrote:
> > In general, fsync has a larger overhead than fdatasync. And since the
> > dio option is for data, it seems like fdatasync is enough.
> > So this patch changes it to fdatasync which has little load relatively.
>
> The only difference is that fsync also syncs the timestamps. So this
> change looks correct, but also a bit useless given that buffered to
> direct I/O or back changes aren't exactly a fast path.

Although the difference will be minimal, why I suggested it is because
it can reduce unnecessary metadata i/o (helpful on slow i/o devices),
and using fdatasync looked correct like your opinion.
In some environment cases, loop setup for mount is required when
application is initialized and this change will help.

\
 
 \ /
  Last update: 2023-03-27 00:07    [W:0.075 / U:0.828 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site