Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3211531rdh; Mon, 27 Nov 2023 08:41:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IHfbISZLWAZMbsa/qI1dTIiJaaiRr9Ebi1s0/LRaIWwsh1yQLha81RADSPPVGC84GtpTKqT X-Received: by 2002:a67:ffcb:0:b0:462:9ae4:2fa7 with SMTP id w11-20020a67ffcb000000b004629ae42fa7mr11760372vsq.15.1701103290015; Mon, 27 Nov 2023 08:41:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701103290; cv=none; d=google.com; s=arc-20160816; b=DCP7q4ECjkB+SkroNcRskVTzdeIgIGwV3k4s6bgH+zCplyiPyhawHUOoa162TIRduU Hnd92eU+6LN/hbL8/imb988TziwHhCraQDf/fvWnnhgymZ6+UxtuSiBI2PtPfTHeNGPs rmHNDLBaI7poXb6EFglkFIi3pZJ7n5gY4gK/CTjh28N8c/NxcHOqTMzJw4jRGfoyvv36 RwgIaXHPw8hQwLSir77fHURDcgofXZlANLTgLvruCmfO2xtszK2DlYcQeDuuPijFG2HJ tK3tta73pXrxNGwj+Oxh9NlrsT9ThPNqnUSFYzUjzBDf0FJzZM4qoD+NwV1smJQYAQiz eWag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :content-transfer-encoding:content-language:accept-language :in-reply-to:references:message-id:date:thread-index:thread-topic :subject:cc:to:from:dkim-signature; bh=2Y6dpandy6vfM5kCmpfb0IzyeUGaqbJ4zJEyjefgrM4=; fh=9re+cbfU2zCeDZiWKrc7qrnWdA7ejK6iASDrio5nZBo=; b=DzD7gWNJAD2mD5rvGIT0u3SKnkIeafotGa8ooLcZ7bPYf8He6DN9QTgQifmGIUKkKp S1CmsEvul5GUxXbOBB473cGKoTuAxvw38jUPuk9mKil+FjxEmt1ESOddlz0SyU6AZOSo vc5Zoj1SSNBrNPGUQHg/Os10eYedgA2AHJV/1lVpXjIofGm+w4POXgwpEofJfS+cJici 13PIgL/d1nLs8pUbEEc4aSwkstuXd4zK0BIi7ipJBXPfMpym4j5hjILfduYMEMD2bheO jLTxCiUwfYYTeHgDjSEqMeBK5ScPWZNR4gCTzR5s+ovNMRbfkmVYQxISBANzKa3VSzh6 IfTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@epfl.ch header.s=epfl header.b=jiOJaPli; spf=pass (google.com: domain of linux-nfs+bounces-100-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-100-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=epfl.ch Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id o8-20020a67fc08000000b0045fb8d30b5csi2657192vsq.546.2023.11.27.08.41.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 08:41:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs+bounces-100-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@epfl.ch header.s=epfl header.b=jiOJaPli; spf=pass (google.com: domain of linux-nfs+bounces-100-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-100-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=epfl.ch Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 89D181C20A29 for ; Mon, 27 Nov 2023 16:41:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B07F32EB13; Mon, 27 Nov 2023 16:41:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=epfl.ch header.i=@epfl.ch header.b="jiOJaPli" X-Original-To: linux-nfs@vger.kernel.org Received: from smtp4.epfl.ch (smtp4.epfl.ch [IPv6:2001:620:618:1e0:1:80b2:e059:1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6F8A198 for ; Mon, 27 Nov 2023 08:41:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=epfl.ch; s=epfl; t=1701103281; h=From:To:CC:Subject:Date:Message-ID:Content-Type:Content-Transfer-Encoding:MIME-Version; bh=2Y6dpandy6vfM5kCmpfb0IzyeUGaqbJ4zJEyjefgrM4=; b=jiOJaPliSv+DfjhGNr1dAxfNVgKxpI2uf9ikjQkx7JfmSlQ7fO36XndZ6A4p1kmyF y5V4+qTNknPj4xBxWfVf77XkxwN7mpEBp1cFvIxFLOnes52hT7Oezx3anc51sADna i4D82hKkgLuL6bDn5kQmQcyoFdJW4kO2gSutRnDXo= Received: (qmail 29391 invoked by uid 107); 27 Nov 2023 16:41:21 -0000 Received: from ax-snat-224-159.epfl.ch (HELO EWA02.intranet.epfl.ch) (192.168.224.159) (TLS, AES256-GCM-SHA384 cipher) by mail.epfl.ch (AngelmatoPhylax SMTP proxy) with ESMTPS; Mon, 27 Nov 2023 17:41:21 +0100 X-EPFL-Auth: R8hvf+eXsV0sXicJRoFmzoBHxX0ZDu4BDc9ssRY33bVAuP++DXA= Received: from ewa07.intranet.epfl.ch (128.178.224.178) by EWA02.intranet.epfl.ch (128.178.224.159) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Mon, 27 Nov 2023 17:41:18 +0100 Received: from ewa07.intranet.epfl.ch ([fe80::f470:9b62:7382:7f3a]) by ewa07.intranet.epfl.ch ([fe80::f470:9b62:7382:7f3a%4]) with mapi id 15.01.2507.034; Mon, 27 Nov 2023 17:41:18 +0100 From: Tao Lyu To: Christoph Hellwig CC: Trond Myklebust , "linux-nfs@vger.kernel.org" Subject: Re: Question about O_APPEND | O_DIRECT Thread-Topic: Question about O_APPEND | O_DIRECT Thread-Index: AQHaHjflhODFfyeMXUSkxSGiPt/2HLCLuRkAgAKTcNCAAAYXgIAAEVQV Date: Mon, 27 Nov 2023 16:41:17 +0000 Message-ID: References: <2d948b43fa625952e50589e4bedf9551df7ee112.camel@hammerspace.com> <7d2d17e4d3904d29b75fadcfd916b2a3@epfl.ch>, In-Reply-To: Accept-Language: en-US, fr-CH Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 > On Mon, Nov 27, 2023 at 03:28:16PM +0000, Tao Lyu wrote: >>=20 >> O_APPEND | O_DIRECT can be used to bypass the client cache for multiple = threads writing data without caring of the orders (e.g., logs). >>=20 >> Yes, to support O_APPEND | O_DIRECT, NFS must first support APPEND. >> But the key point is that looks like NFS has supported O_APPEND already. >> I can successfully open a file with "O_RDWR|O_APPEND". >>=20 >> My confusion is why NFS supports O_RDWR and O_APPEND individually but do= es not support this combination. > Well, it does support O_RDWR|O_APPEND, just not with O_DIRECT? Hi Christoph,=20 Yes, it just doesn't work with O_DIRECT. > Btw, I think an APPEND operation in NFS would be a very good idea, and > I'd love to work with interested parties in the IETF on it.=A0 Not that > we (Damien to be specific) plan to add support to Linux to also report > the actual offset an O_APPEND write wrote to through io_uring as we > have varios use cases for out of place write data stores for that. > It would be great to also support that programming model over NFS.=