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 2C23B19D065 for ; Mon, 27 Oct 2025 08:05:57 +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=1761552358; cv=none; b=lNtYOboc/73yoVdv1lX1E1LMdPgYlQbnU+CdxrSiMGbHC7zc6Yhy+FvBWmjPG+UbRu9Dv9seQmqolAvZlTnIMdIl9mxUzO2YOC2dsaBKy2M2WLsbpU/8OzFz76Brb7L6kom0r1Uu2ngRrCibR4OJbe1YiyNHWcCWXafdu8zBrCc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761552358; c=relaxed/simple; bh=SJ++OcfvomrltxiBo5b+5UYY7NqfGL/AvAGjQEv/1TM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=EuZj1I8ZKhmvyaUPvF7J26v5plwL7qk8s5oQDNTvT5ZGyseAnOTIrUybZQ95+poepiBdM/NBXkDEj2ktj6+i9hU/3YwItAQDXWUVmkdmFH3DR0U7Cqz9BIv5wxD4yiiRt5r4l27R8YjCVL+ZInhKZ5AVa5gtZ2zhCx3UzK1CF8U= 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=hrfX/elG; 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="hrfX/elG" 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=BppNUDpE3lLxXbGk/lXbixeIIZK25DhBc83pPS9r1b0=; b=hrfX/elGFNEs6GIgGgnPrNJ17B b0tSGdoCmwNa8YUgp8nCLLAZWTUpwTeTZ6p6dGfy3dL+QQpqQmg8KPxQ+2nS8DZpVHbC4Rkuhf1Ih ZVeBowEIrh3j/0Co/5hm3t+/6qKZG0tx8T2W4Jh8/mW4hxwY5h7hcoZb8ozXtxTbxeZTT88/joEZb KvZ30JPHMAg6W7VXDd/aUb7OZ9Z38n32hTa0+lOk81orWKr6xEBWN4LOZFaNUvsfRhpZz0SQjp0xA mqzHkN59bG7MjW41v9zD7330GdM99FLc2HMfdLjNA7AVbMU9Xvy0vqT6d1x+NEPh9FOeko0H17Rug HZtVzufw==; Received: from hch by bombadil.infradead.org with local (Exim 4.98.2 #2 (Red Hat Linux)) id 1vDIEk-0000000DK58-2eok; Mon, 27 Oct 2025 08:05:54 +0000 Date: Mon, 27 Oct 2025 01:05:54 -0700 From: Christoph Hellwig To: Chuck Lever Cc: NeilBrown , Jeff Layton , Olga Kornievskaia , Dai Ngo , Tom Talpey , linux-nfs@vger.kernel.org, Chuck Lever Subject: Re: [PATCH v7 05/14] NFSD: @stable for direct writes is always NFS_FILE_SYNC Message-ID: References: <20251024144306.35652-1-cel@kernel.org> <20251024144306.35652-6-cel@kernel.org> 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: <20251024144306.35652-6-cel@kernel.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html On Fri, Oct 24, 2025 at 10:42:57AM -0400, Chuck Lever wrote: > From: Chuck Lever > > Clean up: The helpers in the nfsd_direct_write() code path don't set > stable_how to anything else but NFS_FILE_SYNC. All data writes in > this code path result in immediately durability. No doubting the statement of fact for the current patch set, but this is probably a bad idea. Direct I/O still has to flush caches on devices with a volatile write cache (aka consumer grade SSDs), and it still has to commit a transaction to record metadata changes for most writes. Being able to batch these in a commit is a good idea even for direct I/O.