sx8: use real time for the command seconds
authorJens Axboe <axboe@fb.com>
Wed, 23 Dec 2015 15:42:59 +0000 (08:42 -0700)
committerJens Axboe <axboe@fb.com>
Wed, 23 Dec 2015 15:42:59 +0000 (08:42 -0700)
Commit 8182503df1ba used monotonic time, but if the adapter is
using the seconds for logging entries, then we'll get duplicate
entries if the system is rebooted. Use real time instead.

Reported-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 8182503df1ba ("block: sx8.c: Replace timeval with ktime_t")
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/block/sx8.c

index baadb777e03531c1fddabcf0e597fcf6f7f0cd2c..ba4bfe933276e34310a4208a10eb2e364dfefa7e 100644 (file)
@@ -673,7 +673,7 @@ static unsigned int carm_fill_sync_time(struct carm_host *host,
 {
        struct carm_msg_sync_time *st = mem;
 
-       time64_t tv = ktime_get_seconds();
+       time64_t tv = ktime_get_real_seconds();
 
        memset(st, 0, sizeof(*st));
        st->type        = CARM_MSG_MISC;