Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5338720rwd; Tue, 23 May 2023 23:39:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4mmodWomcHe9PEKDyyCRC/dNqvk0nOCWYjr9VXcgtW/g6DBwtFVWQfM5wonG6+9jB9qy5z X-Received: by 2002:a05:6a20:1611:b0:10c:d33a:5c50 with SMTP id l17-20020a056a20161100b0010cd33a5c50mr3069056pzj.36.1684910399335; Tue, 23 May 2023 23:39:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684910399; cv=none; d=google.com; s=arc-20160816; b=qMu1J0XBMJnbNP+6oBnkXKqtfvDnPMja0k4mm8F+mSOfM57qAo2lDojhkiAVHfLVK4 8eXdLUYdD5+0X53xycLJQu9gzx7Gw8A9+MtKwaTVyGxmMaW1hETj61tKGEAa2Al04qon mg5bWWo5e0OggDkfKOLQlTNtW6FR+KekM+5msHMirMAzlJ1QZmlpf7j9caEBkiR3Fk1T 4BDf4a7egChWKRwTA6NigUMe1bDOejl08DZHuhwVREF+MXcDkrQQa5yyYvY3jeQykDHH oCyJx371+xG7jM3TlEoGVn1yhD0YtNYS5EZ159NaqGCMwLTTgdyBkVSzfapnnVlTemWa Xdiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=K9OEPJ2y3KxK8hidKUbR1VTmLyisnYu63lotaUlNLQ0=; b=H3JdcfB4sTAGflo8KJB23JCw+wRK73aRxW0WRkdlrh+oqDLbDnVmCK/3UvRwUcEkoU UMAMaXGDC52VKsUn/kNxWp7ZPQNc76WzuBZVg73hz+s5Q36Sw5qIx978tZcU0dRcB6jB uw5uMHbYG8otCJAVcXidFj3qud1OWPBzxVO4hGOVYm9vZVfqPApl/8gpB6FaPaukaFrC wVr2ZHzJlrYQiLQx4y5jpxYTEA81OeaitIuZRBv+wJMibybNp6ae2MhDVUNM/pL3j1HM KMCtBcNcPNLRDb4v6rHOUClXrFIwVvHrGdVfnMq/+IPWUQmoUjtjm8JjKTlMed8Zptz5 VnuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=CFiG2Q5L; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v15-20020a63bf0f000000b005303c1de315si3309714pgf.853.2023.05.23.23.39.46; Tue, 23 May 2023 23:39:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=CFiG2Q5L; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239725AbjEXGih (ORCPT + 99 others); Wed, 24 May 2023 02:38:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239744AbjEXGi0 (ORCPT ); Wed, 24 May 2023 02:38:26 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95EFE1A2; Tue, 23 May 2023 23:38:25 -0700 (PDT) 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:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=K9OEPJ2y3KxK8hidKUbR1VTmLyisnYu63lotaUlNLQ0=; b=CFiG2Q5L3DvHhEcpxN6g3y+JyV +tQ8c9Awg3kiw/SwdIx0p5BORgK7UZGke6R3QxRMAkvW7r5o3wBvKl28CD/3dL4iSHIzO0QFZImSA X42haKCpdJPr0YrkOlcUG1HqZmGRgUAtbY/8CVMLUpxL6lYFR6L5N6WnqZH8jxu95M4+6MoMOsxbC r2rzMa2jnwltxxtusffO4jQuetKUyibfCw6hr4zFn5VIwRRJJZjd67gnb959dnBOHCyQg5CB9W8KM Vr07iDJ7eGFgC82+sQ5mjuwn3tWaNc3aheOsZeGE8wJIfEWME+IpDNCyhXoFN/JwELVRRZDnqh6tr 5QD3qMJg==; Received: from [2001:4bb8:188:23b2:cbb8:fcea:a637:5089] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1q1i8T-00CVeK-1p; Wed, 24 May 2023 06:38:13 +0000 From: Christoph Hellwig To: Matthew Wilcox Cc: Jens Axboe , Xiubo Li , Ilya Dryomov , Alexander Viro , Christian Brauner , "Theodore Ts'o" , Jaegeuk Kim , Chao Yu , Miklos Szeredi , Andreas Gruenbacher , "Darrick J. Wong" , Trond Myklebust , Anna Schumaker , Damien Le Moal , Andrew Morton , linux-block@vger.kernel.org, ceph-devel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, cluster-devel@redhat.com, linux-xfs@vger.kernel.org, linux-nfs@vger.kernel.org, linux-mm@kvack.org Subject: cleanup the filemap / direct I/O interaction v2 Date: Wed, 24 May 2023 08:37:59 +0200 Message-Id: <20230524063810.1595778-1-hch@lst.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Hi all, this series cleans up some of the generic write helper calling conventions and the page cache writeback / invalidation for direct I/O. This is a spinoff from the no-bufferhead kernel project, for which we'll want to an use iomap based buffered write path in the block layer. Changes since v1: - remove current->backing_dev_info entirely - fix the pos/end calculation in direct_write_fallback - rename kiocb_invalidate_post_write to kiocb_invalidate_post_direct_write - typo fixes diffstat: block/fops.c | 18 ---- fs/btrfs/file.c | 6 - fs/ceph/file.c | 6 - fs/direct-io.c | 10 -- fs/ext4/file.c | 11 -- fs/f2fs/file.c | 3 fs/fuse/file.c | 36 +++----- fs/gfs2/file.c | 6 - fs/iomap/buffered-io.c | 9 +- fs/iomap/direct-io.c | 88 ++++++++------------- fs/libfs.c | 36 ++++++++ fs/nfs/file.c | 6 - fs/ntfs/file.c | 2 fs/ntfs3/file.c | 3 fs/xfs/xfs_file.c | 6 - fs/zonefs/file.c | 4 include/linux/fs.h | 7 - include/linux/pagemap.h | 4 include/linux/sched.h | 3 mm/filemap.c | 194 +++++++++++++++++++++--------------------------- 20 files changed, 193 insertions(+), 265 deletions(-)