Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp420064lqb; Tue, 28 May 2024 22:21:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVx744rKyEKGfJsNfoaVYRKhBezh5WOPH+w4qVchqQWzcuE6x/JGh6mfrbQqkUsK6b3i4ZdQgIduBNNZvhgPcP2VTknHGiQE2KtzeHoWw== X-Google-Smtp-Source: AGHT+IHIjOHTBcFjX+Xwh2iqBziNuiHAyyTuaafyFtx1S2zRjvEZbeJxtZmzh+v4OSFVrMmc34LD X-Received: by 2002:a05:6a00:4206:b0:6f3:ea8a:f973 with SMTP id d2e1a72fcca58-6f8f2c56570mr19013029b3a.7.1716960086371; Tue, 28 May 2024 22:21:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716960086; cv=pass; d=google.com; s=arc-20160816; b=LkORIInLTk+2xyt1zxLrzl4xNrNVqqNguYu2lTeRCDpSOmDiRIbrZGcugbJ9nar7dt dyNEktuqqZSeLz63/41Wf9LFRJPgTXRR0EGfIlYEglOjF5m0+txctOxCmridiwYTLKPH XEDQonTX+RgoTZXV13LNkqmGjUCI7j29JWLEBobkcMCP8cITRVd5JelR+1IJyjjzN/ok yp7pCBpTBF4x0bGYnORVeQjzorDF0us2SEoWPJ4kMOOooUyE3ysIroBP+n84YHIbjjND PH5LELm8eU7QjqzNeaHHMIrH0zXyIX/JqqSd70ImH4s5BMrWRRSlTAWpJyEWtSDENdNo zZ8g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=TdWWacIWDxAwWzmXe8CMOcY3y6PQwrEq1cUQqSVXNwI=; fh=Dk305f9xd/mXvI4Xk50RrI85sYdneBYagoj2h78w+Ao=; b=gy3vteEGdEx1GnIN/hw+E9N/wpSfU2FzR/30pclnDb0Ua4wzwhk/TGWFplnPlPONjs jmwHqb6BK5XaXYkljjf4v1+ylIOpdQhkv6BZq+RSyNebUpzTACvKpsjk426YK+C3IlSi 0cL82puZnaW96w+bHv1VxDhkLusRPFjZMRYMkYIbO9RR6Rx53MrybbAO1PbiP2zBdtY1 6MB6GmkuZ/PRhcmJ+uX6G/oCU8TpMTH3Hu68NUGGYHVG+jgsJizeTPckgdbpPoBadycW +JhyIcz7K4XxQPSAMePgOBY3Gm7VCMkJGdX1E3uKeO+YnkTf6FH2LDSmYQlQo/ae1vph sUlQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=lst.de); spf=pass (google.com: domain of linux-ext4+bounces-2697-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2697-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-68221c6ab8csi9793618a12.87.2024.05.28.22.21.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 22:21:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4+bounces-2697-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=lst.de); spf=pass (google.com: domain of linux-ext4+bounces-2697-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2697-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 9461F284DCA for ; Wed, 29 May 2024 05:21:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8B2C615B980; Wed, 29 May 2024 05:21:19 +0000 (UTC) X-Original-To: linux-ext4@vger.kernel.org Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (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 9A18C13A412; Wed, 29 May 2024 05:21:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716960079; cv=none; b=h8zHlsBZ9Bkha9i+uk5QEUWyPc04v09BDZMFf2RWMkU5V5Bcl0ppYqhC5nXOooSb0wU8j2EBuh4wqGiKA0A1r6tgN1Ns6N7bzzjcZu7RK1V/zmQwHBXUdvKLkG+uUFczoUv/a8NSD4MI/TDhOB+9uEyq+Vf2YsSGO5rZMn+oiOY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716960079; c=relaxed/simple; bh=8fNwj5Xd7Lscbex+dXasTvy/V4LM/jP9gdlh+d6jw3g=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=cYzA5tey6MhYgfh48sbut+ewn1XspKD3MBr1SjTKPqUvLOrll9XU+C4WtQHagKlgymds0ZOSaJ8fJeaH3Rk3Ug+ZoxJiLO9OkVxpNcHnf8pHH7AtaXihEKNU330NDfCAjlpFD/fNBSJvb8AZiQjNDkW7W4ck4uJM3GzGRIo5CH8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id 82B8868AFE; Wed, 29 May 2024 07:21:14 +0200 (CEST) Date: Wed, 29 May 2024 07:21:14 +0200 From: Christoph Hellwig To: "Matthew Wilcox (Oracle)" Cc: Christoph Hellwig , linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org Subject: Re: [PATCH 1/7] fs: Introduce buffered_write_operations Message-ID: <20240529052114.GB15312@lst.de> References: <20240528164829.2105447-1-willy@infradead.org> <20240528164829.2105447-2-willy@infradead.org> Precedence: bulk X-Mailing-List: linux-ext4@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: <20240528164829.2105447-2-willy@infradead.org> User-Agent: Mutt/1.5.17 (2007-11-01) On Tue, May 28, 2024 at 05:48:22PM +0100, Matthew Wilcox (Oracle) wrote: > Start the process of moving write_begin and write_end out from the > address_space_operations to their own struct. > > The new write_begin returns the folio or an ERR_PTR instead of returning > the folio by reference. It also accepts len as a size_t and (as > documented) the len may be larger than PAGE_SIZE. > > Pass an optional buffered_write_operations pointer to various functions > in filemap.c. The old names are available as macros for now, except > for generic_file_write_iter() which is used as a function pointer by > many filesystems. If using the new functions, the filesystem can have > per-operation fsdata instead of per-page fsdata. The model looks good, but buffered_write_operations sounds a little too generic for a helper that hopefully won't have too many users in the end.