public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Vyacheslav Kovalevsky <slava.kovalevskiy.2014@gmail.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: viro@zeniv.linux.org.uk, brauner@kernel.org,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org
Subject: Re: File name is not persisted if opened with O_SYNC and O_TRUNC flags
Date: Fri, 13 Feb 2026 13:25:20 +0300	[thread overview]
Message-ID: <4870d506-e29f-4c68-8d93-03aa3a931fa1@gmail.com> (raw)
In-Reply-To: <aY7T1LS5vnZI-ZxE@infradead.org>

On 13/02/2026 10:33, Christoph Hellwig wrote:
> On Thu, Feb 12, 2026 at 02:51:47PM +0300, Vyacheslav Kovalevsky wrote:
>> Detailed description ==================== Hello, there seems to be an 
>> issue with O_SYNC flag when used together with O_TRUNC on various 
>> file systems. Opening a file with O_SYNC (or using fsync(fd)) should 
>> persist directory entry. 
> No, it should not. I'm not sure who hallucinated, but O_SYNC has 
> always always applied to persistency semantics after writes and 
> nothing else.
You are right, opening file with O_SYNC does not persist anything and 
ftruncate or O_TRUNC do not count as write I/O it seems. Also found an 
error related to these assumptions in our testing tool. Thanks.

      reply	other threads:[~2026-02-13 10:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-12 11:51 File name is not persisted if opened with O_SYNC and O_TRUNC flags Vyacheslav Kovalevsky
2026-02-13  7:33 ` Christoph Hellwig
2026-02-13 10:25   ` Vyacheslav Kovalevsky [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=4870d506-e29f-4c68-8d93-03aa3a931fa1@gmail.com \
    --to=slava.kovalevskiy.2014@gmail.com \
    --cc=brauner@kernel.org \
    --cc=hch@infradead.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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