From patchwork Fri Feb 12 09:36:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepa Dinamani X-Patchwork-Id: 8289441 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0AAFB9F1C0 for ; Fri, 12 Feb 2016 09:39:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2443E203C4 for ; Fri, 12 Feb 2016 09:39:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 499C8203C1 for ; Fri, 12 Feb 2016 09:39:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751948AbcBLJhR (ORCPT ); Fri, 12 Feb 2016 04:37:17 -0500 Received: from mail-pf0-f178.google.com ([209.85.192.178]:34445 "EHLO mail-pf0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750995AbcBLJhN (ORCPT ); Fri, 12 Feb 2016 04:37:13 -0500 Received: by mail-pf0-f178.google.com with SMTP id x65so45019189pfb.1; Fri, 12 Feb 2016 01:37:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MtXNHVXBr3CbYMQFiBwW0JyiQ9e0SNYKTOuZrrBww80=; b=HBi6tZaWLY/aJfVzFuEua4vPQr717JpFgdLOaEUSVW7cSZdVCpK7asFnTyF3NRlZJo Qc/DCS9MSMVhFGQHYQBlIM0J71Y4B0InScMnAnprUPv/4uKw5d5nvdOI8v7uKF6j2uSo eLEIXPmOPQyKuRK3S1nCd3hP7g6waqaJ9Dh4xopXkol3yD9pMe3pR29FMgpUqbt8/vZR so0ZdBYYwyklvH7GwICcL/YvpKNyGRTEiZJ4ldZwlFxvkDyRvy5CytDzZ4BmjlFG70Pl ESoSX0ab1Qo9rsnn5m/vCXCmArgLW1Nc7Aaiv4wb4AwxI33g87uCmMivxAjiIOi5p6gS Zi2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MtXNHVXBr3CbYMQFiBwW0JyiQ9e0SNYKTOuZrrBww80=; b=N/s+/8cXYiILk6VruytzSCzUkHfGHbnyOkBjAL09GDyldJQLpTI2KvJ7pE4SpcS4u9 Kq8HOtw6HvJbalT8n06/lEknVXTTrjdcyaanUZ2niB9XtzauORXYwz4mzkC66wFAwM35 +qpIVTVetwhTHb/Nhvuee16F22YqqMnV3FVu+LLTR42/c97HoOeL40LmWI2WavpTZvJz suDsrwGpYGaNJVNtP7ewJF8fSho/zlixzkxy8J+r5m3z0x9+HK6koMI/E7v2k0zxB7fa 6fet0mFx91UVmpAR4w+oKNQu7PzDjnE/2swiVVtUQh/6bDgdhOpJ1usZWT6ilgVQ4B00 Uyfg== X-Gm-Message-State: AG10YOQIwLnY/eLapdHF9gdswlhoAWX5SznYhCiskvtNPibc5v3+5c50COfo4m8togaPDQ== X-Received: by 10.98.86.145 with SMTP id h17mr706585pfj.9.1455269832647; Fri, 12 Feb 2016 01:37:12 -0800 (PST) Received: from localhost.localdomain ([106.51.31.162]) by smtp.gmail.com with ESMTPSA id g25sm17972250pfg.35.2016.02.12.01.37.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 12 Feb 2016 01:37:12 -0800 (PST) From: Deepa Dinamani To: linux-fsdevel@vger.kernel.org, y2038@lists.linaro.org Cc: Arnd Bergmann , Dave Chinner , "Theodore Ts'o" , linux-kernel@vger.kernel.org Subject: [RFC v2a 09/12] fs: ceph: Change encode and decode functions to use vfs_time Date: Fri, 12 Feb 2016 01:36:03 -0800 Message-Id: <1455269766-2994-10-git-send-email-deepa.kernel@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1455269766-2994-1-git-send-email-deepa.kernel@gmail.com> References: <20160212092153.GA2368@deepa-ubuntu> <1455269766-2994-1-git-send-email-deepa.kernel@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Encode is used for iattr times, inode times and current filesystem times. Decode is mostly used for inode times. Hence, these need to use vfs_time to switch to 64 bit times along with vfs. Decode is also used for keepalive times and processing authentication tickets. Since inode times also use same functions it is necessary to use vfs_time here as well. Signed-off-by: Deepa Dinamani --- include/linux/ceph/decode.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/include/linux/ceph/decode.h b/include/linux/ceph/decode.h index 633a130..8139ed9 100644 --- a/include/linux/ceph/decode.h +++ b/include/linux/ceph/decode.h @@ -4,6 +4,7 @@ #include #include #include +#include #include #include @@ -132,16 +133,16 @@ bad: } /* - * struct ceph_timespec <-> struct timespec + * struct ceph_timespec <-> struct vfs_time */ -static inline void ceph_decode_timespec(struct timespec *ts, +static inline void ceph_decode_timespec(struct vfs_time *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); + ts->tv_sec = (s64)(u32)le32_to_cpu(tv->tv_sec); + ts->tv_nsec = (long)(u32)le32_to_cpu(tv->tv_nsec); } static inline void ceph_encode_timespec(struct ceph_timespec *tv, - const struct timespec *ts) + const struct vfs_time *ts) { tv->tv_sec = cpu_to_le32((u32)ts->tv_sec); tv->tv_nsec = cpu_to_le32((u32)ts->tv_nsec);