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 X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63E61C433DF for ; Fri, 9 Oct 2020 14:33:37 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F32462226B for ; Fri, 9 Oct 2020 14:33:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="tIK+QnSj"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="Dq9QSGge" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F32462226B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=8jpeqN1Ew1EXcMhNWH6rykbqELSwdX2Uvibmwin/s2s=; b=tIK+QnSjIxNhfO/0IDPSGNRjrX nmHMWv/IfYBw9VZOBpwATH8jR/UXLryBOH6h9uwXiO5cToWsmc5gv1srX18+P6pYjNmJj2loyL3gT letgplawJ6lfEqnX7+IzTN/ToEyI0bPteAxXep/oRElUiSH71vliG6nSXk+GY+bo+u9C2g+cAuuHi 9XZHp1FCMQK6qlrxAG9lNEo9XgFYGnjrHJ+JtKN9waAgWlTqaxJVJH4anpDZkN6Bf9EbBG00rUYzF oJm5jmxKgYOLoNkScEpXedFk31aZUijueUQx6DiNRSuCCH/3n32c8AiKaJ+SQ6m1GzPp0JjxzWAYr /6gzkNnw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kQtRm-00048O-GJ; Fri, 09 Oct 2020 14:32:38 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kQtQM-0003MU-Tr; Fri, 09 Oct 2020 14:31:10 +0000 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=GeyZChjU8Oj99Pp+9Mi0xQ6/HJ6pKkZb0kZT9pF9iBE=; b=Dq9QSGgeteBqpVdE+hBXk+LzdL I4AVG5F9x8v0QGJ5MRwNuBqwfxHyMo/Io8eUCPuH8g6FiNs6SFWDDC/LaxdgLL9IRmO378buAs0Nd /9fFuziR9D8ptZW2K48QSlR0cl+tAHJWxW9OWT6KzQpFo64yaxYXBs+NwGFwnEH1szT9X5UKIDv9a I4IgyXpNyes45ny+RuOTSQ/+VIMqtrQ/O+Dt6tEE5DLIEE5Bys7Feal0RaDC9hjliaOa48W9e4I15 evQwTi1i6I1cP89eget5ZT673r2Hl0R5jp619lb54zyWDhXlpnWQV50yOUzipONAoMNyZ2lMu4spW D5naUVtg==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kQtQI-0005uQ-A9; Fri, 09 Oct 2020 14:31:06 +0000 From: "Matthew Wilcox (Oracle)" To: linux-fsdevel@vger.kernel.org Subject: [PATCH v2 00/16] Allow readpage to return a locked page Date: Fri, 9 Oct 2020 15:30:48 +0100 Message-Id: <20201009143104.22673-1-willy@infradead.org> X-Mailer: git-send-email 2.21.3 MIME-Version: 1.0 X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-cifs@vger.kernel.org, Richard Weinberger , ecryptfs@vger.kernel.org, linux-um@lists.infradead.org, linux-kernel@vger.kernel.org, "Matthew Wilcox \(Oracle\)" , linux-xfs@vger.kernel.org, linux-mm@kvack.org, linux-mtd@lists.infradead.org, v9fs-developer@lists.sourceforge.net, ceph-devel@vger.kernel.org, linux-afs@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org Linus recently made the page lock more fair. That means that the old pattern where we returned from ->readpage with the page unlocked and then attempted to re-lock it will send us to the back of the queue for this page's lock. A further benefit is that a synchronous readpage implementation allows us to return an error to someone who might actually care about it. There's no need to SetPageError, but I don't want to learn about how a dozen filesystems handle I/O errors (hint: they're all different), so I have not attempted to change that. Except for iomap. Ideally all filesystems would return from ->readpage with the page Uptodate and Locked, but it's a bit painful to convert all the asynchronous readpage implementations to synchronous. The first 14 filesystems converted are already synchronous. The last two patches convert iomap to synchronous readpage. This patchset is against iomap-for-next. Andrew, it would make merging the THP patchset much easier if you could merge at least the first patch adding AOP_UPDATED_PAGE during the merge window which opens next week. Matthew Wilcox (Oracle) (16): mm: Add AOP_UPDATED_PAGE return value mm: Inline wait_on_page_read into its one caller 9p: Tell the VFS that readpage was synchronous afs: Tell the VFS that readpage was synchronous ceph: Tell the VFS that readpage was synchronous cifs: Tell the VFS that readpage was synchronous cramfs: Tell the VFS that readpage was synchronous ecryptfs: Tell the VFS that readpage was synchronous fuse: Tell the VFS that readpage was synchronous hostfs: Tell the VFS that readpage was synchronous jffs2: Tell the VFS that readpage was synchronous ubifs: Tell the VFS that readpage was synchronous udf: Tell the VFS that readpage was synchronous vboxsf: Tell the VFS that readpage was synchronous iomap: Inline iomap_iop_set_range_uptodate into its one caller iomap: Make readpage synchronous Documentation/filesystems/locking.rst | 7 +- Documentation/filesystems/vfs.rst | 21 ++++-- fs/9p/vfs_addr.c | 6 +- fs/afs/file.c | 3 +- fs/ceph/addr.c | 9 +-- fs/cifs/file.c | 8 ++- fs/cramfs/inode.c | 5 +- fs/ecryptfs/mmap.c | 11 ++-- fs/fuse/file.c | 2 + fs/hostfs/hostfs_kern.c | 2 + fs/iomap/buffered-io.c | 92 ++++++++++++++------------- fs/jffs2/file.c | 6 +- fs/ubifs/file.c | 16 +++-- fs/udf/file.c | 3 +- fs/vboxsf/file.c | 2 + include/linux/fs.h | 5 ++ mm/filemap.c | 33 +++++----- 17 files changed, 135 insertions(+), 96 deletions(-) -- 2.28.0 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/