Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2596934ybe; Tue, 3 Sep 2019 15:39:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqx1hQo1ePklPowZYQgJqrgSDLIRKLrOnlyASHzSFJnnx+7sIm2FwKd76xwzbfobbAYp5yd3 X-Received: by 2002:a17:90a:e654:: with SMTP id ep20mr1668757pjb.65.1567550349777; Tue, 03 Sep 2019 15:39:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567550349; cv=none; d=google.com; s=arc-20160816; b=D3gcgJvNwlCZTwKGrPbs26Mes14quA0G4qUobhWFngU9F/ZbrK/7Bbve6Jw0LsrkL4 o4SUjL8OQ3NSUQA2x4bRuqcLoTUTHO+5MaCK+TdAvNFrEBfp4RLytysrcJCJAX5atjyh SWyXWmxNgXWYyJBck8t/c1w7Ah9VDNH0OWLFdqZTbbK1puIc9YKwErM8eKaFhyf9GcF6 Y2QTQ7hszDUqpXsAvaBDbe0hRswmzDfgULdw0OS0Wce43g2eaV/duAQ1fSMTPXSwfdZh /Mkx13StrdULPI0zDUtZuhlLHsqDIPElNIrCJS9P90qCamzypDmVFEpTF4625fj/nl2y w4+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=LjwIfa78HIKGMIqRFb5o6ZXqS3mdEAIZKfSRCC7Qg9s=; b=WCjyXW6d+xTEd4fY4B/uXyArHQ44ucK9zXOY7t/3ebJYGAtNUMOZ6E7Av4uY/IxoBt iWI+qHYsj/NPtykKFoY5WM65iCc3shtiuA8TzPZWwOngSSeN/BLFbcm2bLpqDN29gkzy rM1oyTKih727TKLm4AW4Z0xpbczdZK0Op8Dg6Ji80cihat/9UFGmwl9xCHY9LpRIPRWt FiWBcLc/5ASjEnRbAsoroVbixfl/1B97A5hURlI2aXj3AjqkibBZbImV3GTSrLl2Mlk8 tU4R+C+s8d6TtZ04DK90SaGvkP4ocKN2JGAOd3l5LGI/UwnqWFETB5eTqj8jL2LK5lxs WAJw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-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 o31si15527711pgb.579.2019.09.03.15.38.44; Tue, 03 Sep 2019 15:39:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-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-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726441AbfICWi0 (ORCPT + 99 others); Tue, 3 Sep 2019 18:38:26 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:45947 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725882AbfICWi0 (ORCPT ); Tue, 3 Sep 2019 18:38:26 -0400 Received: from callcc.thunk.org (guestnat-104-133-0-96.corp.google.com [104.133.0.96] (may be forged)) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id x83McFRu018715 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 3 Sep 2019 18:38:16 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id 5DF7442049E; Tue, 3 Sep 2019 18:38:15 -0400 (EDT) Date: Tue, 3 Sep 2019 18:38:15 -0400 From: "Theodore Y. Ts'o" To: Arnd Bergmann Cc: Deepa Dinamani , Qian Cai , Jeff Layton , Alexander Viro , Linux FS-devel Mailing List , Linux Kernel Mailing List , Ext4 Developers List , Andreas Dilger Subject: Re: "beyond 2038" warnings from loopback mount is noisy Message-ID: <20190903223815.GH2899@mit.edu> References: <1567523922.5576.57.camel@lca.pw> <20190903211747.GD2899@mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Tue, Sep 03, 2019 at 11:48:14PM +0200, Arnd Bergmann wrote: > I think the warning as it was intended makes sense, the idea > was never to warn on every inode update for file systems that > cannot handle future dates, only to warn when we > > a) try to set a future date > b) fail to do that because the space cannot be made available. What do you mean by "try to set a future date"? Do you mean a trying to set a date after 2038 (when it can no longer fit in a signed 32-bit value)? Because that's not what the commit is currently doing..... > I would prefer to fix it on top of the patches I already merged. > > Maybe something like: > > diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h > index 9e3ae3be3de9..5a971d1b6d5e 100644 > --- a/fs/ext4/ext4.h > +++ b/fs/ext4/ext4.h > @@ -835,7 +835,9 @@ do { > \ > } > \ > else {\ > (raw_inode)->xtime = cpu_to_le32(clamp_t(int32_t, > (inode)->xtime.tv_sec, S32_MIN, S32_MAX)); \ > - ext4_warning_inode(inode, "inode does not support > timestamps beyond 2038"); \ > + if (((inode)->xtime.tv_sec != (raw_inode)->xtime) && \ > + ((inode)->i_sb->s_time_max > S32_MAX)) > \ > + ext4_warning_inode(inode, "inode does not > support timestamps beyond 2038"); \ > } \ > } while (0) Sure, that's much less objectionable. > However, I did expect that people might have legacy ext3 file system > images that they mount, and printing a warning for each write would > also be wrong for those. I guess I'm much less convinced that 10-15 years from now, there will be many legacy ext3 file systems left. Storage media doesn't last that long, and if file systems get moved around, e2fsck will be run at least once, and so adding some e2fsck-time warnings seems to be a better approach IMHO. - Ted