From: Damien Le Moal <dlemoal@kernel.org>
To: Jens Axboe <axboe@kernel.dk>, Vincent Fu <vincentfu@gmail.com>
Cc: fio@vger.kernel.org
Subject: Re: [PATCH v2] Introduce the end_syncfs option
Date: Tue, 27 Jan 2026 15:03:54 +0900 [thread overview]
Message-ID: <84e0fcd3-7d54-4c40-97d3-86cc94293d8e@kernel.org> (raw)
In-Reply-To: <9468ef0d-a027-4aba-85f8-5b9ed3b2aee8@kernel.dk>
On 1/27/26 12:59, Jens Axboe wrote:
> On 1/26/26 7:18 PM, Damien Le Moal wrote:
>> On 1/27/26 11:15, Vincent Fu wrote:
>>> On Mon, Jan 26, 2026 at 9:05?PM Damien Le Moal <dlemoal@kernel.org> wrote:
>>>>
>>>> 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.
>>>
>>> Ok thank you for clarifying.
>>> Please emphasize in the documentation that this feature assumes that
>>> all files will reside on the same file system.
>>
>> OK. Will do in v3.
>
> That seems like a very odd limitation that people will never know about,
> and hence it won't do what they think it does. We stat these files for
> getting the size, right? Then do a sync for each fs. Only doing the
> first is a cop-out imho, and somewhat of a lazy way of doing it.
OK.
> We either sync any fs that has a file that was written, or let's not add
> this feature. That can be done in any number of ways. It's a terrible
> option otherwise.
>
--
Damien Le Moal
Western Digital Research
prev parent reply other threads:[~2026-01-27 6:03 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
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 [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=84e0fcd3-7d54-4c40-97d3-86cc94293d8e@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