Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3208279rdh; Mon, 27 Nov 2023 08:36:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IF8bzYoaFlT09L6wMDZLzD/r+cYyqhtuEmHFgnOBNR+LZXtZKAqMUXb8jIT95+f4x43evvn X-Received: by 2002:a05:6214:83:b0:67a:1d83:66ef with SMTP id n3-20020a056214008300b0067a1d8366efmr11626815qvr.6.1701103015391; Mon, 27 Nov 2023 08:36:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701103015; cv=none; d=google.com; s=arc-20160816; b=kj3NbyMfeld1k7QmiaBdGE9+f8al0QLQX2oLBTCY26NMzGtUe/e7TZGHRquRnR67fF j9OTboV4XE7wPkwy0PFh09i0TFnGARtGRDe+JTasb2XqmBfgns9tjewti3EMe5xIuiKB UDpZzIf8R7B6gz/mQPvOVJkmlCFBpDsdvSLSbcs9JXrsElF8rmarnW51o/p5OaQeEns/ nB5CblxTbZuayEIwR053Rj8lUMeefx4icDBhKJ9uEmeFs7hSh2OPuqf8pZ3KentAEOj4 wO1unene72ekgv1Uu13+e225lsUKZfTM/AAzFbrz3r+Oaac2NtaIeXV5SRScqGGDk2gw /K5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=odZBi6HJI9sAn4TqziYwGVe+XbcV0XW8DzDO2hWV0FE=; fh=1Mm7VIArG8HVau6HGC0POKbvSERvCmeK3EEDS/xp9BE=; b=QDGpPx6iM9vy8z45+BlQDzDmLR7Jngt3yMv8msoXHMfkFIEOOtsAR1f/ldb4/7bkPv VfLsMsCw8SeQvARhOzsw33eCuZ8rrcpT0bZbcgG8zBvo8koefmjRIbssOvSTjvGXru6h S60uUWur+0lXcicilbhNSjJNJO3RYGaecoSHQ1D1Dx6Uqfcxd/WQiwtsN3wCCZrSPrqH hxzwNmDHQJ5+u318TNvzPPDcha2uaAzrEJxBypIckPQhLElCzg/WNlUegp1zeVZsowQM BAKww55CnRxoVbEnvrxw6JGdsNhYFoNSv1V4+spfcNCpY5t23khvVuHAcmy2gMyv7Ssk gIvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=Vr5LAACF; spf=pass (google.com: domain of linux-nfs+bounces-99-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-nfs+bounces-99-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id o4-20020ad45c84000000b00679e91ac548si10749136qvh.473.2023.11.27.08.36.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 08:36:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs+bounces-99-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=Vr5LAACF; spf=pass (google.com: domain of linux-nfs+bounces-99-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-nfs+bounces-99-linux.lists.archive=gmail.com@vger.kernel.org" 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 1873B1C20B83 for ; Mon, 27 Nov 2023 16:36:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6660136AEA; Mon, 27 Nov 2023 16:36:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="Vr5LAACF" X-Original-To: linux-nfs@vger.kernel.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16BF299 for ; Mon, 27 Nov 2023 08:36:52 -0800 (PST) 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=odZBi6HJI9sAn4TqziYwGVe+XbcV0XW8DzDO2hWV0FE=; b=Vr5LAACFHDTsPuZv8tQUti0Xx3 wJlowCJh8UM5Fl7PlL98jH5ROGC78OexRZLfB+0LTMLAQzI5LWXs63PB23R0WrItCI6RYHNCCu7Yi zzuEBRjBKgJCprRqxXN9qaaoK6dPlWEqdDAr1PRsfmu2bYHuQ/rdggBN5GzNbPpgx46OV3HjAUP0K shxLa/XJr9ycZplhCEKc0AbHHFlEZOzYZryxnP7UCuiaV+6u4hhK65er55Dyck7sctx8L0ikAYPw4 8Xvd8yyc6NE/bVdmdFzoAbJR0vRk14UfytKBlDG+5UhxCLETlwxNxFeMdNFfGs8kLxfHfFP9GJgMN 170TazRg==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1r7ebH-0031R2-1a; Mon, 27 Nov 2023 16:36:47 +0000 Date: Mon, 27 Nov 2023 08:36:47 -0800 From: Christoph Hellwig To: Tao Lyu Cc: Trond Myklebust , "linux-nfs@vger.kernel.org" Subject: Re: Question about O_APPEND | O_DIRECT Message-ID: References: <2d948b43fa625952e50589e4bedf9551df7ee112.camel@hammerspace.com> <7d2d17e4d3904d29b75fadcfd916b2a3@epfl.ch> Precedence: bulk X-Mailing-List: linux-nfs@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: <7d2d17e4d3904d29b75fadcfd916b2a3@epfl.ch> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html On Mon, Nov 27, 2023 at 03:28:16PM +0000, Tao Lyu wrote: > > 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). > > 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". > > My confusion is why NFS supports O_RDWR and O_APPEND individually but does not support this combination. Well, it does support O_RDWR|O_APPEND, just not 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. 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.