[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4870d506-e29f-4c68-8d93-03aa3a931fa1@gmail.com>
Date: Fri, 13 Feb 2026 13:25:20 +0300
From: Vyacheslav Kovalevsky <slava.kovalevskiy.2014@...il.com>
To: Christoph Hellwig <hch@...radead.org>
Cc: viro@...iv.linux.org.uk, brauner@...nel.org,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-btrfs@...r.kernel.org, linux-ext4@...r.kernel.org
Subject: Re: File name is not persisted if opened with O_SYNC and O_TRUNC
flags
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.
Powered by blists - more mailing lists