mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-16 06:31:46 +00:00
ceph: make inode time prints to be long long
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: zyan@redhat.com Cc: ceph-devel@vger.kernel.org
This commit is contained in:
parent
18a592632e
commit
13442b036a
@ -671,18 +671,18 @@ void ceph_fill_file_time(struct inode *inode, int issued,
|
|||||||
CEPH_CAP_XATTR_EXCL)) {
|
CEPH_CAP_XATTR_EXCL)) {
|
||||||
if (ci->i_version == 0 ||
|
if (ci->i_version == 0 ||
|
||||||
timespec_compare(ctime, &inode->i_ctime) > 0) {
|
timespec_compare(ctime, &inode->i_ctime) > 0) {
|
||||||
dout("ctime %ld.%09ld -> %ld.%09ld inc w/ cap\n",
|
dout("ctime %lld.%09ld -> %lld.%09ld inc w/ cap\n",
|
||||||
inode->i_ctime.tv_sec, inode->i_ctime.tv_nsec,
|
(long long)inode->i_ctime.tv_sec, inode->i_ctime.tv_nsec,
|
||||||
ctime->tv_sec, ctime->tv_nsec);
|
(long long)ctime->tv_sec, ctime->tv_nsec);
|
||||||
inode->i_ctime = *ctime;
|
inode->i_ctime = *ctime;
|
||||||
}
|
}
|
||||||
if (ci->i_version == 0 ||
|
if (ci->i_version == 0 ||
|
||||||
ceph_seq_cmp(time_warp_seq, ci->i_time_warp_seq) > 0) {
|
ceph_seq_cmp(time_warp_seq, ci->i_time_warp_seq) > 0) {
|
||||||
/* the MDS did a utimes() */
|
/* the MDS did a utimes() */
|
||||||
dout("mtime %ld.%09ld -> %ld.%09ld "
|
dout("mtime %lld.%09ld -> %lld.%09ld "
|
||||||
"tw %d -> %d\n",
|
"tw %d -> %d\n",
|
||||||
inode->i_mtime.tv_sec, inode->i_mtime.tv_nsec,
|
(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,
|
||||||
ci->i_time_warp_seq, (int)time_warp_seq);
|
ci->i_time_warp_seq, (int)time_warp_seq);
|
||||||
|
|
||||||
inode->i_mtime = *mtime;
|
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) {
|
} else if (time_warp_seq == ci->i_time_warp_seq) {
|
||||||
/* nobody did utimes(); take the max */
|
/* nobody did utimes(); take the max */
|
||||||
if (timespec_compare(mtime, &inode->i_mtime) > 0) {
|
if (timespec_compare(mtime, &inode->i_mtime) > 0) {
|
||||||
dout("mtime %ld.%09ld -> %ld.%09ld inc\n",
|
dout("mtime %lld.%09ld -> %lld.%09ld inc\n",
|
||||||
inode->i_mtime.tv_sec,
|
(long long)inode->i_mtime.tv_sec,
|
||||||
inode->i_mtime.tv_nsec,
|
inode->i_mtime.tv_nsec,
|
||||||
mtime->tv_sec, mtime->tv_nsec);
|
(long long)mtime->tv_sec, mtime->tv_nsec);
|
||||||
inode->i_mtime = *mtime;
|
inode->i_mtime = *mtime;
|
||||||
}
|
}
|
||||||
if (timespec_compare(atime, &inode->i_atime) > 0) {
|
if (timespec_compare(atime, &inode->i_atime) > 0) {
|
||||||
dout("atime %ld.%09ld -> %ld.%09ld inc\n",
|
dout("atime %lld.%09ld -> %lld.%09ld inc\n",
|
||||||
inode->i_atime.tv_sec,
|
(long long)inode->i_atime.tv_sec,
|
||||||
inode->i_atime.tv_nsec,
|
inode->i_atime.tv_nsec,
|
||||||
atime->tv_sec, atime->tv_nsec);
|
(long long)atime->tv_sec, atime->tv_nsec);
|
||||||
inode->i_atime = *atime;
|
inode->i_atime = *atime;
|
||||||
}
|
}
|
||||||
} else if (issued & CEPH_CAP_FILE_EXCL) {
|
} 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) {
|
if (ia_valid & ATTR_ATIME) {
|
||||||
dout("setattr %p atime %ld.%ld -> %ld.%ld\n", inode,
|
dout("setattr %p atime %lld.%ld -> %lld.%ld\n", inode,
|
||||||
inode->i_atime.tv_sec, inode->i_atime.tv_nsec,
|
(long long)inode->i_atime.tv_sec, inode->i_atime.tv_nsec,
|
||||||
attr->ia_atime.tv_sec, attr->ia_atime.tv_nsec);
|
(long long)attr->ia_atime.tv_sec, attr->ia_atime.tv_nsec);
|
||||||
if (issued & CEPH_CAP_FILE_EXCL) {
|
if (issued & CEPH_CAP_FILE_EXCL) {
|
||||||
ci->i_time_warp_seq++;
|
ci->i_time_warp_seq++;
|
||||||
inode->i_atime = attr->ia_atime;
|
inode->i_atime = attr->ia_atime;
|
||||||
@ -2037,9 +2037,9 @@ int __ceph_setattr(struct inode *inode, struct iattr *attr)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ia_valid & ATTR_MTIME) {
|
if (ia_valid & ATTR_MTIME) {
|
||||||
dout("setattr %p mtime %ld.%ld -> %ld.%ld\n", inode,
|
dout("setattr %p mtime %lld.%ld -> %lld.%ld\n", inode,
|
||||||
inode->i_mtime.tv_sec, inode->i_mtime.tv_nsec,
|
(long long)inode->i_mtime.tv_sec, inode->i_mtime.tv_nsec,
|
||||||
attr->ia_mtime.tv_sec, attr->ia_mtime.tv_nsec);
|
(long long)attr->ia_mtime.tv_sec, attr->ia_mtime.tv_nsec);
|
||||||
if (issued & CEPH_CAP_FILE_EXCL) {
|
if (issued & CEPH_CAP_FILE_EXCL) {
|
||||||
ci->i_time_warp_seq++;
|
ci->i_time_warp_seq++;
|
||||||
inode->i_mtime = attr->ia_mtime;
|
inode->i_mtime = attr->ia_mtime;
|
||||||
@ -2082,9 +2082,9 @@ int __ceph_setattr(struct inode *inode, struct iattr *attr)
|
|||||||
if (ia_valid & ATTR_CTIME) {
|
if (ia_valid & ATTR_CTIME) {
|
||||||
bool only = (ia_valid & (ATTR_SIZE|ATTR_MTIME|ATTR_ATIME|
|
bool only = (ia_valid & (ATTR_SIZE|ATTR_MTIME|ATTR_ATIME|
|
||||||
ATTR_MODE|ATTR_UID|ATTR_GID)) == 0;
|
ATTR_MODE|ATTR_UID|ATTR_GID)) == 0;
|
||||||
dout("setattr %p ctime %ld.%ld -> %ld.%ld (%s)\n", inode,
|
dout("setattr %p ctime %lld.%ld -> %lld.%ld (%s)\n", inode,
|
||||||
inode->i_ctime.tv_sec, inode->i_ctime.tv_nsec,
|
(long long)inode->i_ctime.tv_sec, inode->i_ctime.tv_nsec,
|
||||||
attr->ia_ctime.tv_sec, attr->ia_ctime.tv_nsec,
|
(long long)attr->ia_ctime.tv_sec, attr->ia_ctime.tv_nsec,
|
||||||
only ? "ctime only" : "ignored");
|
only ? "ctime only" : "ignored");
|
||||||
if (only) {
|
if (only) {
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user