From: Huijin Park <bbanghj.park@gmail.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Huijin Park <huijin.park@samsung.com>,
Jens Axboe <axboe@kernel.dk>, Chaitanya Kulkarni <kch@nvidia.com>,
linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] loop: change fsync to fdatasync when update dio
Date: Fri, 3 Feb 2023 03:12:41 +0900 [thread overview]
Message-ID: <CAMy0x0n_vWQrPwtzXCQ9v_-K89nYOHWL0mUf2LGwrOONx0x5hg@mail.gmail.com> (raw)
In-Reply-To: <20230126053136.GC28355@lst.de>
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.
prev parent reply other threads:[~2023-02-02 18:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20230126051713epcas1p10a9005ad21887893a486100cbbd376e5@epcas1p1.samsung.com>
2023-01-26 5:16 ` [PATCH] loop: change fsync to fdatasync when update dio Huijin Park
2023-01-26 5:31 ` Christoph Hellwig
2023-02-02 18:12 ` Huijin Park [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMy0x0n_vWQrPwtzXCQ9v_-K89nYOHWL0mUf2LGwrOONx0x5hg@mail.gmail.com \
--to=bbanghj.park@gmail.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=huijin.park@samsung.com \
--cc=kch@nvidia.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).