From: Damien Le Moal <dlemoal@kernel.org>
To: Vincent Fu <vincentfu@gmail.com>
Cc: fio@vger.kernel.org, Jens Axboe <axboe@kernel.dk>
Subject: Re: [PATCH v2] Introduce the end_syncfs option
Date: Tue, 27 Jan 2026 11:05:34 +0900 [thread overview]
Message-ID: <83b16ae2-4a7f-4165-8c8f-adbde7e581d5@kernel.org> (raw)
In-Reply-To: <CAOp=CX=dWPmgjKhZFK8BDKA57qyYJKCJkYBKYOLynU1n6bi=ug@mail.gmail.com>
On 1/27/26 10:01, Vincent Fu wrote:
> On Mon, Jan 26, 2026 at 1:22 AM Damien Le Moal <dlemoal@kernel.org> wrote:
>>
> <snip>
>> }
>> +
>> + if (td->o.end_syncfs) {
>> + td_set_runstate(td, TD_FSYNCING);
>> +
>> + for_each_file(td, f, i) {
>> + if (fio_file_syncfs(td, f))
>> + log_err("fio: end_syncfs failed\n");
>> + break;
>
> This seems like it will break out of the loop after syncfs-ing the first file.
> Is this intentional or should fio break only if there is an error?
It is intentional and it is the entire point of this patch: doing syncfs for the
first file will sync the entire FS, so all the other files will be sync-ed as
well. We thus avoid the entire loop on all files which is extremely slow when
running with a large number of files. We only need to do syncfs() once for the
first file. Ideally, we should do it for the directory specified for the files,
but that is a little more involved as a change.
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2026-01-27 2:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-26 6:17 [PATCH v2] Introduce the end_syncfs option Damien Le Moal
2026-01-26 7:29 ` fiotestbot
2026-01-27 1:01 ` Vincent Fu
2026-01-27 2:05 ` Damien Le Moal [this message]
2026-01-27 2:15 ` Vincent Fu
2026-01-27 2:18 ` Damien Le Moal
2026-01-27 3:59 ` Jens Axboe
2026-01-27 6:03 ` Damien Le Moal
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=83b16ae2-4a7f-4165-8c8f-adbde7e581d5@kernel.org \
--to=dlemoal@kernel.org \
--cc=axboe@kernel.dk \
--cc=fio@vger.kernel.org \
--cc=vincentfu@gmail.com \
/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