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=-16.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 8A773C433C1 for ; Tue, 23 Mar 2021 11:53:41 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 11E79619B1 for ; Tue, 23 Mar 2021 11:53:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 11E79619B1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 79A866B0173; Tue, 23 Mar 2021 07:53:38 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 74AEB6B0175; Tue, 23 Mar 2021 07:53:38 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5EBDE6B0176; Tue, 23 Mar 2021 07:53:38 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0250.hostedemail.com [216.40.44.250]) by kanga.kvack.org (Postfix) with ESMTP id 42F886B0173 for ; Tue, 23 Mar 2021 07:53:38 -0400 (EDT) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 0625A180AD830 for ; Tue, 23 Mar 2021 11:53:38 +0000 (UTC) X-FDA: 77950979316.04.196A9D6 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by imf24.hostedemail.com (Postfix) with ESMTP id 2FA96A0000FA for ; Tue, 23 Mar 2021 11:53:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616500416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aA2iKoiePqQtpqGhhTijWBU3ANydJrmSdc9O2oPlqu4=; b=NuO4lyHzj8TMV5zCP/PHEEtJzhUQwBvxtVLjS3SNAniGZ08fyrrYeVpWPkOt/VK5jZQlrl FPjo6o9Y5iFsYYtE/qQlcAHPKKDd91M3qKLF1Rkrg0sBCD3IhsprZ5zeZ3NBnCZzhGWWyf muGnspShbAmtZhBHv6fBqUxr81wD7Sc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-398-4XzQj2goMvGi9a12EKrHHw-1; Tue, 23 Mar 2021 07:53:32 -0400 X-MC-Unique: 4XzQj2goMvGi9a12EKrHHw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 04F1D101371D; Tue, 23 Mar 2021 11:53:31 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-112-58.rdu2.redhat.com [10.10.112.58]) by smtp.corp.redhat.com (Postfix) with ESMTP id D3D582C168; Tue, 23 Mar 2021 11:53:23 +0000 (UTC) Subject: [PATCH 0/3] cachefiles, afs: mm wait fixes From: David Howells To: linux-cachefs@redhat.com, linux-afs@lists.infradead.org Cc: Christoph Hellwig , "Matthew Wilcox (Oracle)" , linux-mm@kvack.org, dhowells@redhat.com, "Matthew Wilcox (Oracle)" , Christoph Hellwig , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 23 Mar 2021 11:53:22 +0000 Message-ID: <161650040278.2445805.7652115256944270457.stgit@warthog.procyon.org.uk> User-Agent: StGit/0.23 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Stat-Signature: s8dbhmz6781eaj41e5ymu9jfeqfd3uzk X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 2FA96A0000FA Received-SPF: none (redhat.com>: No applicable sender policy available) receiver=imf24; identity=mailfrom; envelope-from=""; helo=us-smtp-delivery-124.mimecast.com; client-ip=63.128.21.124 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1616500415-667291 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Here are some patches to fix page waiting-related issues in cachefiles and afs[1]: (1) In cachefiles, remove the use of the wait_bit_key struct to access something that's actually in wait_page_key format. The proper struct is now available in the header, so that should be used instead. (2) Add a proper wait function for waiting killably on the page writeback flag. This includes a recent bugfix here (presumably commit c2407cf7d22d0c0d94cf20342b3b8f06f1d904e7). (3) In afs, use the function added in (2) rather than using wait_on_page_bit_killable() which doesn't have the aforementioned bugfix. Note that I modified this to work with the upstream code where the page pointer isn't cached in a local variable. The patches can be found here: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=afs-fixes David Link: https://lore.kernel.org/r/20210320054104.1300774-1-willy@infradead.org[1] --- Matthew Wilcox (Oracle) (3): fs/cachefiles: Remove wait_bit_key layout dependency mm/writeback: Add wait_on_page_writeback_killable afs: Use wait_on_page_writeback_killable fs/afs/write.c | 3 +-- include/linux/pagemap.h | 1 + mm/page-writeback.c | 16 ++++++++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-)