Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp2842695ybh; Mon, 5 Aug 2019 07:43:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqzxxEcI0+e2WrM8WdukkB/oC/cBrWv2iDUj1eAkmqEvIKcCC2nHYb6PqI6L34m0WkhMCjJv X-Received: by 2002:a17:902:a612:: with SMTP id u18mr140503000plq.181.1565016191195; Mon, 05 Aug 2019 07:43:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565016191; cv=none; d=google.com; s=arc-20160816; b=G9VEzbUf165nJAyF49eVdxv9pDRtWQ4HkQ6lRIgng/vOGyfdtGI1cswlftY5ij6C4S 6rdhezL3mnuG9XJ8bYZkEBKJWtKX/zh1dHEOENlAmVCAHE47gPAVh25NPZ6rUeUgrFpu SwZ60lg9X1X61mjodGS6jJCKEJRd0ivyHEzOjEiRp7aFxho6Mo/vT0vMsuksDz/4/p99 uqZLN+YTdM+ZT4pDwZeYbp/xgc47ElMKRJ0Mntoc4m6xT84/6A6pRmdzq5npe+OXCh+8 fmq5Rzrc0TVN2/S1B4KZCjwW5kEuYL+4l4deFnUpXIbDHgZ/nonGMIbTS5/xFZc897dW HM8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=oRGlfvIBEGnhMOSaUFrH+SBTE1znMskWY0KJq2yKr84=; b=JCzona7O1OP80L8t5OCK9VRZn0BFMLECBu6aWB4nKgzUwz8P1ntS7N95jglyEaT7W1 WpknpwwdDrflRk3QR0pbTqPPLLKLspZxDu1cIqCcunFXmVTonas09L8G4t5Am2VfS5fm RG1bMZkpUqn39F6dBpu80r1as73y3EjH+cIO+Tnw21lgsVTRMmYWnKdCO4jF5LlOYXOH fukI9mNlj0ROJnYBY1Es9j455PkJoimsIqLK8dSKpFBdCvd0idZlVLauLJoMtIJkrema CMPLZupa4RR1oOMXaOxr3fYZ4qUtxWk+HRGfPzAzIOOVFKcSNVPhsxYMLvkzaXzBY/UP tvuw== 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 p22si44297032pli.255.2019.08.05.07.42.55; Mon, 05 Aug 2019 07:43:11 -0700 (PDT) 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 S1729737AbfHEOks (ORCPT + 99 others); Mon, 5 Aug 2019 10:40:48 -0400 Received: from mail-qk1-f196.google.com ([209.85.222.196]:40441 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729133AbfHEOks (ORCPT ); Mon, 5 Aug 2019 10:40:48 -0400 Received: by mail-qk1-f196.google.com with SMTP id s145so60253023qke.7; Mon, 05 Aug 2019 07:40:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=oRGlfvIBEGnhMOSaUFrH+SBTE1znMskWY0KJq2yKr84=; b=APuble2BpXARG4jU2DYGB4NSX8yam4ci9ypYe5T8eO3mED1q+6uNR/K1PVpes5zpfz QCwOCOYGsyGKslsSgoSZ5LPoBDiW4WXm4lxNHFQAOYUE4rWyj/cJwu3Z6mYlkTSIKPRy 0upin2VVKOR7Ur6ZEdadeZQrc51LrVUti/zo2c+mbub84+rYiTUs4J9TbH2SZNYWiGVp QzXsahOGGJKy2tdbHFrgoT90odsC12RSozVFL95Zqayano7/QvpcMRUWuodaILd4fsZ4 GwFQIMOnFQBk29uM82b5ozXjSiXrkABX8dnsqRQRjiv7I9faMLa0nHaa7ICFTCfBa7cj IspQ== X-Gm-Message-State: APjAAAWGoHaLxCPVAGh2feIEfY39f/6tW3a42bC4R6fKCoKJJgvmN6Tk XynbPE3EqxCPO1qgOrzqbfNQv9dXLYG+Se0VYpQ= X-Received: by 2002:a37:5f45:: with SMTP id t66mr102886994qkb.286.1565016047182; Mon, 05 Aug 2019 07:40:47 -0700 (PDT) MIME-Version: 1.0 References: <20190730014924.2193-1-deepa.kernel@gmail.com> <20190730014924.2193-5-deepa.kernel@gmail.com> In-Reply-To: From: Arnd Bergmann Date: Mon, 5 Aug 2019 16:40:30 +0200 Message-ID: Subject: Re: [Y2038] [PATCH 04/20] mount: Add mount warning for impending timestamp expiry To: Ben Hutchings Cc: Deepa Dinamani , Al Viro , Linux Kernel Mailing List , Linux FS-devel Mailing List , y2038 Mailman List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 5, 2019 at 4:12 PM Ben Hutchings wrote: > > On Mon, 2019-07-29 at 18:49 -0700, Deepa Dinamani wrote: > > The warning reuses the uptime max of 30 years used by the > > setitimeofday(). > > > > Note that the warning is only added for new filesystem mounts > > through the mount syscall. Automounts do not have the same warning. > > > > Signed-off-by: Deepa Dinamani > > --- > > fs/namespace.c | 11 +++++++++++ > > 1 file changed, 11 insertions(+) > > > > diff --git a/fs/namespace.c b/fs/namespace.c > > index b26778bdc236..5314fac8035e 100644 > > --- a/fs/namespace.c > > +++ b/fs/namespace.c > > @@ -2739,6 +2739,17 @@ static int do_new_mount_fc(struct fs_context *fc, struct path *mountpoint, > > error = do_add_mount(real_mount(mnt), mountpoint, mnt_flags); > > if (error < 0) > > mntput(mnt); > > + > > + if (!error && sb->s_time_max && > > I don't know why you are testing sb->s_time_max here - it should always > be non-zero since alloc_super() sets it to TIME64_MAX. I think we support some writable file systems that have no timestamps at all, so both the minimum and maximum default to 0 (1970-01-01). For these, there is no point in printing a warning, they just work as designed, even though the maximum is expired. Arnd