Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp10443880ybl; Thu, 26 Dec 2019 17:56:37 -0800 (PST) X-Google-Smtp-Source: APXvYqwdG03btLYs087YIxUreKk04AfIG92/Q2sjrZWuBlDPxufNDyNJDx1TxIVZlY4FuGop+uSi X-Received: by 2002:a9d:4796:: with SMTP id b22mr50829277otf.353.1577411797593; Thu, 26 Dec 2019 17:56:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577411797; cv=none; d=google.com; s=arc-20160816; b=xtAoibE/M17uJl7RHPwQ+ijGqvAdQstSFb2di6qmDf1Njz6R74ZlIAVdvM8wnE/EDc 3QmYZXZBywuQLbRUMiLMjWXolM61MugHmPZK4uDwzsaAl8R2C226k+eV2IeyXM/VXqTd OkzofffGBDLJsqBC7up0vybPvitgIBqNfrr7WmufmGz7szfHN7BcPXRm2z2Lz+cwPNra OhB9yVvpsX002ZwWAfbFV9RPyOM38SwMEtYgKOJ+9/8B6KIauGEqYKbt9G2BVK8y4rav 8O9/G1l4bLteRk3w1ggFpArHVV7JwLHRpdD4VOcl8U/8UJ0D8YWlopYb8c9kth8Qp/nf KE8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=VFgaX3zQ9JeSGTW/DDgmDzUxNNpHKrt3OXuVehYTFHc=; b=e1kMGhZzFyrcvAPxQxWjR0djUFmXw1qL+5Cp5GnFKOb/IhHR/UzlS+pEIKCf3soGgM 6aO2gw3Xfatt60hq5RKcY4wxATjJhNQelLdrKc8018djIbqQwMf3BXwTda9iIDnQVKuZ 1TGs9EZKKDNxYhi04lTPUoeMnbu2WCEiGtD5Hihp4A3JbkbWFFcdV5fzzh20Ml+hOhSG 7WbytNhyLyMRhh+/XwY/yIWLFe90y3iBya0Xlgurs+8AcamoCKn6uzbEdeAum2lFWr2Z Lvhx+FiEAP/uN0EdgZS5+aUuab5n0KhVFfrc3GO8ASxupuCUZzaqG0yM+BBgqbs/TaF2 Lt/A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e24si11273750otl.62.2019.12.26.17.56.23; Thu, 26 Dec 2019 17:56:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727015AbfL0ByL (ORCPT + 99 others); Thu, 26 Dec 2019 20:54:11 -0500 Received: from trent.utfs.org ([94.185.90.103]:36084 "EHLO trent.utfs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726193AbfL0ByL (ORCPT ); Thu, 26 Dec 2019 20:54:11 -0500 Received: from localhost (localhost [IPv6:::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by trent.utfs.org (Postfix) with ESMTPS id B7B4465591; Fri, 27 Dec 2019 02:54:09 +0100 (CET) Date: Thu, 26 Dec 2019 17:54:09 -0800 (PST) From: Christian Kujau To: Deepa Dinamani , Jeff Layton cc: LKML , Eric Biggers , torvalds@linux-foundation.org Subject: [PATCH] Re: filesystem being remounted supports timestamps until 2038 In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21.99999 (DEB 375 2019-10-29) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 20 Dec 2019, Christian Kujau wrote: > I noticed the following messages in my dmesg: > > xfs filesystem being remounted at /mnt/disk supports imestamps until 2038 (0x7fffffff) > > These messages get printed over and over again because /mnt/disk is > usually a read-only mount that is remounted (rw) a couple of times a day > for backup purposes. > > I see that these messages have been introduced with f8b92ba67c5d ("mount: > Add mount warning for impending timestamp expiry") resp. 0ecee6699064 > ("fix use-after-free of mount in mnt_warn_timestamp_expiry()") and I was > wondering if there is any chance to either adjust this to pr_debug (but > then it would still show up in dmesg, right?) or to only warn once when > it's mounted, but not on re-mount? I realize that "it's the holidays", but it'd be a shame if this gets forgotten :( # uptime; dmesg | grep -c 2038 14:45:15 up 6 days, 21:16, 1 user, load average: 0.20, 0.22, 0.27 350 Attached is a "fix" that changes pr_warn into pr_debug, but that's maybe not what was intended here. Thanks, Christian. commit c9a5338b4930cdf99073042de0717db43d7b75be Author: Christian Kujau Date: Thu Dec 26 17:39:57 2019 -0800 Commit f8b92ba67c5d ("mount: Add mount warning for impending timestamp expiry") resp. 0ecee6699064 ("fix use-after-free of mount in mnt_warn_timestamp_expiry()") introduced a pr_warn message and the following gets sent to dmesg on every remount: [...] filesystem being remounted at /mnt supports timestamps until 2038 (0x7fffffff) When file systems are remounted a couple of times per day (e.g. rw/ro for backup purposes), dmesg gets flooded with these messages. Change pr_warn into pr_debug to make it stop. Signed-off-by: Christian Kujau diff --git a/fs/namespace.c b/fs/namespace.c index be601d3a8008..afc6a13e7316 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -2478,7 +2478,7 @@ static void mnt_warn_timestamp_expiry(struct path *mountpoint, struct vfsmount * time64_to_tm(sb->s_time_max, 0, &tm); - pr_warn("%s filesystem being %s at %s supports timestamps until %04ld (0x%llx)\n", + pr_debug("%s filesystem being %s at %s supports timestamps until %04ld (0x%llx)\n", sb->s_type->name, is_mounted(mnt) ? "remounted" : "mounted", mntpath, -- BOFH excuse #132: SCSI Chain overterminated