]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: use monotonic time for transaction handling
authorArnd Bergmann <arnd@arndb.de>
Thu, 21 Jun 2018 16:04:05 +0000 (18:04 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 6 Aug 2018 11:12:38 +0000 (13:12 +0200)
commit747f26bf8dc0a158e22833064259c6a776b49a61
treee1d06270a9aff6d87329b7a7ebb4fac2557a7888
parent797de16faaac4d38c283e41db3813e60a8a24f9c
btrfs: use monotonic time for transaction handling

The transaction times were changed to ktime_get_real_seconds to avoid
the y2038 overflow, but they still have a minor problem when they go
backwards or jump due to settimeofday() or leap seconds.

This changes the transaction handling to instead use ktime_get_seconds(),
which returns a CLOCK_MONOTONIC timestamp that has neither of those
problems.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/disk-io.c
fs/btrfs/transaction.c