From patchwork Fri Jul 10 15:23:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Gruenbacher X-Patchwork-Id: 11656841 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 66D0A92A for ; Fri, 10 Jul 2020 15:23:40 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1235E207D0 for ; Fri, 10 Jul 2020 15:23:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="iY4geAz9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1235E207D0 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 10C678D0003; Fri, 10 Jul 2020 11:23:39 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 0960D8D0001; Fri, 10 Jul 2020 11:23:39 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E9FF88D0003; Fri, 10 Jul 2020 11:23:38 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0112.hostedemail.com [216.40.44.112]) by kanga.kvack.org (Postfix) with ESMTP id D10698D0001 for ; Fri, 10 Jul 2020 11:23:38 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 39A202DFC for ; Fri, 10 Jul 2020 15:23:38 +0000 (UTC) X-FDA: 77022535716.17.maid18_3c0f7e526ecf Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin17.hostedemail.com (Postfix) with ESMTP id EE8B3180D018B for ; Fri, 10 Jul 2020 15:23:37 +0000 (UTC) X-Spam-Summary: 1,0,0,,d41d8cd98f00b204,agruenba@redhat.com,,RULES_HIT:30054:30070,0,RBL:205.139.110.120:@redhat.com:.lbl8.mailshell.net-66.10.201.10 62.18.0.100;04y84kqxf44669s1njpixfqmjf9acoc6n6dp34kztru81m9764cpddkipajs391.4u7xdiyupyru5hd1bz93rhzm8w7re34m5xtbtpzsf9q9s63kq4dbyzbey9pxthg.c-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:ft,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:25,LUA_SUMMARY:none X-HE-Tag: maid18_3c0f7e526ecf X-Filterd-Recvd-Size: 4025 Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by imf07.hostedemail.com (Postfix) with ESMTP for ; Fri, 10 Jul 2020 15:23:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594394616; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=9XYubToR8gPoZKz3xGIe2POziR6ztexd5h4TTQatCvU=; b=iY4geAz91oK9zFnvVqaj5KuWSt9HgeHH4m1q6MGtZZk962dc3FTCkLT1etAzphsKygngr3 pcNPljI+kPslT60pXv3ujvFu0u1TePIZciDWXpf0K8WaQzDvJ7EIEtvYAQv9yiYNNRQpNI pERhWsLBrdXZFihTWtXCt9p6yMdiz4E= 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-52-7OaH5TUHNFiPDTpOCZ2kMA-1; Fri, 10 Jul 2020 11:23:34 -0400 X-MC-Unique: 7OaH5TUHNFiPDTpOCZ2kMA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BE051106B243; Fri, 10 Jul 2020 15:23:32 +0000 (UTC) Received: from max.home.com (unknown [10.40.192.179]) by smtp.corp.redhat.com (Postfix) with ESMTP id 300715C1BD; Fri, 10 Jul 2020 15:23:26 +0000 (UTC) From: Andreas Gruenbacher To: Linus Torvalds Cc: Matthew Wilcox , Dave Chinner , Jens Axboe , cluster-devel@redhat.com, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andreas Gruenbacher Subject: [GIT PULL] Fix gfs2 readahead deadlocks Date: Fri, 10 Jul 2020 17:23:24 +0200 Message-Id: <20200710152324.1690683-1-agruenba@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Rspamd-Queue-Id: EE8B3180D018B X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 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: Hi Linus, could you please pull the following two commits to fix the gfs2 deadlocks resulting from the conversion to ->readahead in commit d4388340ae0b ("fs: convert mpage_readpages to mpage_readahead")? The first commit adds a new IOCB_NOIO flag to generic_file_read_iter. In the previous version [1] which you've acked [2] and Matthew Willcox has reviewed [3], ->readpage could still be called even when IOCB_NOIO was set, so I've added an additional check above that call and I've dropped the ack and reviewed-by tags. In addition, bit 8 is now left unused for the new IOCB_WAITQ flag in the block tree per Jens Axboe's request. [1] https://lore.kernel.org/linux-fsdevel/CAHc6FU6LmR7m_8UHmB_77jUpYNo-kgCZ-1YTLqya-PPqvvBy7Q@mail.gmail.com/ [2] https://lore.kernel.org/linux-fsdevel/CAHk-=whBk-jYM6_HBXbu6+gs7Gtw3hWg4iSLncQ0QTwShm6Jaw@mail.gmail.com/ [3] https://lore.kernel.org/linux-fsdevel/20200703114108.GE25523@casper.infradead.org/ Thanks a lot, Andreas The following changes since commit dcb7fd82c75ee2d6e6f9d8cc71c52519ed52e258: Linux 5.8-rc4 (2020-07-05 16:20:22 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git tags/gfs2-v5.8-rc4.fixes for you to fetch changes up to 20f829999c38b18e3d17f9e40dea3a28f721fac4: gfs2: Rework read and page fault locking (2020-07-07 23:40:12 +0200) ---------------------------------------------------------------- Fix gfs2 readahead deadlocks ---------------------------------------------------------------- Andreas Gruenbacher (2): fs: Add IOCB_NOIO flag for generic_file_read_iter gfs2: Rework read and page fault locking fs/gfs2/aops.c | 45 +-------------------------------------------- fs/gfs2/file.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++-- include/linux/fs.h | 1 + mm/filemap.c | 23 +++++++++++++++++++++-- 4 files changed, 73 insertions(+), 48 deletions(-)