From patchwork Sat May 12 04:59:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepa Dinamani X-Patchwork-Id: 10395777 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 68DFB60348 for ; Sat, 12 May 2018 05:02:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 573C028D63 for ; Sat, 12 May 2018 05:02:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4B53228D80; Sat, 12 May 2018 05:02:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D498328D63 for ; Sat, 12 May 2018 05:02:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751379AbeELFB3 (ORCPT ); Sat, 12 May 2018 01:01:29 -0400 Received: from mail-pl0-f65.google.com ([209.85.160.65]:36741 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751013AbeELFBY (ORCPT ); Sat, 12 May 2018 01:01:24 -0400 Received: by mail-pl0-f65.google.com with SMTP id v24-v6so4381409plo.3; Fri, 11 May 2018 22:01:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MBFkmSPDqmKqZWES9hW0KTf2VrOyCh50gJbAVk1+TAM=; b=l/8tFXsPEwIh3gpjypJmbCI1qicwLtHjPkD99g0GMDsch+aL9TanXpnL8kOk5jbHYB U4ys0fyH0kcippfVy8gwW7rFngXOsK5mT3UFz5wzs2YSEHuGqj/oaT00FEWkwfD1OWIq xQognOpkGf93xtNUjHt6+YzPCbQAuxbYZFi2vw86mVVw6dieQGUVjkEy11v+BhC9z00Q 0TpxjCBVTmX+riQgncxi9ztvp73sdTJC/po23++2ANFVYEnTfMH+PQAjDVscB6nwXNyd HwGHIuC99DNGzsugMnSMUARQqsQH6k1C1kwJQGGitxRRB1BZ8j8NH+V6wekyWyqLzEM9 IK/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MBFkmSPDqmKqZWES9hW0KTf2VrOyCh50gJbAVk1+TAM=; b=rsmQlgJihxCiFIVMErd17c62YCzH8r509OinY04FxD8GHtEFwVkEcFeb80l++EFr8D aBOOYG57XOepV9PzuRZnLEn+dRZ63+TJ/UeswyGh0gsNOVRvctE7YYUr3Nk3nzktTiAK JfpD1O+5H9dF9vvC2RD7+HgLNBp9PRVcRr416HJGUYFOVOknc9z/sxPCtw7QsJoGBdE6 NzG8XIHVdLw+BsJHHqW4bPJ8GGBSSFEhPfr0E6w7Mdnsp70vIFQUQwEAWsy0jlJ7zLoA f+jJpFM53yP/Ne/CuUgy8pMHpoatQKn4xxZom+ZD4az+6m/nbjgiV4B4WTJ9WYLYfkys GJfA== X-Gm-Message-State: ALKqPweBAuEfMx566hSiV3e6uF6G9tBgQBiHHadJSAJWnqR0MoKzwUzF Uf9h2hMluymdVivoIQJ9gkw= X-Google-Smtp-Source: AB8JxZpqyW9eeTNT7xN+q0Yiz0Dwxm0AFM2vkyuY7R1p8yxHj3qtkHSXSiw9ogaNmlyWq51GaicTiw== X-Received: by 2002:a17:902:9883:: with SMTP id s3-v6mr1011975plp.179.1526101284348; Fri, 11 May 2018 22:01:24 -0700 (PDT) Received: from deepa-ubuntu.lan (c-67-170-212-194.hsd1.ca.comcast.net. [67.170.212.194]) by smtp.gmail.com with ESMTPSA id 206-v6sm7794717pfy.51.2018.05.11.22.01.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 May 2018 22:01:23 -0700 (PDT) From: Deepa Dinamani To: viro@zeniv.linux.org.uk, tglx@linutronix.de Cc: arnd@arndb.de, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, y2038@lists.linaro.org, zyan@redhat.com, ceph-devel@vger.kernel.org Subject: [PATCH 3/6] ceph: make inode time prints to be long long Date: Fri, 11 May 2018 21:59:18 -0700 Message-Id: <20180512045921.18311-4-deepa.kernel@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180512045921.18311-1-deepa.kernel@gmail.com> References: <20180512045921.18311-1-deepa.kernel@gmail.com> Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Subsequent patches in the series convert inode timestamps to use struct timespec64 instead of struct timespec as part of solving the y2038 problem. Convert these print formats to use long long types to avoid warnings and errors on conversion. Signed-off-by: Deepa Dinamani Cc: zyan@redhat.com Cc: ceph-devel@vger.kernel.org --- fs/ceph/inode.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index ae056927080d..676065a1ea62 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -671,18 +671,18 @@ void ceph_fill_file_time(struct inode *inode, int issued, CEPH_CAP_XATTR_EXCL)) { if (ci->i_version == 0 || timespec_compare(ctime, &inode->i_ctime) > 0) { - dout("ctime %ld.%09ld -> %ld.%09ld inc w/ cap\n", - inode->i_ctime.tv_sec, inode->i_ctime.tv_nsec, - ctime->tv_sec, ctime->tv_nsec); + dout("ctime %lld.%09ld -> %lld.%09ld inc w/ cap\n", + (long long)inode->i_ctime.tv_sec, inode->i_ctime.tv_nsec, + (long long)ctime->tv_sec, ctime->tv_nsec); inode->i_ctime = *ctime; } if (ci->i_version == 0 || ceph_seq_cmp(time_warp_seq, ci->i_time_warp_seq) > 0) { /* the MDS did a utimes() */ - dout("mtime %ld.%09ld -> %ld.%09ld " + dout("mtime %lld.%09ld -> %lld.%09ld " "tw %d -> %d\n", - inode->i_mtime.tv_sec, inode->i_mtime.tv_nsec, - mtime->tv_sec, mtime->tv_nsec, + (long long)inode->i_mtime.tv_sec, inode->i_mtime.tv_nsec, + (long long)mtime->tv_sec, mtime->tv_nsec, ci->i_time_warp_seq, (int)time_warp_seq); inode->i_mtime = *mtime; @@ -691,17 +691,17 @@ void ceph_fill_file_time(struct inode *inode, int issued, } else if (time_warp_seq == ci->i_time_warp_seq) { /* nobody did utimes(); take the max */ if (timespec_compare(mtime, &inode->i_mtime) > 0) { - dout("mtime %ld.%09ld -> %ld.%09ld inc\n", - inode->i_mtime.tv_sec, + dout("mtime %lld.%09ld -> %lld.%09ld inc\n", + (long long)inode->i_mtime.tv_sec, inode->i_mtime.tv_nsec, - mtime->tv_sec, mtime->tv_nsec); + (long long)mtime->tv_sec, mtime->tv_nsec); inode->i_mtime = *mtime; } if (timespec_compare(atime, &inode->i_atime) > 0) { - dout("atime %ld.%09ld -> %ld.%09ld inc\n", - inode->i_atime.tv_sec, + dout("atime %lld.%09ld -> %lld.%09ld inc\n", + (long long)inode->i_atime.tv_sec, inode->i_atime.tv_nsec, - atime->tv_sec, atime->tv_nsec); + (long long)atime->tv_sec, atime->tv_nsec); inode->i_atime = *atime; } } else if (issued & CEPH_CAP_FILE_EXCL) { @@ -2015,9 +2015,9 @@ int __ceph_setattr(struct inode *inode, struct iattr *attr) } if (ia_valid & ATTR_ATIME) { - dout("setattr %p atime %ld.%ld -> %ld.%ld\n", inode, - inode->i_atime.tv_sec, inode->i_atime.tv_nsec, - attr->ia_atime.tv_sec, attr->ia_atime.tv_nsec); + dout("setattr %p atime %lld.%ld -> %lld.%ld\n", inode, + (long long)inode->i_atime.tv_sec, inode->i_atime.tv_nsec, + (long long)attr->ia_atime.tv_sec, attr->ia_atime.tv_nsec); if (issued & CEPH_CAP_FILE_EXCL) { ci->i_time_warp_seq++; inode->i_atime = attr->ia_atime; @@ -2037,9 +2037,9 @@ int __ceph_setattr(struct inode *inode, struct iattr *attr) } } if (ia_valid & ATTR_MTIME) { - dout("setattr %p mtime %ld.%ld -> %ld.%ld\n", inode, - inode->i_mtime.tv_sec, inode->i_mtime.tv_nsec, - attr->ia_mtime.tv_sec, attr->ia_mtime.tv_nsec); + dout("setattr %p mtime %lld.%ld -> %lld.%ld\n", inode, + (long long)inode->i_mtime.tv_sec, inode->i_mtime.tv_nsec, + (long long)attr->ia_mtime.tv_sec, attr->ia_mtime.tv_nsec); if (issued & CEPH_CAP_FILE_EXCL) { ci->i_time_warp_seq++; inode->i_mtime = attr->ia_mtime; @@ -2082,9 +2082,9 @@ int __ceph_setattr(struct inode *inode, struct iattr *attr) if (ia_valid & ATTR_CTIME) { bool only = (ia_valid & (ATTR_SIZE|ATTR_MTIME|ATTR_ATIME| ATTR_MODE|ATTR_UID|ATTR_GID)) == 0; - dout("setattr %p ctime %ld.%ld -> %ld.%ld (%s)\n", inode, - inode->i_ctime.tv_sec, inode->i_ctime.tv_nsec, - attr->ia_ctime.tv_sec, attr->ia_ctime.tv_nsec, + dout("setattr %p ctime %lld.%ld -> %lld.%ld (%s)\n", inode, + (long long)inode->i_ctime.tv_sec, inode->i_ctime.tv_nsec, + (long long)attr->ia_ctime.tv_sec, attr->ia_ctime.tv_nsec, only ? "ctime only" : "ignored"); if (only) { /*