From patchwork Mon Apr 24 05:49:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13221656 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4986EC77B61 for ; Mon, 24 Apr 2023 05:49:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BA0846B0078; Mon, 24 Apr 2023 01:49:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AFF906B007B; Mon, 24 Apr 2023 01:49:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9A0206B007D; Mon, 24 Apr 2023 01:49:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 895B26B0078 for ; Mon, 24 Apr 2023 01:49:53 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 52B7C1C5D56 for ; Mon, 24 Apr 2023 05:49:53 +0000 (UTC) X-FDA: 80715208266.04.838AA9B Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf04.hostedemail.com (Postfix) with ESMTP id B32A640009 for ; Mon, 24 Apr 2023 05:49:51 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=QAuUTMs9; spf=none (imf04.hostedemail.com: domain of BATV+e16e2fc4419b117693a1+7183+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+e16e2fc4419b117693a1+7183+infradead.org+hch@bombadil.srs.infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1682315391; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=bS05QMoD6j6YpGz1rHCHZCzEMuRJxwEBMPELLNqMvVM=; b=g4r4dFAxHhQ8t5c2DQdp33pKKVw0tQT5mXZVJo3OzB/EO782bIPwVyFAAzUK8EZYcLogU/ jJoCkQPK9VHISpk7iobinfoWZHLxP6u1oRTTH3mgoKsY+uxDeM172R1N3ej6XaQ/s4MhyJ 4BwDb2rmhag8TpItuKHPmCQFRsG3NN8= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1682315391; a=rsa-sha256; cv=none; b=Uw7oGTjqHwDgi9tei/OrF16RxBSNZXxVocdGIVJnCiMrA+wkUTj7hsSrGyFchmHvhjkG6v 4bgcxm37KM+ZHoulalrSm8L+bP8enOuenVRM2KcJBX8cyNAeXYhB5GxRbR09KbBqEW0r46 ZId6FW/07dEmj+vC1dNkCUw3nOvOln8= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=QAuUTMs9; spf=none (imf04.hostedemail.com: domain of BATV+e16e2fc4419b117693a1+7183+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+e16e2fc4419b117693a1+7183+infradead.org+hch@bombadil.srs.infradead.org; dmarc=none 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:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=bS05QMoD6j6YpGz1rHCHZCzEMuRJxwEBMPELLNqMvVM=; b=QAuUTMs9c0fPPuxtegrv+eZFd7 m1Lb/Zn2oEdFxGNTL6MyQ1wn8x4GTSTmoDmXSEpvoQtz2+8sgXF6o1xdmIGxAfsSLMFUF2Rdb/QCw QELH8/3nG4bNASqOdAHA35mLeydY1xzz4dUPnNEsh0dTA/um5YWXh/LZcV75W2WYGokrA0cEhf1qA KKw6r1pxS24iVwx30XkH6ewxhXLH1nN6hYHJDiHEFB82PfR4sJADmcttvzNs0seHtisbFo0Bbqa9V n3yxCEfgi9duwfR5Ke4/YsTw+fVVP3Ub8FBS1iXniGGQbGngJEVnnvGoIEv6ORCKaN3u1LbDCqCFv PHlgzFNw==; Received: from [2001:4bb8:189:a74f:e8a5:5f73:6d2:23b8] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1pqp54-00FOuy-17; Mon, 24 Apr 2023 05:49:42 +0000 From: Christoph Hellwig To: Jens Axboe Cc: Miklos Szeredi , "Darrick J. Wong" , Andrew Morton , David Howells , Matthew Wilcox , linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, ceph-devel@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, linux-kernel@vger.kernel.org Subject: [PATCH 04/17] fs: remove emergency_thaw_bdev Date: Mon, 24 Apr 2023 07:49:13 +0200 Message-Id: <20230424054926.26927-5-hch@lst.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230424054926.26927-1-hch@lst.de> References: <20230424054926.26927-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Rspam-User: X-Rspamd-Queue-Id: B32A640009 X-Rspamd-Server: rspam09 X-Stat-Signature: ktnxp3pb3u5jbig9bp3kmhun7dtccbyz X-HE-Tag: 1682315391-690212 X-HE-Meta: U2FsdGVkX184KtzxArHgwsDh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zONKA70kAQqOl3gAGhCOAYOvCv0YvFZgfXswdPQzzgZVfY58Aq9xKHDCrQMB6436HgeIpoNstyt7fhRL7qXtT0p3IMOW3qTurrOB3sQTkrL/xrt3rg+k4K1oGE6FXHPjnaxB/6rXTXdWIzwLW3LcN5QrO2RfTeaHsD/gSVYXoAItAvjR4BeSL2fiFM+gDJthh0sploQksk95uukcpWRee8GhRqv88TzCN16AN1k1LzmQM/FXZugdlB7a5NjjrzVsWDu7mspjNBYZGwYnPZO/AZnSfiWnbW4f5SWIZkgspVx+AA8gzRlLxSzeRgLAsrcIEiPqM9pto7Fj89+9CaBD0jMYjEqfmNqqHgZQ== 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: Fold emergency_thaw_bdev into it's only caller, to prepare for buffer.c to be built only when buffer_head support is enabled. Signed-off-by: Christoph Hellwig --- fs/buffer.c | 6 ------ fs/internal.h | 6 ------ fs/super.c | 4 +++- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/fs/buffer.c b/fs/buffer.c index eb14fbaa7d35f7..58e0007892b1c7 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -563,12 +563,6 @@ static int osync_buffers_list(spinlock_t *lock, struct list_head *list) return err; } -void emergency_thaw_bdev(struct super_block *sb) -{ - while (sb->s_bdev && !thaw_bdev(sb->s_bdev)) - printk(KERN_WARNING "Emergency Thaw on %pg\n", sb->s_bdev); -} - /** * sync_mapping_buffers - write out & wait upon a mapping's "associated" buffers * @mapping: the mapping which wants those buffers written diff --git a/fs/internal.h b/fs/internal.h index dc4eb91a577a80..cad87784eb5e0f 100644 --- a/fs/internal.h +++ b/fs/internal.h @@ -23,16 +23,10 @@ struct mnt_idmap; */ #ifdef CONFIG_BLOCK extern void __init bdev_cache_init(void); - -void emergency_thaw_bdev(struct super_block *sb); #else static inline void bdev_cache_init(void) { } -static inline int emergency_thaw_bdev(struct super_block *sb) -{ - return 0; -} #endif /* CONFIG_BLOCK */ /* diff --git a/fs/super.c b/fs/super.c index 04bc62ab7dfea9..d8f0a28d1850b1 100644 --- a/fs/super.c +++ b/fs/super.c @@ -1026,7 +1026,9 @@ static void do_thaw_all_callback(struct super_block *sb) { down_write(&sb->s_umount); if (sb->s_root && sb->s_flags & SB_BORN) { - emergency_thaw_bdev(sb); + if (IS_ENABLED(CONFIG_BLOCK)) + while (sb->s_bdev && !thaw_bdev(sb->s_bdev)) + pr_warn("Emergency Thaw on %pg\n", sb->s_bdev); thaw_super_locked(sb); } else { up_write(&sb->s_umount);