Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp11254imm; Tue, 19 Jun 2018 14:55:14 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIV3hWmhXlAk+Nefrs1rd8rIQZJ5F4U3TwLot9YW9C1sVtrk/0loJ9s05JLKw/j9ZRvTRU0 X-Received: by 2002:a65:524d:: with SMTP id q13-v6mr16553155pgp.244.1529445314350; Tue, 19 Jun 2018 14:55:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529445314; cv=none; d=google.com; s=arc-20160816; b=BFo1LUBLKUcP0iKMk2ZhgDMaGjReZ350BHqNgBrELMRwHDcvzcJAMvIMfEfVtfC40Q n/xzsNgwSBFJDMb1WTtCHHUdW4RemTQZFocKahPXTz4ajVtzmO8AZ8QsvwSyvaAN/TFg VLIDGEbvyLPD+ZOtWloEANde28XGGs1DkO1BmHe43deu1sOGV7RDIjl+6vd3HS5UYZVL fibVs5OM0n7nxMh64mJNx+jJ+C9+yMgSnVOczBZampvKE5ln+Q3x0AyWzxa/67rOHEXh t+ta1T/n1p449rKSWkM81L1JNcxiv4sPPqgBzgwLV+Kd6IcbW0o/QhNeHXMTtQRZJjVo kcXg== 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:arc-authentication-results; bh=BlqhJ/ox4jAvGA0CuuaiDJHBTcU38lkEAvXZvkA5Lxo=; b=VpkVvWWIAqq+8gp7mKpiXHVl9+7hvI2OaHxp/M8ZHjdA5Q1HHHt1DFHEkmshzZUxkI nlNCOI3XfzYAdOLHAuu7Z+FKtCbKYrieqfQsDA3cxtNyM6Hd+ceQ/fNmrjLGzGALvIN+ BxY7aw/1N5DTdOV12ljl5FE/kxeDNf2fDNru/eX6HoMzJXkQgaQQVXUNrSUHAKFEWvne V/IncJknwNXIP8YpPgY8st1v/NropiKVA8NExZthulfkYxewgZfqcBjM2Xm6IO0+Weur I1xEOaSFTTnkQC+U4jom0QZhig08hLpaOzlhGdLlqcJNwiW8reTA8J6gxyBTFqyV0SJn fx5A== 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 p4-v6si692059pfg.329.2018.06.19.14.54.58; Tue, 19 Jun 2018 14:55:14 -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 S1757196AbeFSVwU (ORCPT + 99 others); Tue, 19 Jun 2018 17:52:20 -0400 Received: from mx2.suse.de ([195.135.220.15]:56489 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755466AbeFSVwR (ORCPT ); Tue, 19 Jun 2018 17:52:17 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 71988AED2; Tue, 19 Jun 2018 21:52:16 +0000 (UTC) Date: Tue, 19 Jun 2018 16:52:02 -0500 From: Goldwyn Rodrigues To: Arnd Bergmann Cc: Mark Fasheh , Joel Becker , y2038 Mailman List , Eric Ren , Linux Kernel Mailing List , Deepa Dinamani , ocfs2-devel@oss.oracle.com Subject: Re: [Ocfs2-devel] [PATCH] ocfs2: dlmglue: clean up timestamp handling Message-ID: <20180619215202.zniqq3py3hqjeudv@merlin> References: <20180619155826.4106487-1-arnd@arndb.de> <20180619171407.yoncg72ed2vncf62@merlin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170912 (1.9.0) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06-19 21:11, Arnd Bergmann wrote: > On Tue, Jun 19, 2018 at 7:14 PM, Goldwyn Rodrigues wrote: > > > > > > On 06-19 17:58, Arnd Bergmann wrote: > >> The handling of timestamps outside of the 1970..2038 range in the dlm > >> glue is rather inconsistent: on 32-bit architectures, this has always > >> wrapped around to negative timestamps in the 1902..1969 range, while on > >> 64-bit kernels all timestamps are interpreted as positive 34 bit numbers > >> in the 1970..2514 year range. > ... > > > > Will all values written to LVB be the same with or without the patch? > > I am considering the situation where in a cluster some machines have this > > patch and some don't. Depending on that, this may require a version > > change. > > There is one part that may change: > > >> -static u64 ocfs2_pack_timespec(struct timespec *spec) > >> +static u64 ocfs2_pack_timespec(struct timespec64 *spec) > >> { > >> u64 res; > >> - u64 sec = spec->tv_sec; > >> + u64 sec = clamp_t(time64_t, spec->tv_sec, 0, 0x3ffffffffull); > >> u32 nsec = spec->tv_nsec; > >> > >> res = (sec << OCFS2_SEC_SHIFT) | (nsec & OCFS2_NSEC_MASK); > > Here, setting a timestamp before 1970 or after 2514 will get wrapped > around in unpatched kernels, but will be clamped to the minimum > and maximum times after the patch. > > It is extremely rare for correct code to need timestamps outside of that > range, but it is also trivial to trigger that with a manual 'touch' command > from user space. > > If the change is a problem, I can resend the patch without that one > line change. > I think you should keep the change, but incrment OCFS2_LVB_VERSION. -- Goldwyn