From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Arnd Bergmann To: "Yan, Zheng" Cc: Deepa Dinamani , Zheng Yan , linux-fsdevel@vger.kernel.org, y2038@lists.linaro.org, Dave Chinner , Theodore Ts'o , linux-kernel , Sage Weil , Ilya Dryomov , ceph-devel Subject: Re: [PATCH 09/10] fs: ceph: Replace CURRENT_TIME by ktime_get_real_ts() Date: Thu, 04 Feb 2016 09:30:20 +0100 Message-ID: <4400939.hfiB5KsmnG@wuerfel> In-Reply-To: References: <1454479670-8204-1-git-send-email-deepa.kernel@gmail.com> <3267742.ulDeDOimis@wuerfel> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org List-ID: On Thursday 04 February 2016 10:00:19 Yan, Zheng wrote: > > On Feb 4, 2016, at 05:27, Arnd Bergmann wrote: > { > struct ceph_timespec ts; > ceph_encode_timespec(&ts, &req->r_stamp); > ceph_encode_copy(&p, &ts, sizeof(ts)); > } Ok, that does make the behavior consistent on all architectures, but leads to a different question: struct ceph_timespec { __le32 tv_sec; __le32 tv_nsec; } __attribute__ ((packed)); How do you define ceph_timespec, is tv_sec supposed to be signed or unsigned? It seems that you treat it as signed, meaning you interpret times from the server as being in the [1902..2038] range, rather than the [1970..2106] range: static inline void ceph_decode_timespec(struct timespec *ts, const struct ceph_timespec *tv) { ts->tv_sec = (__kernel_time_t)le32_to_cpu(tv->tv_sec); ts->tv_nsec = (long)le32_to_cpu(tv->tv_nsec); } Is that intentional and documented? If yes, what is your plan to deal with y2038 support? Arnd