From patchwork Sat May 12 04:59:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepa Dinamani X-Patchwork-Id: 10395783 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 4D45760236 for ; Sat, 12 May 2018 05:02:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4085E28B58 for ; Sat, 12 May 2018 05:02:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3536B28D80; Sat, 12 May 2018 05:02:42 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 90C5B28B58 for ; Sat, 12 May 2018 05:02:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751092AbeELFBY (ORCPT ); Sat, 12 May 2018 01:01:24 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:36739 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751130AbeELFBU (ORCPT ); Sat, 12 May 2018 01:01:20 -0400 Received: by mail-pl0-f68.google.com with SMTP id v24-v6so4381344plo.3; Fri, 11 May 2018 22:01:20 -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=29CJ46wwGL9yimLoZN3dgeRA/wmg9olNrL1vQEbqsXg=; b=JvsEJc9En7BdZJ4YagiTNN0BdyHJC4cuJMh7w6Gl5AXhl/lTgnOieamnBa6irAZl44 LjCyA/DJRoORAOwspLiDlZDe5i3F0HTh+mf/7PpGgdFMsfiK1TSxy3WBrHITR7lcGZD2 d7YhF/6lqsyGL6g/yUOcMa87vCxSML6FoIONngnydAYUNPJ9lvmi21CmeTH9CAWSZj/a 5t3i0a+lKyDZtPX/V6RVljdQ+3k2X9ZJGGaHb4c3uVLc7lAQ0W2+cCYTzxmeg6uGhd0e kteH/X9Tx6X+GId6k+PmnoIBxJeeNIbcPqeR7riboiLhQU/Ah5khCYeT9l+sphRca9qD Tzbw== 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=29CJ46wwGL9yimLoZN3dgeRA/wmg9olNrL1vQEbqsXg=; b=REyzKxUQzDVXzZvJOXwyxhYG1DHZ3vtCo9yFfxqsDDu3bFdLsWr7enWRmGMp5bsKd/ Eqn+97ZDXZkjZadeTmRnnW053mDI2iokVnJ+iz9zDekIVtrkO8KXHhE1+75/lMGZ8haQ AStbhT0+fSLnpIZ7Qi4EWyFALQskM0Cb1cBXyYwmwmnrn7UVqNH/nGyN0DYF86dQJ7I9 +cXzlm1YtCQFjuY6QmfAmPamxGBhuB1BJ8SGS2SEKRGH4C46TZUSf+BgP7MborIUCb5a 3rRjsCeqSKykYZ79c0EZoebC8OazEEDnr2fI3cpPpAkd+B6Wns4b77v+jKfj2GSeGuhW efEw== X-Gm-Message-State: ALKqPweFODFiRqxmEypWo/haqbS84KGizCMJyYSNjC7rghvL7/L9uWzw 2YP2K1tmwkRQ6dT6vrMEC14= X-Google-Smtp-Source: AB8JxZrYcvLDTFYD/NoTQ1KYLD2i66I0gtXcigNxSgOvlDFr4EEAXSrCElBXwvOwiq9EK831EBwq5A== X-Received: by 2002:a17:902:5597:: with SMTP id g23-v6mr997687pli.347.1526101279917; Fri, 11 May 2018 22:01:19 -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.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 May 2018 22:01:19 -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, andreas.dilger@intel.com Subject: [PATCH 2/6] lustre: Use long long type to print inode time Date: Fri, 11 May 2018 21:59:17 -0700 Message-Id: <20180512045921.18311-3-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: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@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: andreas.dilger@intel.com --- drivers/staging/lustre/lustre/llite/llite_lib.c | 12 +++++++----- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 7 ++++--- drivers/staging/lustre/lustre/mdc/mdc_reint.c | 6 +++--- drivers/staging/lustre/lustre/obdclass/obdo.c | 6 +++--- 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c index 60dbe888e336..dc31966bbf3c 100644 --- a/drivers/staging/lustre/lustre/llite/llite_lib.c +++ b/drivers/staging/lustre/lustre/llite/llite_lib.c @@ -1482,8 +1482,9 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import) } if (attr->ia_valid & (ATTR_MTIME | ATTR_CTIME)) - CDEBUG(D_INODE, "setting mtime %lu, ctime %lu, now = %llu\n", - LTIME_S(attr->ia_mtime), LTIME_S(attr->ia_ctime), + CDEBUG(D_INODE, "setting mtime %llu, ctime %llu, now = %llu\n", + (unsigned long long)LTIME_S(attr->ia_mtime), + (unsigned long long)LTIME_S(attr->ia_ctime), (s64)ktime_get_real_seconds()); if (S_ISREG(inode->i_mode)) @@ -1760,9 +1761,10 @@ int ll_update_inode(struct inode *inode, struct lustre_md *md) if (body->mbo_valid & OBD_MD_FLMTIME) { if (body->mbo_mtime > LTIME_S(inode->i_mtime)) { CDEBUG(D_INODE, - "setting ino %lu mtime from %lu to %llu\n", - inode->i_ino, LTIME_S(inode->i_mtime), - body->mbo_mtime); + "setting ino %lu mtime from %llu to %llu\n", + inode->i_ino, + (unsigned long long)LTIME_S(inode->i_mtime), + (unsigned long long)body->mbo_mtime); LTIME_S(inode->i_mtime) = body->mbo_mtime; } lli->lli_mtime = body->mbo_mtime; diff --git a/drivers/staging/lustre/lustre/lmv/lmv_obd.c b/drivers/staging/lustre/lustre/lmv/lmv_obd.c index 7198a6384028..88e05a53716e 100644 --- a/drivers/staging/lustre/lustre/lmv/lmv_obd.c +++ b/drivers/staging/lustre/lustre/lmv/lmv_obd.c @@ -3029,11 +3029,12 @@ static int lmv_merge_attr(struct obd_export *exp, for (i = 0; i < lsm->lsm_md_stripe_count; i++) { struct inode *inode = lsm->lsm_md_oinfo[i].lmo_root; - CDEBUG(D_INFO, "" DFID " size %llu, blocks %llu nlink %u, atime %lu ctime %lu, mtime %lu.\n", + CDEBUG(D_INFO, "" DFID " size %llu, blocks %llu nlink %u, atime %llu ctime %llu, mtime %llu.\n", PFID(&lsm->lsm_md_oinfo[i].lmo_fid), i_size_read(inode), (unsigned long long)inode->i_blocks, - inode->i_nlink, LTIME_S(inode->i_atime), - LTIME_S(inode->i_ctime), LTIME_S(inode->i_mtime)); + inode->i_nlink, (unsigned long long)LTIME_S(inode->i_atime), + (unsigned long long)LTIME_S(inode->i_ctime), + (unsigned long long)LTIME_S(inode->i_mtime)); /* for slave stripe, it needs to subtract nlink for . and .. */ if (i) diff --git a/drivers/staging/lustre/lustre/mdc/mdc_reint.c b/drivers/staging/lustre/lustre/mdc/mdc_reint.c index 488b98007558..f1ccf8d26ddc 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_reint.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_reint.c @@ -129,9 +129,9 @@ int mdc_setattr(struct obd_export *exp, struct md_op_data *op_data, } if (op_data->op_attr.ia_valid & (ATTR_MTIME | ATTR_CTIME)) - CDEBUG(D_INODE, "setting mtime %ld, ctime %ld\n", - LTIME_S(op_data->op_attr.ia_mtime), - LTIME_S(op_data->op_attr.ia_ctime)); + CDEBUG(D_INODE, "setting mtime %lld, ctime %lld\n", + (long long)LTIME_S(op_data->op_attr.ia_mtime), + (long long)LTIME_S(op_data->op_attr.ia_ctime)); mdc_setattr_pack(req, op_data, ea, ealen); ptlrpc_request_set_replen(req); diff --git a/drivers/staging/lustre/lustre/obdclass/obdo.c b/drivers/staging/lustre/lustre/obdclass/obdo.c index c4503bc36591..8f4054aa970b 100644 --- a/drivers/staging/lustre/lustre/obdclass/obdo.c +++ b/drivers/staging/lustre/lustre/obdclass/obdo.c @@ -60,9 +60,9 @@ void obdo_from_inode(struct obdo *dst, struct inode *src, u32 valid) u32 newvalid = 0; if (valid & (OBD_MD_FLCTIME | OBD_MD_FLMTIME)) - CDEBUG(D_INODE, "valid %x, new time %lu/%lu\n", - valid, LTIME_S(src->i_mtime), - LTIME_S(src->i_ctime)); + CDEBUG(D_INODE, "valid %x, new time %llu/%llu\n", + valid, (long long)LTIME_S(src->i_mtime), + (long long)LTIME_S(src->i_ctime)); if (valid & OBD_MD_FLATIME) { dst->o_atime = LTIME_S(src->i_atime);