libceph: use timespec64 for r_mtime
The request mtime field is used all over ceph, and is currently represented as a 'timespec' structure in Linux. This changes it to timespec64 to allow times beyond 2038, modifying all users at the same time. [ Remove now redundant ts variable in writepage_nounlock(). ] Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Ilya Dryomov <idryomov@gmail.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:

committed by
Ilya Dryomov

parent
9bbeab41ce
commit
fac02ddf91
@@ -1978,7 +1978,7 @@ static void encode_request_partial(struct ceph_osd_request *req,
|
||||
p += sizeof(struct ceph_blkin_trace_info);
|
||||
|
||||
ceph_encode_32(&p, 0); /* client_inc, always 0 */
|
||||
ceph_encode_timespec(p, &req->r_mtime);
|
||||
ceph_encode_timespec64(p, &req->r_mtime);
|
||||
p += sizeof(struct ceph_timespec);
|
||||
|
||||
encode_oloc(&p, end, &req->r_t.target_oloc);
|
||||
@@ -4512,7 +4512,7 @@ ceph_osdc_watch(struct ceph_osd_client *osdc,
|
||||
ceph_oid_copy(&lreq->t.base_oid, oid);
|
||||
ceph_oloc_copy(&lreq->t.base_oloc, oloc);
|
||||
lreq->t.flags = CEPH_OSD_FLAG_WRITE;
|
||||
ktime_get_real_ts(&lreq->mtime);
|
||||
ktime_get_real_ts64(&lreq->mtime);
|
||||
|
||||
lreq->reg_req = alloc_linger_request(lreq);
|
||||
if (!lreq->reg_req) {
|
||||
@@ -4570,7 +4570,7 @@ int ceph_osdc_unwatch(struct ceph_osd_client *osdc,
|
||||
ceph_oid_copy(&req->r_base_oid, &lreq->t.base_oid);
|
||||
ceph_oloc_copy(&req->r_base_oloc, &lreq->t.base_oloc);
|
||||
req->r_flags = CEPH_OSD_FLAG_WRITE;
|
||||
ktime_get_real_ts(&req->r_mtime);
|
||||
ktime_get_real_ts64(&req->r_mtime);
|
||||
osd_req_op_watch_init(req, 0, lreq->linger_id,
|
||||
CEPH_OSD_WATCH_OP_UNWATCH);
|
||||
|
||||
@@ -5136,7 +5136,7 @@ int ceph_osdc_writepages(struct ceph_osd_client *osdc, struct ceph_vino vino,
|
||||
struct ceph_snap_context *snapc,
|
||||
u64 off, u64 len,
|
||||
u32 truncate_seq, u64 truncate_size,
|
||||
struct timespec *mtime,
|
||||
struct timespec64 *mtime,
|
||||
struct page **pages, int num_pages)
|
||||
{
|
||||
struct ceph_osd_request *req;
|
||||
|
Reference in New Issue
Block a user