fnic: use 64-bit timestamps
Subsystems (2)
PATCH 1/1 fnic: use 64-bit timestamps
struct timespec is deprecated since it overflows in 2038 on 32-bit architectures, so we should use timespec64 consistently.
I'm slightly adapting the format strings here, to make sure we print the nanoseconds with the correct number of leading zeroes.
Signed-off-by Arnd Bergmann <[email protected]>
--- drivers/scsi/fnic/fnic_debugfs.c | 2 +- drivers/scsi/fnic/fnic_stats.h | 4 +-- drivers/scsi/fnic/fnic_trace.c | 58 ++++++++++++++++++++-------------------- 3 files changed, 32 insertions(+), 32 deletions(-)
drivers/scsi/fnic/fnic_debugfs.c +1 -1
@@ -632,7 +632,7 @@ static ssize_t fnic_reset_stats_write(struct file *file, sizeof(struct io_path_stats) - sizeof(u64));memset (fw_stats_p+1 ,0 ,sizeof (struct fw_stats ) -sizeof (u64)); -getnstimeofday (&stats->stats_timestamps.last_reset_time); +ktime_get_real_ts64 (&stats->stats_timestamps.last_reset_time); } (*ppos)++;
drivers/scsi/fnic/fnic_stats.h +2 -2
@@ -18,8 +18,8 @@#define _FNIC_STATS_H_struct stats_timestamps { -struct timespec last_reset_time; -struct timespec last_read_time; +struct timespec64 last_reset_time; +struct timespec64 last_read_time; };struct io_path_stats {
drivers/scsi/fnic/fnic_trace.c +29 -29
122 lines not on this page · raw message
Signature · 1 line
2.9.0
Quoted 6 lines
struct timespec is deprecated since it overflows in 2038 on 32-bit architectures, so we should use timespec64 consistently.
I'm slightly adapting the format strings here, to make sure we print the nanoseconds with the correct number of leading zeroes.
Satish: Please review/test. Thank you!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering