提交 0ed1e90a 编写于 作者: A Arnd Bergmann 提交者: Ilya Dryomov

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: NArnd Bergmann <arnd@arndb.de>
Reviewed-by: N"Yan, Zheng" <zyan@redhat.com>
Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
上级 fac02ddf
...@@ -2136,7 +2136,7 @@ int __ceph_setattr(struct inode *inode, struct iattr *attr) ...@@ -2136,7 +2136,7 @@ int __ceph_setattr(struct inode *inode, struct iattr *attr)
req->r_inode_drop = release; req->r_inode_drop = release;
req->r_args.setattr.mask = cpu_to_le32(mask); req->r_args.setattr.mask = cpu_to_le32(mask);
req->r_num_caps = 1; req->r_num_caps = 1;
req->r_stamp = timespec64_to_timespec(attr->ia_ctime); req->r_stamp = attr->ia_ctime;
err = ceph_mdsc_do_request(mdsc, NULL, req); err = ceph_mdsc_do_request(mdsc, NULL, req);
} }
dout("setattr %p result=%d (%s locally, %d remote)\n", inode, err, dout("setattr %p result=%d (%s locally, %d remote)\n", inode, err,
......
...@@ -1799,8 +1799,7 @@ ceph_mdsc_create_request(struct ceph_mds_client *mdsc, int op, int mode) ...@@ -1799,8 +1799,7 @@ ceph_mdsc_create_request(struct ceph_mds_client *mdsc, int op, int mode)
INIT_LIST_HEAD(&req->r_unsafe_item); INIT_LIST_HEAD(&req->r_unsafe_item);
ktime_get_coarse_real_ts64(&ts); ktime_get_coarse_real_ts64(&ts);
req->r_stamp = timespec64_to_timespec(timespec64_trunc(ts, req->r_stamp = timespec64_trunc(ts, mdsc->fsc->sb->s_time_gran);
mdsc->fsc->sb->s_time_gran));
req->r_op = op; req->r_op = op;
req->r_direct_mode = mode; req->r_direct_mode = mode;
...@@ -2097,7 +2096,7 @@ static struct ceph_msg *create_request_message(struct ceph_mds_client *mdsc, ...@@ -2097,7 +2096,7 @@ static struct ceph_msg *create_request_message(struct ceph_mds_client *mdsc,
/* time stamp */ /* time stamp */
{ {
struct ceph_timespec ts; struct ceph_timespec ts;
ceph_encode_timespec(&ts, &req->r_stamp); ceph_encode_timespec64(&ts, &req->r_stamp);
ceph_encode_copy(&p, &ts, sizeof(ts)); ceph_encode_copy(&p, &ts, sizeof(ts));
} }
...@@ -2190,7 +2189,7 @@ static int __prepare_send_request(struct ceph_mds_client *mdsc, ...@@ -2190,7 +2189,7 @@ static int __prepare_send_request(struct ceph_mds_client *mdsc,
p = msg->front.iov_base + req->r_request_release_offset; p = msg->front.iov_base + req->r_request_release_offset;
{ {
struct ceph_timespec ts; struct ceph_timespec ts;
ceph_encode_timespec(&ts, &req->r_stamp); ceph_encode_timespec64(&ts, &req->r_stamp);
ceph_encode_copy(&p, &ts, sizeof(ts)); ceph_encode_copy(&p, &ts, sizeof(ts));
} }
......
...@@ -229,7 +229,7 @@ struct ceph_mds_request { ...@@ -229,7 +229,7 @@ struct ceph_mds_request {
int r_fmode; /* file mode, if expecting cap */ int r_fmode; /* file mode, if expecting cap */
kuid_t r_uid; kuid_t r_uid;
kgid_t r_gid; kgid_t r_gid;
struct timespec r_stamp; struct timespec64 r_stamp;
/* for choosing which mds to send this request to */ /* for choosing which mds to send this request to */
int r_direct_mode; int r_direct_mode;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册