summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/bcache.h
diff options
context:
space:
mode:
authorArnd Bergmann2018-07-26 06:17:41 +0200
committerJens Axboe2018-07-27 17:15:47 +0200
commit75cbb3f1d840429e6aa67b351332f38b29e6292c (patch)
tree3086aa7a8cbbd7b3cdbdb4b0b24cf278aedcfbe3 /include/uapi/linux/bcache.h
parentbcache: do not assign in if condition in bcache_device_init() (diff)
downloadkernel-qcow2-linux-75cbb3f1d840429e6aa67b351332f38b29e6292c.tar.gz
kernel-qcow2-linux-75cbb3f1d840429e6aa67b351332f38b29e6292c.tar.xz
kernel-qcow2-linux-75cbb3f1d840429e6aa67b351332f38b29e6292c.zip
bcache: stop using the deprecated get_seconds()
The get_seconds function is deprecated now since it returns a 32-bit value that will eventually overflow, and we are replacing it throughout the kernel with ktime_get_seconds() or ktime_get_real_seconds() that return a time64_t. bcache uses get_seconds() to read the current system time and store it in the superblock as well as in uuid_entry structures that are user visible. Unfortunately, the two structures in are still limited to 32 bits, so this won't fix any real problems but will still overflow in year 2106. Let's at least document that properly, in case we get an updated format in the future it can be fixed. We still have a long time before the overflow and checking the tools at https://github.com/koverstreet/bcache-tools reveals no access to any of them. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Coly Li <colyli@suse.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/uapi/linux/bcache.h')
-rw-r--r--include/uapi/linux/bcache.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/uapi/linux/bcache.h b/include/uapi/linux/bcache.h
index 821f71a2e48f..8d19e02d752a 100644
--- a/include/uapi/linux/bcache.h
+++ b/include/uapi/linux/bcache.h
@@ -195,7 +195,7 @@ struct cache_sb {
};
};
- __u32 last_mount; /* time_t */
+ __u32 last_mount; /* time overflow in y2106 */
__u16 first_bucket;
union {
@@ -318,7 +318,7 @@ struct uuid_entry {
struct {
__u8 uuid[16];
__u8 label[32];
- __u32 first_reg;
+ __u32 first_reg; /* time overflow in y2106 */
__u32 last_reg;
__u32 invalidated;