From patchwork Tue Aug 1 17:21:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13337123 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 8990CC04A94 for ; Tue, 1 Aug 2023 17:50:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 183AA940046; Tue, 1 Aug 2023 13:50:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 133C7940010; Tue, 1 Aug 2023 13:50:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F3D8B940046; Tue, 1 Aug 2023 13:50:19 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id E7600940010 for ; Tue, 1 Aug 2023 13:50:19 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 748361C9CCF for ; Tue, 1 Aug 2023 17:50:18 +0000 (UTC) X-FDA: 81076274916.23.FA4D407 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf26.hostedemail.com (Postfix) with ESMTP id DF422141BDB for ; Tue, 1 Aug 2023 17:22:13 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=Vm2OJfte; spf=none (imf26.hostedemail.com: domain of BATV+44153ebb3f5e3de177ba+7282+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+44153ebb3f5e3de177ba+7282+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=1690910534; 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=PsY+MbsgOeBE0qNyqxA2FkxVtq6lybIS3fnERYydddM=; b=VFSDEQmByKvuwjNXcFrZ27iVxzRGsnmJf8MOBovRODterJ8QvTjgoJJYEXA0FxAyw4P7Af /3gYQLvZwfkDPTKvQJLJNWP9rsa6I71jL8tmAdN0TqsCZt7DbyBk2afawdx/iJAaWfw6ZU C0IwUOTPPMLvuRSaOO78wXNbSBguK9M= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1690910534; a=rsa-sha256; cv=none; b=pVs8WjoUDQX33nYAxl7efe0PR+bGlmN8mbf0UAryIE5sKIkjz/KOyTN6T/ewhfcAGEskX7 7hFQ5XpmdUDiLZYWEZ70HrcwBH60j2Dsey0jXl7y4XIdT/6Skfc4VymTx2az1XlZTAhd/4 ATi0yfbLX6ty/z+RLKBVPlBhfRlws8I= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=Vm2OJfte; spf=none (imf26.hostedemail.com: domain of BATV+44153ebb3f5e3de177ba+7282+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+44153ebb3f5e3de177ba+7282+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=PsY+MbsgOeBE0qNyqxA2FkxVtq6lybIS3fnERYydddM=; b=Vm2OJftemIv4WoAk6AEE6ZcO5i fsFmLxN+lpMVYKPMrkHZENthIa8UahNL3cLi+lK/VIoQ0YiHk0yCIsdjW7SowEcIlwNmLeTE0QdTI m+L4Pvh2EYfzvZBvlWCuql/FkIPW5jgRoClg1WW7q/vHckPhGrXvNGtRLrDIHzCFHwPGqvXzRAKmN PwA6uiR7Ea3RKuLMIwCcTXz/xHRQnVbFI8Dyox0KJOoLceF4R8Ex6uJ7VEyjBCTxW3eojgvhzs0w/ cLJcr01OMPrcs+GEIChFmlOYmQAL1sW3bEAMck8+vMh2L/HaB3j5V1IhDJoMoDba+iNPVLSOdKo+E Oa46YRew==; Received: from 2a02-8389-2341-5b80-39d3-4735-9a3c-88d8.cable.dynamic.v6.surfer.at ([2a02:8389:2341:5b80:39d3:4735:9a3c:88d8] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qQt4T-002uUH-14; Tue, 01 Aug 2023 17:22:09 +0000 From: Christoph Hellwig To: Jens Axboe Cc: "Darrick J. Wong" , Andrew Morton , Matthew Wilcox , Christian Brauner , linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Luis Chamberlain , Hannes Reinecke , Johannes Thumshirn Subject: [PATCH 1/6] fs: remove emergency_thaw_bdev Date: Tue, 1 Aug 2023 19:21:56 +0200 Message-Id: <20230801172201.1923299-2-hch@lst.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230801172201.1923299-1-hch@lst.de> References: <20230801172201.1923299-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-Stat-Signature: i6xssnwwf7x7qfae99rhdzgar84p3puk X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: DF422141BDB X-Rspam-User: X-HE-Tag: 1690910533-722850 X-HE-Meta: U2FsdGVkX18GEUTWStfZZI3J8RxpNzPOLHsM4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3tmhFiR7VgEAbvRnSGREWJ75Y+qIiozIAQ9TNek1JMLksr35hxVpsOTdVw4OzFDQcCbDNHKoCdx/K8UnmVbZK9lKIo4UHjzxtcoNFNleYe2EYEN6POkS0pCC0KMkquZztBUI37/otiBV4ST8FmWB8K6zcrcZDgfupwTl/UqQxp2pGhtWs+mdHdeYc4/FTCzG7PusRVMkJwMbytndwHZ+Tunv9WNrdLjbBNDlXOe7oZv6to6tYvDlVaM0OAMqUbYp4mXsax8mmgh82+SJ7/CV/LJHvmI7NU5rixSvj0YAp+VH6eibd+HnyKZx+zB//m9zkeFT6izW4z8B7UytCg6k7lOkDhcy8McYquPO8YC0vR9Is16WS9yYKkGFNIClvi9NUOsO1+uo4xlQeAhcneuTwvBdfRdU0p9kyZr3ZjfBa8MHNXQ7CPyOFIXmMguheQ600nbvOAYrIZvo= 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 Reviewed-by: Luis Chamberlain Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Reviewed-by: Christian Brauner --- 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 bd091329026c0f..376f468e16662d 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -562,12 +562,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 f7a3dc11102647..d538d832fd608b 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 e781226e28800c..bc666e7ee1a984 100644 --- a/fs/super.c +++ b/fs/super.c @@ -1029,7 +1029,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);