diff options
author | Arnd Bergmann <arnd@arndb.de> | 2018-07-13 16:18:37 -0400 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2018-08-02 15:33:14 -0400 |
commit | fac02ddf910814c24f5d9d969dfdab5227f6f3eb (patch) | |
tree | 1725d192db8d99bbc738b5d1ed576df07eac8276 /fs/ceph/file.c | |
parent | 9bbeab41ce50542624ef381e7852d70f2f39a2b1 (diff) |
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>
Diffstat (limited to 'fs/ceph/file.c')
-rw-r--r-- | fs/ceph/file.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c index ad0bed99b1d5..2f3a30ca94bf 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c | |||
@@ -721,7 +721,7 @@ struct ceph_aio_request { | |||
721 | struct list_head osd_reqs; | 721 | struct list_head osd_reqs; |
722 | unsigned num_reqs; | 722 | unsigned num_reqs; |
723 | atomic_t pending_reqs; | 723 | atomic_t pending_reqs; |
724 | struct timespec mtime; | 724 | struct timespec64 mtime; |
725 | struct ceph_cap_flush *prealloc_cf; | 725 | struct ceph_cap_flush *prealloc_cf; |
726 | }; | 726 | }; |
727 | 727 | ||
@@ -923,7 +923,7 @@ ceph_direct_read_write(struct kiocb *iocb, struct iov_iter *iter, | |||
923 | int num_pages = 0; | 923 | int num_pages = 0; |
924 | int flags; | 924 | int flags; |
925 | int ret; | 925 | int ret; |
926 | struct timespec mtime = timespec64_to_timespec(current_time(inode)); | 926 | struct timespec64 mtime = current_time(inode); |
927 | size_t count = iov_iter_count(iter); | 927 | size_t count = iov_iter_count(iter); |
928 | loff_t pos = iocb->ki_pos; | 928 | loff_t pos = iocb->ki_pos; |
929 | bool write = iov_iter_rw(iter) == WRITE; | 929 | bool write = iov_iter_rw(iter) == WRITE; |
@@ -1131,7 +1131,7 @@ ceph_sync_write(struct kiocb *iocb, struct iov_iter *from, loff_t pos, | |||
1131 | int flags; | 1131 | int flags; |
1132 | int ret; | 1132 | int ret; |
1133 | bool check_caps = false; | 1133 | bool check_caps = false; |
1134 | struct timespec mtime = timespec64_to_timespec(current_time(inode)); | 1134 | struct timespec64 mtime = current_time(inode); |
1135 | size_t count = iov_iter_count(from); | 1135 | size_t count = iov_iter_count(from); |
1136 | 1136 | ||
1137 | if (ceph_snap(file_inode(file)) != CEPH_NOSNAP) | 1137 | if (ceph_snap(file_inode(file)) != CEPH_NOSNAP) |
@@ -1663,7 +1663,7 @@ static int ceph_zero_partial_object(struct inode *inode, | |||
1663 | goto out; | 1663 | goto out; |
1664 | } | 1664 | } |
1665 | 1665 | ||
1666 | req->r_mtime = timespec64_to_timespec(inode->i_mtime); | 1666 | req->r_mtime = inode->i_mtime; |
1667 | ret = ceph_osdc_start_request(&fsc->client->osdc, req, false); | 1667 | ret = ceph_osdc_start_request(&fsc->client->osdc, req, false); |
1668 | if (!ret) { | 1668 | if (!ret) { |
1669 | ret = ceph_osdc_wait_request(&fsc->client->osdc, req); | 1669 | ret = ceph_osdc_wait_request(&fsc->client->osdc, req); |