From patchwork Fri Dec 2 10:26:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13062584 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 58DB8C4332F for ; Fri, 2 Dec 2022 10:27:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232402AbiLBK1K (ORCPT ); Fri, 2 Dec 2022 05:27:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233353AbiLBK1B (ORCPT ); Fri, 2 Dec 2022 05:27:01 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BD31CCFEB; Fri, 2 Dec 2022 02:27:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=tshiIOlyizQCn3wWRqEk8o+H1VcPDbPrSjSJx6S/vZI=; b=p4T0SSAwoIWZnEozmQOSV1gt/m MIsRDd+GQm1I/cTGz+x3lh11gl9nlIOzHMxB4vQ1meJn45PtYaDQhPY42zKL/K405lsql7KgD71Um 2RREPX5GNnwopdJ0PXyvfmfbM8KWrMs3PkztXKT4lZxcMAKD5EavokoI5B0Ijhx/nFCu2G26xXa/0 CpNmv0l7/fvEHrXC2Xc4LXjaIfYob5/hQ/D2RBNqs4LR7DZR+wNPRqrCxPOPftOqV+6CBciDdnS87 blEIGvCe0Q99ktCpoqgEH7vI3DzmeKXMGnIrjgPcWRsX1zUFMOE1orH/KBqJDWv8jUnjrvv7IzQhz mz06UUiw==; Received: from [2001:4bb8:192:26e7:bcd3:7e81:e7de:56fd] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1p13Fp-00FQwZ-F8; Fri, 02 Dec 2022 10:26:50 +0000 From: Christoph Hellwig To: Andrew Morton , Namjae Jeon , Sungjong Seo , Jan Kara , OGAWA Hirofumi , Mikulas Patocka , Dave Kleikamp , Bob Copeland Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, jfs-discussion@lists.sourceforge.net, linux-karma-devel@lists.sourceforge.net, linux-mm@kvack.org, Johannes Weiner Subject: [PATCH 1/7] extfat: remove ->writepage Date: Fri, 2 Dec 2022 11:26:38 +0100 Message-Id: <20221202102644.770505-2-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221202102644.770505-1-hch@lst.de> References: <20221202102644.770505-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org ->writepage is a very inefficient method to write back data, and only used through write_cache_pages or a a fallback when no ->migrate_folio method is present. Set ->migrate_folio to the generic buffer_head based helper, and remove the ->writepage implementation. Signed-off-by: Christoph Hellwig Acked-by: Namjae Jeon Acked-by: Johannes Weiner --- fs/exfat/inode.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/fs/exfat/inode.c b/fs/exfat/inode.c index 5590a1e83126c9..eac95bcd9a8aae 100644 --- a/fs/exfat/inode.c +++ b/fs/exfat/inode.c @@ -345,11 +345,6 @@ static void exfat_readahead(struct readahead_control *rac) mpage_readahead(rac, exfat_get_block); } -static int exfat_writepage(struct page *page, struct writeback_control *wbc) -{ - return block_write_full_page(page, exfat_get_block, wbc); -} - static int exfat_writepages(struct address_space *mapping, struct writeback_control *wbc) { @@ -473,12 +468,12 @@ static const struct address_space_operations exfat_aops = { .invalidate_folio = block_invalidate_folio, .read_folio = exfat_read_folio, .readahead = exfat_readahead, - .writepage = exfat_writepage, .writepages = exfat_writepages, .write_begin = exfat_write_begin, .write_end = exfat_write_end, .direct_IO = exfat_direct_IO, - .bmap = exfat_aop_bmap + .bmap = exfat_aop_bmap, + .migrate_folio = buffer_migrate_folio, }; static inline unsigned long exfat_hash(loff_t i_pos) From patchwork Fri Dec 2 10:26:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13062585 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E650AC4708E for ; Fri, 2 Dec 2022 10:27:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233160AbiLBK1N (ORCPT ); Fri, 2 Dec 2022 05:27:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233344AbiLBK1A (ORCPT ); Fri, 2 Dec 2022 05:27:00 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 442D1CCEE7; Fri, 2 Dec 2022 02:27:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=Y8Lak3cqHWQ+dnfyhXDbmC5RGlFrgzaazzdLBDYGtZQ=; b=XcSze6yIF5L/Kmd8YUIv94LZPC WzH1nM4w+yQHudWoL9X1McNCpmKkrfOOG/ybs6VEgRXDnhtzvFFxgF2K+DRRZs4rgwFwlL1IUYb0k GD2FywGv16g5FhymEprpfNUd6SH8P47C11uUX/kneFiXVwoksI8Pewz+dE9CejlFM3PqFw+Uo/hEK EVbR8rGTHIwXSRM3s9uHqMr05/dPb9LZP1W1w7y76Odxbvyt8owe45cylBT3x2ZFd2uwXCyfeYAfU qbd/2u8s94Xp6wtw3UJdMXQdpbplxOqWjnoMs2IR9BvBIGrSlqgK8NhU9/ARmvkeJON4bYlzq2qqQ Yv6ZzMhQ==; Received: from [2001:4bb8:192:26e7:bcd3:7e81:e7de:56fd] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1p13Fs-00FQxO-F4; Fri, 02 Dec 2022 10:26:53 +0000 From: Christoph Hellwig To: Andrew Morton , Namjae Jeon , Sungjong Seo , Jan Kara , OGAWA Hirofumi , Mikulas Patocka , Dave Kleikamp , Bob Copeland Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, jfs-discussion@lists.sourceforge.net, linux-karma-devel@lists.sourceforge.net, linux-mm@kvack.org, Johannes Weiner Subject: [PATCH 2/7] fat: remove ->writepage Date: Fri, 2 Dec 2022 11:26:39 +0100 Message-Id: <20221202102644.770505-3-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221202102644.770505-1-hch@lst.de> References: <20221202102644.770505-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org ->writepage is a very inefficient method to write back data, and only used through write_cache_pages or a a fallback when no ->migrate_folio method is present. Set ->migrate_folio to the generic buffer_head based helper, and remove the ->writepage implementation. Signed-off-by: Christoph Hellwig Acked-by: Johannes Weiner --- fs/fat/inode.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/fs/fat/inode.c b/fs/fat/inode.c index 1cbcc4608dc78f..d99b8549ec8f91 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c @@ -194,11 +194,6 @@ static int fat_get_block(struct inode *inode, sector_t iblock, return 0; } -static int fat_writepage(struct page *page, struct writeback_control *wbc) -{ - return block_write_full_page(page, fat_get_block, wbc); -} - static int fat_writepages(struct address_space *mapping, struct writeback_control *wbc) { @@ -346,12 +341,12 @@ static const struct address_space_operations fat_aops = { .invalidate_folio = block_invalidate_folio, .read_folio = fat_read_folio, .readahead = fat_readahead, - .writepage = fat_writepage, .writepages = fat_writepages, .write_begin = fat_write_begin, .write_end = fat_write_end, .direct_IO = fat_direct_IO, - .bmap = _fat_bmap + .bmap = _fat_bmap, + .migrate_folio = buffer_migrate_folio, }; /* From patchwork Fri Dec 2 10:26:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13062587 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B354FC4708E for ; Fri, 2 Dec 2022 10:27:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233256AbiLBK1U (ORCPT ); Fri, 2 Dec 2022 05:27:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233364AbiLBK1C (ORCPT ); Fri, 2 Dec 2022 05:27:02 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0802526AC0; Fri, 2 Dec 2022 02:27:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=yJxb4jf5H4wN5CZm7p5uEgZxeUIn0cECx2KzjI/LP/8=; b=Yebwp0cearBPaYNKDQ0kQsacj0 WN5XnrFBFmcCGes73mk3QFiMUCa+hUsukP6klrjLDcVQa24dA4WKU35EJ1YXm2ElvIVIDXoCme8A9 icylY5Ogd4rySe2g5gdxIoK6NEfFi3FWalKeHkGTBTCid+Pfsd1hF74xRb4RXm3LJ3moR+qcZSmyd atUSuew4vVLKLbprx9fI/Bs8pFvbA8/JbQaLLkUm1G51JPgPCXFp8DId7kyIxfJXVHkZIWOzmoztl 32dL8SKJW25E5v0DSAQJYU2mIp59r0sBdNkOlH2A3PPqX+4gmJAI+PoyZmy8HkxCO29XSSddL+44L y7k2IGzQ==; Received: from [2001:4bb8:192:26e7:bcd3:7e81:e7de:56fd] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1p13Fv-00FQyS-Dv; Fri, 02 Dec 2022 10:26:56 +0000 From: Christoph Hellwig To: Andrew Morton , Namjae Jeon , Sungjong Seo , Jan Kara , OGAWA Hirofumi , Mikulas Patocka , Dave Kleikamp , Bob Copeland Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, jfs-discussion@lists.sourceforge.net, linux-karma-devel@lists.sourceforge.net, linux-mm@kvack.org, Johannes Weiner Subject: [PATCH 3/7] hfs: remove ->writepage Date: Fri, 2 Dec 2022 11:26:40 +0100 Message-Id: <20221202102644.770505-4-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221202102644.770505-1-hch@lst.de> References: <20221202102644.770505-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org ->writepage is a very inefficient method to write back data, and only used through write_cache_pages or a a fallback when no ->migrate_folio method is present. Set ->migrate_folio to the generic buffer_head based helper, and stop wiring up ->writepage for hfs_aops. Signed-off-by: Christoph Hellwig Acked-by: Johannes Weiner --- fs/hfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/hfs/inode.c b/fs/hfs/inode.c index c4526f16355d54..16466a5e88b44b 100644 --- a/fs/hfs/inode.c +++ b/fs/hfs/inode.c @@ -173,12 +173,12 @@ const struct address_space_operations hfs_aops = { .dirty_folio = block_dirty_folio, .invalidate_folio = block_invalidate_folio, .read_folio = hfs_read_folio, - .writepage = hfs_writepage, .write_begin = hfs_write_begin, .write_end = generic_write_end, .bmap = hfs_bmap, .direct_IO = hfs_direct_IO, .writepages = hfs_writepages, + .migrate_folio = buffer_migrate_folio, }; /* From patchwork Fri Dec 2 10:26:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13062586 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 59B64C47088 for ; Fri, 2 Dec 2022 10:27:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233344AbiLBK1P (ORCPT ); Fri, 2 Dec 2022 05:27:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233384AbiLBK1G (ORCPT ); Fri, 2 Dec 2022 05:27:06 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71FCDCA783; Fri, 2 Dec 2022 02:27:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=Y5m0F6Pyvv6Ear4bOX/of/SNS6Ys875CaEmxQ7Nl5xY=; b=Dq2jBfetFtoC66mXgk3+Xi4fJB OTRUGmBgVVpn1WO6TuOtU0AvCG7tltCOVBprltqtRo0PhfqAR8CZlF+NoEYBsEW2Tfi23xSxmP4wd ZsjsuwuUAXvUD13OJKFPZDIiCzUociRfJ0XicdWQbJmVrYMpYudWbWBMrDTBmv8TSc+s2xzAHENgd Wr5Blr873CIIAO+BgZ/IU+xMnGLdir5vOnE2G64KSxlCvzT2SAvcP9MNleg60o6xMcFVr50vr+xOZ vsJs5T3nX0hj1/xsaid0ChvYBqR62W97UI9prrX8QkRtZMVWGPJvqqiD1fbD3ClunUd23iQtM9z8S mZnZMvXw==; Received: from [2001:4bb8:192:26e7:bcd3:7e81:e7de:56fd] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1p13Fy-00FQzp-DD; Fri, 02 Dec 2022 10:26:59 +0000 From: Christoph Hellwig To: Andrew Morton , Namjae Jeon , Sungjong Seo , Jan Kara , OGAWA Hirofumi , Mikulas Patocka , Dave Kleikamp , Bob Copeland Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, jfs-discussion@lists.sourceforge.net, linux-karma-devel@lists.sourceforge.net, linux-mm@kvack.org, Johannes Weiner Subject: [PATCH 4/7] hfsplus: remove ->writepage Date: Fri, 2 Dec 2022 11:26:41 +0100 Message-Id: <20221202102644.770505-5-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221202102644.770505-1-hch@lst.de> References: <20221202102644.770505-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org ->writepage is a very inefficient method to write back data, and only used through write_cache_pages or a a fallback when no ->migrate_folio method is present. Set ->migrate_folio to the generic buffer_head based helper, and stop wiring up ->writepage for hfsplus_aops. Signed-off-by: Christoph Hellwig Acked-by: Johannes Weiner --- fs/hfsplus/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c index aeab83ed1c9c6e..d6572ad2407a7c 100644 --- a/fs/hfsplus/inode.c +++ b/fs/hfsplus/inode.c @@ -170,12 +170,12 @@ const struct address_space_operations hfsplus_aops = { .dirty_folio = block_dirty_folio, .invalidate_folio = block_invalidate_folio, .read_folio = hfsplus_read_folio, - .writepage = hfsplus_writepage, .write_begin = hfsplus_write_begin, .write_end = generic_write_end, .bmap = hfsplus_bmap, .direct_IO = hfsplus_direct_IO, .writepages = hfsplus_writepages, + .migrate_folio = buffer_migrate_folio, }; const struct dentry_operations hfsplus_dentry_operations = { From patchwork Fri Dec 2 10:26:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13062588 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE826C4332F for ; Fri, 2 Dec 2022 10:27:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233372AbiLBK1V (ORCPT ); Fri, 2 Dec 2022 05:27:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233394AbiLBK1J (ORCPT ); Fri, 2 Dec 2022 05:27:09 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FAF126AC0; Fri, 2 Dec 2022 02:27:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=mbvlyXxWhO9WFxugvmMSJQGn9fzMBZ852OGR/GsDnBQ=; b=INC7W8kcASEs2+FQI6tK+fkYe7 FVLv5J6Yt9ZchoTmC3IrWcFjNI8P8nW/kfVnPT8z4afsigc0DyzXO/8jHJO4Lb+ZG3fJnolV4DQRY IAUlwenbG5qLTeP0d/+f+FXyW/PFBt2gXZ6V7In4xC82yItOO63+eSh9MshNuHBeHLlaZoxr2Wtg7 h0UuhIkcrY6s4liyPpdjMHfpFvKmXU3TZC0Z8kursgybQFsK42q7alrWlDNMR9loGPNZPTlr5PC3X 0N2gBn0iRz0FtIqvqeAeyX0/yD7W1p+duoifLZEIOu0sc7+LbZHHQjXMm8l5LgxIqc7RrHLLYUWvZ YtODIeZA==; Received: from [2001:4bb8:192:26e7:bcd3:7e81:e7de:56fd] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1p13G1-00FR1N-A5; Fri, 02 Dec 2022 10:27:01 +0000 From: Christoph Hellwig To: Andrew Morton , Namjae Jeon , Sungjong Seo , Jan Kara , OGAWA Hirofumi , Mikulas Patocka , Dave Kleikamp , Bob Copeland Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, jfs-discussion@lists.sourceforge.net, linux-karma-devel@lists.sourceforge.net, linux-mm@kvack.org, Johannes Weiner Subject: [PATCH 5/7] hpfs: remove ->writepage Date: Fri, 2 Dec 2022 11:26:42 +0100 Message-Id: <20221202102644.770505-6-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221202102644.770505-1-hch@lst.de> References: <20221202102644.770505-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org ->writepage is a very inefficient method to write back data, and only used through write_cache_pages or a a fallback when no ->migrate_folio method is present. Set ->migrate_folio to the generic buffer_head based helper, and remove the ->writepage implementation. Signed-off-by: Christoph Hellwig Acked-by: Johannes Weiner --- fs/hpfs/file.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/fs/hpfs/file.c b/fs/hpfs/file.c index f7547a62c81f6a..88952d4a631e6c 100644 --- a/fs/hpfs/file.c +++ b/fs/hpfs/file.c @@ -163,11 +163,6 @@ static int hpfs_read_folio(struct file *file, struct folio *folio) return mpage_read_folio(folio, hpfs_get_block); } -static int hpfs_writepage(struct page *page, struct writeback_control *wbc) -{ - return block_write_full_page(page, hpfs_get_block, wbc); -} - static void hpfs_readahead(struct readahead_control *rac) { mpage_readahead(rac, hpfs_get_block); @@ -248,12 +243,12 @@ const struct address_space_operations hpfs_aops = { .dirty_folio = block_dirty_folio, .invalidate_folio = block_invalidate_folio, .read_folio = hpfs_read_folio, - .writepage = hpfs_writepage, .readahead = hpfs_readahead, .writepages = hpfs_writepages, .write_begin = hpfs_write_begin, .write_end = hpfs_write_end, - .bmap = _hpfs_bmap + .bmap = _hpfs_bmap, + .migrate_folio = buffer_migrate_folio, }; const struct file_operations hpfs_file_ops = From patchwork Fri Dec 2 10:26:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13062589 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10781C4332F for ; Fri, 2 Dec 2022 10:27:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233358AbiLBK1X (ORCPT ); Fri, 2 Dec 2022 05:27:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232996AbiLBK1L (ORCPT ); Fri, 2 Dec 2022 05:27:11 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E11F926AC0; Fri, 2 Dec 2022 02:27:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=fqr9TW+rT8ValeXLVFOQSDtrNHXsSl7u56JKe2jXztI=; b=TWvEKxe1hgaqaar0S3SdimrN6x CCDVFmRGCM1ggNXnG5FjJDcpDBjli7i4LD/ks900zzcj1gTmSm5Gec8vrJIJc0FAdbCn/oPYdx6Zt T05aBcXid3fSpkehDIgr1ssY1DY7NeoCM6NTgkF8Vti6BYts/hcAO9azLBFkGAkL3ItNAnApvXXyu BZ5KwzzO58NFGMAbVIIZUWGmHki7aOK6zFx1KMBI5NFt2H8SHg5srWFPDo3CeaHU/T3xDokLMAjJ4 ueFDVhrzFEEHXF9JZhYku8gRMyvySJf07CcRonjhN0xseuAoTI2jGFX2ZwGLSf2ZqyQh893fl2rar sG+xo6dA==; Received: from [2001:4bb8:192:26e7:bcd3:7e81:e7de:56fd] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1p13G4-00FR2o-7h; Fri, 02 Dec 2022 10:27:04 +0000 From: Christoph Hellwig To: Andrew Morton , Namjae Jeon , Sungjong Seo , Jan Kara , OGAWA Hirofumi , Mikulas Patocka , Dave Kleikamp , Bob Copeland Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, jfs-discussion@lists.sourceforge.net, linux-karma-devel@lists.sourceforge.net, linux-mm@kvack.org, Dave Kleikamp , Johannes Weiner Subject: [PATCH 6/7] jfs: remove ->writepage Date: Fri, 2 Dec 2022 11:26:43 +0100 Message-Id: <20221202102644.770505-7-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221202102644.770505-1-hch@lst.de> References: <20221202102644.770505-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org ->writepage is a very inefficient method to write back data, and only used through write_cache_pages or a a fallback when no ->migrate_folio method is present. Set ->migrate_folio to the generic buffer_head based helper, and remove the ->writepage implementation. Signed-off-by: Christoph Hellwig Acked-by: Dave Kleikamp Acked-by: Johannes Weiner --- fs/jfs/inode.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/fs/jfs/inode.c b/fs/jfs/inode.c index d1ec920aa030a8..8ac10e39605081 100644 --- a/fs/jfs/inode.c +++ b/fs/jfs/inode.c @@ -264,11 +264,6 @@ int jfs_get_block(struct inode *ip, sector_t lblock, return rc; } -static int jfs_writepage(struct page *page, struct writeback_control *wbc) -{ - return block_write_full_page(page, jfs_get_block, wbc); -} - static int jfs_writepages(struct address_space *mapping, struct writeback_control *wbc) { @@ -355,12 +350,12 @@ const struct address_space_operations jfs_aops = { .invalidate_folio = block_invalidate_folio, .read_folio = jfs_read_folio, .readahead = jfs_readahead, - .writepage = jfs_writepage, .writepages = jfs_writepages, .write_begin = jfs_write_begin, .write_end = jfs_write_end, .bmap = jfs_bmap, .direct_IO = jfs_direct_IO, + .migrate_folio = buffer_migrate_folio, }; /* From patchwork Fri Dec 2 10:26:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13062590 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2235C4167B for ; Fri, 2 Dec 2022 10:27:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231730AbiLBK10 (ORCPT ); Fri, 2 Dec 2022 05:27:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233276AbiLBK1O (ORCPT ); Fri, 2 Dec 2022 05:27:14 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35515CCFFE; Fri, 2 Dec 2022 02:27:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=ywtjhPQcgOlGzjWc3Exa4ySbtdQqSrPXJutgQizLuUo=; b=HXq5AdxV/JLPsHwBXHtl6u2lb/ O7u7n/5ATf1Y7czUryBELG+fWD6o77IRDBXirmaK99zd0OnuWoCsFD0vvB7MBwGPmX+UfXJ6JYnHe 60yXoyn70JPY2g2sOi+iZ6861z+gHmCSZj06a3POXM4lZjepl0cQW4c1s99+y0pdCmW36KUOMkD4l xEH4Q9edKiH5Kyi92aSET/9e7N2etBpDpDi60GkmsRcId338irWzzNt/ZjxGhj83RHXOQC9rfYLSX 2hZ27PRsmWgyB65AhiG12LwsukHkkFy+mJ6XLTA/KuMEgryP5l2NB3YI2C6BRf2mEyCfDxmY5jCLd MLpoafjg==; Received: from [2001:4bb8:192:26e7:bcd3:7e81:e7de:56fd] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1p13G7-00FR4c-4r; Fri, 02 Dec 2022 10:27:07 +0000 From: Christoph Hellwig To: Andrew Morton , Namjae Jeon , Sungjong Seo , Jan Kara , OGAWA Hirofumi , Mikulas Patocka , Dave Kleikamp , Bob Copeland Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, jfs-discussion@lists.sourceforge.net, linux-karma-devel@lists.sourceforge.net, linux-mm@kvack.org, Johannes Weiner Subject: [PATCH 7/7] omfs: remove ->writepage Date: Fri, 2 Dec 2022 11:26:44 +0100 Message-Id: <20221202102644.770505-8-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221202102644.770505-1-hch@lst.de> References: <20221202102644.770505-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org ->writepage is a very inefficient method to write back data, and only used through write_cache_pages or a a fallback when no ->migrate_folio method is present. Set ->migrate_folio to the generic buffer_head based helper, and remove the ->writepage implementation. Signed-off-by: Christoph Hellwig Acked-by: Bob Copeland Acked-by: Johannes Weiner --- fs/omfs/file.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/fs/omfs/file.c b/fs/omfs/file.c index fa7fe2393ff686..3a5b4b88a58385 100644 --- a/fs/omfs/file.c +++ b/fs/omfs/file.c @@ -294,11 +294,6 @@ static void omfs_readahead(struct readahead_control *rac) mpage_readahead(rac, omfs_get_block); } -static int omfs_writepage(struct page *page, struct writeback_control *wbc) -{ - return block_write_full_page(page, omfs_get_block, wbc); -} - static int omfs_writepages(struct address_space *mapping, struct writeback_control *wbc) { @@ -375,10 +370,10 @@ const struct address_space_operations omfs_aops = { .invalidate_folio = block_invalidate_folio, .read_folio = omfs_read_folio, .readahead = omfs_readahead, - .writepage = omfs_writepage, .writepages = omfs_writepages, .write_begin = omfs_write_begin, .write_end = generic_write_end, .bmap = omfs_bmap, + .migrate_folio = buffer_migrate_folio, };