summaryrefslogtreecommitdiffstats
path: root/drivers/nvmem
diff options
context:
space:
mode:
authorDeepa Dinamani <deepa.kernel@gmail.com>2015-12-21 10:51:01 +1100
committerNeilBrown <neilb@suse.com>2016-01-06 11:39:53 +1100
commit9ebc6ef188a0656f3620835f9be7fe22c1644c1c (patch)
tree08ac1b7cc613d6afef042e97efe281956dafe482 /drivers/nvmem
parent3312c951efaba55080958974047414576b9e5d63 (diff)
downloadblackbird-op-linux-9ebc6ef188a0656f3620835f9be7fe22c1644c1c.tar.gz
blackbird-op-linux-9ebc6ef188a0656f3620835f9be7fe22c1644c1c.zip
drivers: md: use ktime_get_real_seconds()
get_seconds() API is not y2038 safe on 32 bit systems and the API is deprecated. Replace it with calls to ktime_get_real_seconds() API instead. Change mddev structure types to time64_t accordingly. 32 bit signed timestamps will overflow in the year 2038. Change the user interface mdu_array_info_s structure timestamps: ctime and utime values used in ioctls GET_ARRAY_INFO and SET_ARRAY_INFO to unsigned int. This will extend the field to last until the year 2106. The long term plan is to get rid of ctime and utime values in this structure as this information can be read from the on-disk meta data directly. Clamp the tim64_t timestamps to positive values with a max of U32_MAX when returning from GET_ARRAY_INFO ioctl to accommodate above changes in the data type of timestamps to unsigned int. v0.90 on disk meta data uses u32 for maintaining time stamps. So this will also last until year 2106. Assumption is that the usage of v0.90 will be deprecated by year 2106. Timestamp fields in the on disk meta data for v1.0 version already use 64 bit data types. Remove the truncation of the bits while writing to or reading from these from the disk. Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: NeilBrown <neilb@suse.com>
Diffstat (limited to 'drivers/nvmem')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud