From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4BAB1286D7E; Fri, 13 Feb 2026 07:33:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770968022; cv=none; b=c8PDERR7QGsXx+NMXtM+7S3t5ph24vK3EaK3keZ0YKp9EbBgwrVw8QCdvdhqE2lRVUubxPPNrerN9bUBL6N4s2TPRbZohibvjhddGXq7vluwoiBnrC2owcPUioKc1Yqh3CeQM8UgWGFL19nCL931DWlmwSbY6gII1oCSUZP1lD0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770968022; c=relaxed/simple; bh=2pI8ejnF/hPegomvE5m5LZPZsi9W6WotN6jVhhGMM4U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Xhb1nixN2/z6GAU0nfA+SpIkA+8n0eV7Pn1YhFLBvKa1MY1+twPBe/mvyN2xPTc70sdM4U7Vir9ZlGtIM2+P38VPFJKPeVyHakfNpTB9prMlNagLg55C2rpMkSR5lPXcEZW0VWJs8skVzj8oHD7XzPWp18e6Qgg/aE8covuIS/E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=sZJ3SA0W; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="sZJ3SA0W" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=k+shCV56jRGCAYiUIQONlQS4eFINeE+LcPXmzs3QJFw=; b=sZJ3SA0WInt8mMNiC9cE4s1MBo +6jFbES3PS9YFabiiEsUsJLa/j+3AUCoq/Kgt7iLokxRA1tYyfdGbk+Yf7hFILZbCr6Qxn7Jp5ton YLN+DH2ykY7dDvpI3hT6GD4LqfotFEE9OJ1PXQtjrNaTWop1XZWvdkGUWJmUfv1Wh0mRPRZjgT1oR Y/9yx/t2bWKLNcWWrlE67Kuz6j0NkqJJHY3uIyjZoitwy9KEdyd/p4+PGqZyGyvh1FrjnO6+WdIFg yjIzfbcj8PGpChdb3qfEYp4WNssHsjj/xy/rZWqzp86nDKSXUJC8D5jic9RozSxOxIxssH0PhYs7P IsisKTMQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.98.2 #2 (Red Hat Linux)) id 1vqngK-000000036mB-2ldi; Fri, 13 Feb 2026 07:33:40 +0000 Date: Thu, 12 Feb 2026 23:33:40 -0800 From: Christoph Hellwig To: Vyacheslav Kovalevsky 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 Message-ID: References: <4b207a36-5789-41d2-ac17-df86d4cde6da@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4b207a36-5789-41d2-ac17-df86d4cde6da@gmail.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html 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.