diff options
author | Arnd Bergmann <arnd@arndb.de> | 2018-07-13 16:18:38 -0400 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2018-08-02 15:33:19 -0400 |
commit | 0ed1e90a09eb0e2863cab43e1ed5c5df89566772 (patch) | |
tree | c8ff47546b0ab87c3cfb8ddc27cda86811429115 | |
parent | fac02ddf910814c24f5d9d969dfdab5227f6f3eb (diff) |
ceph: use timespec64 for r_stamp
The ceph_mds_request stamp still uses the deprecated timespec structure,
this converts it over as well.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
-rw-r--r-- | fs/ceph/inode.c | 2 | ||||
-rw-r--r-- | fs/ceph/mds_client.c | 7 | ||||
-rw-r--r-- | fs/ceph/mds_client.h | 2 |
3 files changed, 5 insertions, 6 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index 715a6f2a4613..d62f65f2875d 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c | |||
@@ -2136,7 +2136,7 @@ int __ceph_setattr(struct inode *inode, struct iattr *attr) | |||
2136 | req->r_inode_drop = release; | 2136 | req->r_inode_drop = release; |
2137 | req->r_args.setattr.mask = cpu_to_le32(mask); | 2137 | req->r_args.setattr.mask = cpu_to_le32(mask); |
2138 | req->r_num_caps = 1; | 2138 | req->r_num_caps = 1; |
2139 | req->r_stamp = timespec64_to_timespec(attr->ia_ctime); | 2139 | req->r_stamp = attr->ia_ctime; |
2140 | err = ceph_mdsc_do_request(mdsc, NULL, req); | 2140 | err = ceph_mdsc_do_request(mdsc, NULL, req); |
2141 | } | 2141 | } |
2142 | dout("setattr %p result=%d (%s locally, %d remote)\n", inode, err, | 2142 | dout("setattr %p result=%d (%s locally, %d remote)\n", inode, err, |
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index a1a510438b7c..f5a299daae95 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c | |||
@@ -1799,8 +1799,7 @@ ceph_mdsc_create_request(struct ceph_mds_client *mdsc, int op, int mode) | |||
1799 | INIT_LIST_HEAD(&req->r_unsafe_item); | 1799 | INIT_LIST_HEAD(&req->r_unsafe_item); |
1800 | 1800 | ||
1801 | ktime_get_coarse_real_ts64(&ts); | 1801 | ktime_get_coarse_real_ts64(&ts); |
1802 | req->r_stamp = timespec64_to_timespec(timespec64_trunc(ts, | 1802 | req->r_stamp = timespec64_trunc(ts, mdsc->fsc->sb->s_time_gran); |
1803 | mdsc->fsc->sb->s_time_gran)); | ||
1804 | 1803 | ||
1805 | req->r_op = op; | 1804 | req->r_op = op; |
1806 | req->r_direct_mode = mode; | 1805 | req->r_direct_mode = mode; |
@@ -2097,7 +2096,7 @@ static struct ceph_msg *create_request_message(struct ceph_mds_client *mdsc, | |||
2097 | /* time stamp */ | 2096 | /* time stamp */ |
2098 | { | 2097 | { |
2099 | struct ceph_timespec ts; | 2098 | struct ceph_timespec ts; |
2100 | ceph_encode_timespec(&ts, &req->r_stamp); | 2099 | ceph_encode_timespec64(&ts, &req->r_stamp); |
2101 | ceph_encode_copy(&p, &ts, sizeof(ts)); | 2100 | ceph_encode_copy(&p, &ts, sizeof(ts)); |
2102 | } | 2101 | } |
2103 | 2102 | ||
@@ -2190,7 +2189,7 @@ static int __prepare_send_request(struct ceph_mds_client *mdsc, | |||
2190 | p = msg->front.iov_base + req->r_request_release_offset; | 2189 | p = msg->front.iov_base + req->r_request_release_offset; |
2191 | { | 2190 | { |
2192 | struct ceph_timespec ts; | 2191 | struct ceph_timespec ts; |
2193 | ceph_encode_timespec(&ts, &req->r_stamp); | 2192 | ceph_encode_timespec64(&ts, &req->r_stamp); |
2194 | ceph_encode_copy(&p, &ts, sizeof(ts)); | 2193 | ceph_encode_copy(&p, &ts, sizeof(ts)); |
2195 | } | 2194 | } |
2196 | 2195 | ||
diff --git a/fs/ceph/mds_client.h b/fs/ceph/mds_client.h index 2ec3b5b35067..80a7523e1523 100644 --- a/fs/ceph/mds_client.h +++ b/fs/ceph/mds_client.h | |||
@@ -229,7 +229,7 @@ struct ceph_mds_request { | |||
229 | int r_fmode; /* file mode, if expecting cap */ | 229 | int r_fmode; /* file mode, if expecting cap */ |
230 | kuid_t r_uid; | 230 | kuid_t r_uid; |
231 | kgid_t r_gid; | 231 | kgid_t r_gid; |
232 | struct timespec r_stamp; | 232 | struct timespec64 r_stamp; |
233 | 233 | ||
234 | /* for choosing which mds to send this request to */ | 234 | /* for choosing which mds to send this request to */ |
235 | int r_direct_mode; | 235 | int r_direct_mode; |