From mboxrd@z Thu Jan 1 00:00:00 1970 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 BA800C7EE24 for ; Wed, 31 May 2023 07:50:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234782AbjEaHuq (ORCPT ); Wed, 31 May 2023 03:50:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234674AbjEaHup (ORCPT ); Wed, 31 May 2023 03:50:45 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0AD19184; Wed, 31 May 2023 00:50:39 -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=jJPnuBiGR2n19tJuPZry0IPJFMxKuU2HE9kGOltuLHo=; b=Yxz+IrdkKtwMH/+W2AIA2hDZP4 BW5WTZg+WZNHKy3JdbJPtWPFSxxjvV7oKc/411kcCRb9vJc5Tgwwl2MC54UyhtTNP8AJiFnuvDNLq AUCRCGHVDrHGJkWLf0zoL+JSbHNhCHI1UE67VK40mWeqaHCDGfjIMAJUwG8G6/QgSe6r9G5DBaLEf 7vG6ItR/Eis4NmzuGqR5c+I5TZ0oDNlIELQLsHe1nW8KFDAHKsC6LwPdkMaTGR596PM12/6U1m8D+ pKRYTe/p9z9FWdXtiH1aZFo34pPLBdl7/HyVJdqScDZH9+o2LIxDTa9hqlz+YuagKbcV8C9VX+fwj 1JItH9GA==; Received: from [2001:4bb8:182:6d06:f5c3:53d7:b5aa:b6a7] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1q4GbF-00GVmb-0H; Wed, 31 May 2023 07:50:29 +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 v3 (full series now) Date: Wed, 31 May 2023 09:50:14 +0200 Message-Id: <20230531075026.480237-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 Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org [Sorry for the previous attempt that stopped at patch 8] 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 v2: - stick to the existing behavior of returning a short write if the buffer fallback write or sync fails - bring back "fuse: use direct_write_fallback" which accidentally got lost in v2 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 | 4 - fs/gfs2/file.c | 6 -- fs/iomap/buffered-io.c | 9 ++- fs/iomap/direct-io.c | 88 ++++++++++++--------------------- 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 | 5 - include/linux/pagemap.h | 4 + include/linux/sched.h | 3 - mm/filemap.c | 126 ++++++++++++++++++++++++++---------------------- 19 files changed, 125 insertions(+), 195 deletions(-)