Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp866567rdb; Tue, 30 Jan 2024 00:22:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IFfvcI7q/ND0QCgPpE0JlmBemlG1A2G790hyPSprwDKJC1MB4+3iLKquEF68lQpoy+xpXNA X-Received: by 2002:a17:906:26d6:b0:a36:239:77a with SMTP id u22-20020a17090626d600b00a360239077amr1407487ejc.23.1706602961080; Tue, 30 Jan 2024 00:22:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706602961; cv=pass; d=google.com; s=arc-20160816; b=lXgeHSK7PZxEw2h357MDUxsV0vJCF5vgeNIW44tOjPBH1cKnkp142AHstbLr507wJY S9Yv4cOio2nbVcildiHan60Uw4zt/XTuahebQdIxGrhP4dSRYpOQ9sYXujz/kKLSxKuf d2a5pT/K7hA7GlGlDB1hJjx6XFHl27Gfo3uZgDlvr6X5ohTynCBZLfagyNDEZeWicm90 ciDQdUHJutecr5jdyGgHsgj9AC+0oZ6yt+UqmU1UOOiCWjWeEHwewCZ/pvgytCwinYZw +acHxeYHchvFCpwG+QP7+ex2Ug0NOo5JrArEB9/uhXA5Z/1OBAmhbKJHHaIc12OPeMWQ aJRg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=MDuK9twlOjIDfGFwkBlH48dI/3VqFjrv/DTly2AcIPg=; fh=NxsD1VXGtxX7D22HWBE72S/UAWD4f4gSJFrLKKCXY/E=; b=PG/s+hANdukw+rSK64RkynA8BEhFZ9h15wcBPEmvjRrxPJ3ja5YEVQrRLm9ASxUFob 2n32xbDxOPxjtmyZ3am2IP32SDzXWftcv9ZCWsChmx22U1q/GTaX/fDiGWMNOIGI/uYJ ajSdGTaSDAZ01vSGm9mENOUddn45N7ByPhCvTFNy5/kHIUMt6kde1ZOtuVdgRaBYff8R MBu3WO1Qjscvqvj+15hVihzOHxzt3K96Fwz9peYk/mkTY9hLlkBb4eOW5zHNqA7fH+rj 3Gn8YnM0Ps0BaaPToBY+vGH62C8UVxomm726IW3/d5oSO7+nPVjQmR9EtzXg5aWBGBJ8 CjYw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=d2e4ZlsV; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-ext4+bounces-1015-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1015-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id dx5-20020a170906a84500b00a35924ddf72si2097480ejb.428.2024.01.30.00.22.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 00:22:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-1015-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=d2e4ZlsV; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-ext4+bounces-1015-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1015-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 1537F1F22F33 for ; Tue, 30 Jan 2024 05:54:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D5780381CF; Tue, 30 Jan 2024 05:54:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="d2e4ZlsV" X-Original-To: linux-ext4@vger.kernel.org Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 532CF381B0; Tue, 30 Jan 2024 05:54:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706594060; cv=none; b=REHnbFgBOH+crydjMFK5GuDz8EBaZTzv/zLLBblcpeQj+XblySzUbOAC+CkDBfW7vmTXP+q/8epo+BM2ImwtmwE7pg6qhxDoW4CV4yO8QZgvCkRYMBq7fhdCOCZWQK8WSkHm3ZLwhlLfChbyGrUkTiA1aoVPIfCGSqAnJrN/iUI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706594060; c=relaxed/simple; bh=oxmf8oEiU85Akg58cWkdalKcMLx7W+ekN0HZlMD53wI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=XLLlJTM5XQslWZhcEx8ABL+HzmY2gCRJG7x18xT65HJ39EYsj1M24lIjmfwebiZqnqID0Zd3GM4hafO2YtpWrzNPrRNLCkkzOMoRJUS0QgQ4E2KXyyDqYy7uFHkNGzsrp2ryKd6TQC7cZgdY/iu3tatmE6vMzGe+5onRP33iLRk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=d2e4ZlsV; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=MDuK9twlOjIDfGFwkBlH48dI/3VqFjrv/DTly2AcIPg=; b=d2e4ZlsVGbe9cy16c5uErZPLtI v7sA4zAUutzQEIhn4oxHa8FATZHTL4iB5uAiCDRWMT3OfQ8zv9RHPtpPDjit8ZxdB6Z5W1CsPbxYA kzPjzaKtK3CP3JgzqA9kNP7J6EuRuhQhhOaVEn//5ASFvRsp2TnlpkeNMkc58o7xR3nAOYBkrXgDx w+MtItMka6BoAfCRljO63DW+ikzRfAmmJsSixPQvVa8+4kL2yjKW5KlE29OKCQvNhXh9NPxV2gtDa gdLqyiBFjcWKxuy0jjc/q7KdHUNfdGeJuecDl7pUMN7KnoeNbr1WM42aWpQT/idUU2POdrac9W4So 1TU7ji2w==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rUh4a-00000008zkf-0Foq; Tue, 30 Jan 2024 05:54:16 +0000 From: "Matthew Wilcox (Oracle)" To: Christoph Hellwig Cc: "Matthew Wilcox (Oracle)" , linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org Subject: [PATCH 0/3] Start moving write_begin/write_end out of aops Date: Tue, 30 Jan 2024 05:54:10 +0000 Message-ID: <20240130055414.2143959-1-willy@infradead.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Christoph wants to remove write_begin/write_end from aops and pass them to filemap as callback functions. Hre's one possible route to do this. I combined it with the folio conversion (because why touch the same code twice?) and tweaked some of the other things (support for ridiculously large folios with size_t lengths, remove the need to initialise fsdata by passing only a pointer to the fsdata pointer). And then I converted ext4, which is probably the worst filesystem to convert because it needs three different bwops. Most fs will only need one. Not written yet: convert all the other fs, remove wrappers. Matthew Wilcox (Oracle) (3): fs: Introduce buffered_write_operations fs: Supply optional buffered_write_operations in buffer.c ext4: Convert to buffered_write_operations fs/buffer.c | 62 +++++++++++++++++++++++-------- fs/ext4/ext4.h | 8 +++- fs/ext4/file.c | 10 ++++- fs/ext4/inline.c | 15 +++----- fs/ext4/inode.c | 73 +++++++++++++++++++------------------ fs/jfs/file.c | 3 +- fs/ramfs/file-mmu.c | 3 +- fs/ufs/file.c | 2 +- include/linux/buffer_head.h | 22 +++++++++-- include/linux/fs.h | 3 -- include/linux/pagemap.h | 22 +++++++++++ mm/filemap.c | 70 +++++++++++++++++++++++------------ 12 files changed, 193 insertions(+), 100 deletions(-) -- 2.43.0