LKML Archive on lore.kernel.org help / color / mirror / Atom feed
From: Deepa Dinamani <deepa.kernel@gmail.com> 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 [thread overview] Message-ID: <20180512045921.18311-3-deepa.kernel@gmail.com> (raw) In-Reply-To: <20180512045921.18311-1-deepa.kernel@gmail.com> 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 <deepa.kernel@gmail.com> 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); -- 2.17.0
next prev parent reply other threads:[~2018-05-12 5:01 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-05-12 4:59 [PATCH 0/6] Transition vfs to 64-bit timestamps Deepa Dinamani 2018-05-12 4:59 ` [PATCH 1/6] fs: add timespec64_truncate() Deepa Dinamani 2018-05-12 4:59 ` Deepa Dinamani [this message] 2018-05-12 4:59 ` [PATCH 3/6] ceph: make inode time prints to be long long Deepa Dinamani 2018-05-12 4:59 ` [PATCH 4/6] fs: nfs: get rid of memcpys for inode times Deepa Dinamani 2018-05-12 4:59 ` [PATCH 5/6] udf: Simplify calls to udf_disk_stamp_to_time Deepa Dinamani 2018-05-14 13:57 ` Jan Kara 2018-05-15 17:48 ` Deepa Dinamani 2018-05-12 4:59 ` [PATCH 6/6] vfs: change inode times to use struct timespec64 Deepa Dinamani 2018-05-12 6:44 ` Kees Cook 2018-05-14 4:05 ` Deepa Dinamani 2018-05-14 16:30 ` Kees Cook 2018-05-14 17:25 ` Deepa Dinamani 2018-05-14 17:53 ` Kees Cook 2018-05-14 18:23 ` Deepa Dinamani 2018-05-14 18:28 ` Kees Cook 2018-05-17 1:13 ` Arnd Bergmann
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20180512045921.18311-3-deepa.kernel@gmail.com \ --to=deepa.kernel@gmail.com \ --cc=andreas.dilger@intel.com \ --cc=arnd@arndb.de \ --cc=linux-fsdevel@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=tglx@linutronix.de \ --cc=viro@zeniv.linux.org.uk \ --cc=y2038@lists.linaro.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).