diff options
author | Jan Harkes <jaharkes@cs.cmu.edu> | 2019-07-16 19:28:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-16 22:23:23 -0400 |
commit | 5e7c31dfe74703f428220384b2863525957cc160 (patch) | |
tree | 83b0eef7ab15394a95a96f90d66e1a002e9539df /include/uapi | |
parent | 6ced9aa7b56baeb241a715df4539e60d5e3118e2 (diff) |
coda: change Coda's user api to use 64-bit time_t in timespec
Move the 32-bit time_t problems to userspace.
Link: http://lkml.kernel.org/r/8d089068823bfb292a4020f773922fbd82ffad39.1558117389.git.jaharkes@cs.cmu.edu
Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Colin Ian King <colin.king@canonical.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Fabian Frederick <fabf@skynet.be>
Cc: Mikko Rapeli <mikko.rapeli@iki.fi>
Cc: Sam Protsenko <semen.protsenko@linaro.org>
Cc: Yann Droneaud <ydroneaud@opteya.com>
Cc: Zhouyang Jia <jiazhouyang09@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/uapi')
-rw-r--r-- | include/uapi/linux/coda.h | 33 |
1 files changed, 7 insertions, 26 deletions
diff --git a/include/uapi/linux/coda.h b/include/uapi/linux/coda.h index fc5f7874208a..5dba636b6e11 100644 --- a/include/uapi/linux/coda.h +++ b/include/uapi/linux/coda.h | |||
@@ -86,10 +86,6 @@ typedef unsigned long long u_quad_t; | |||
86 | 86 | ||
87 | #define inline | 87 | #define inline |
88 | 88 | ||
89 | struct timespec { | ||
90 | long ts_sec; | ||
91 | long ts_nsec; | ||
92 | }; | ||
93 | #else /* DJGPP but not KERNEL */ | 89 | #else /* DJGPP but not KERNEL */ |
94 | #include <sys/time.h> | 90 | #include <sys/time.h> |
95 | typedef unsigned long long u_quad_t; | 91 | typedef unsigned long long u_quad_t; |
@@ -110,13 +106,6 @@ typedef unsigned long long u_quad_t; | |||
110 | #define cdev_t dev_t | 106 | #define cdev_t dev_t |
111 | #endif | 107 | #endif |
112 | 108 | ||
113 | #ifdef __CYGWIN32__ | ||
114 | struct timespec { | ||
115 | time_t tv_sec; /* seconds */ | ||
116 | long tv_nsec; /* nanoseconds */ | ||
117 | }; | ||
118 | #endif | ||
119 | |||
120 | #ifndef __BIT_TYPES_DEFINED__ | 109 | #ifndef __BIT_TYPES_DEFINED__ |
121 | #define __BIT_TYPES_DEFINED__ | 110 | #define __BIT_TYPES_DEFINED__ |
122 | typedef signed char int8_t; | 111 | typedef signed char int8_t; |
@@ -211,19 +200,10 @@ struct CodaFid { | |||
211 | */ | 200 | */ |
212 | enum coda_vtype { C_VNON, C_VREG, C_VDIR, C_VBLK, C_VCHR, C_VLNK, C_VSOCK, C_VFIFO, C_VBAD }; | 201 | enum coda_vtype { C_VNON, C_VREG, C_VDIR, C_VBLK, C_VCHR, C_VLNK, C_VSOCK, C_VFIFO, C_VBAD }; |
213 | 202 | ||
214 | #ifdef __linux__ | 203 | struct coda_timespec { |
215 | /* | 204 | int64_t tv_sec; /* seconds */ |
216 | * This matches the traditional Linux 'timespec' structure binary layout, | ||
217 | * before using 64-bit time_t everywhere. Overflows in y2038 on 32-bit | ||
218 | * architectures. | ||
219 | */ | ||
220 | struct vtimespec { | ||
221 | long tv_sec; /* seconds */ | ||
222 | long tv_nsec; /* nanoseconds */ | 205 | long tv_nsec; /* nanoseconds */ |
223 | }; | 206 | }; |
224 | #else | ||
225 | #define vtimespec timespec | ||
226 | #endif | ||
227 | 207 | ||
228 | struct coda_vattr { | 208 | struct coda_vattr { |
229 | long va_type; /* vnode type (for create) */ | 209 | long va_type; /* vnode type (for create) */ |
@@ -234,9 +214,9 @@ struct coda_vattr { | |||
234 | long va_fileid; /* file id */ | 214 | long va_fileid; /* file id */ |
235 | u_quad_t va_size; /* file size in bytes */ | 215 | u_quad_t va_size; /* file size in bytes */ |
236 | long va_blocksize; /* blocksize preferred for i/o */ | 216 | long va_blocksize; /* blocksize preferred for i/o */ |
237 | struct vtimespec va_atime; /* time of last access */ | 217 | struct coda_timespec va_atime; /* time of last access */ |
238 | struct vtimespec va_mtime; /* time of last modification */ | 218 | struct coda_timespec va_mtime; /* time of last modification */ |
239 | struct vtimespec va_ctime; /* time file changed */ | 219 | struct coda_timespec va_ctime; /* time file changed */ |
240 | u_long va_gen; /* generation number of file */ | 220 | u_long va_gen; /* generation number of file */ |
241 | u_long va_flags; /* flags defined for file */ | 221 | u_long va_flags; /* flags defined for file */ |
242 | cdev_t va_rdev; /* device special file represents */ | 222 | cdev_t va_rdev; /* device special file represents */ |
@@ -301,7 +281,8 @@ struct coda_statfs { | |||
301 | 281 | ||
302 | #define CIOC_KERNEL_VERSION _IOWR('c', 10, size_t) | 282 | #define CIOC_KERNEL_VERSION _IOWR('c', 10, size_t) |
303 | 283 | ||
304 | #define CODA_KERNEL_VERSION 3 /* 128-bit file identifiers */ | 284 | // CODA_KERNEL_VERSION 3 /* 128-bit file identifiers */ |
285 | #define CODA_KERNEL_VERSION 4 /* 64-bit timespec */ | ||
305 | 286 | ||
306 | /* | 287 | /* |
307 | * Venus <-> Coda RPC arguments | 288 | * Venus <-> Coda RPC arguments |