]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
btrfs: Use ktime_get_real_ts for root ctime
authorDeepa Dinamani <deepa.kernel@gmail.com>
Sat, 8 Apr 2017 00:57:05 +0000 (17:57 -0700)
committerDavid Sterba <dsterba@suse.com>
Tue, 18 Apr 2017 12:07:27 +0000 (14:07 +0200)
commitfa7aede2ab5f54352c7aec056930dd17b28f3a78
treec9c45ac1a5eda9a0c8ee46e824e763eda228cdb5
parent9986277e0e4ce10fd37bf853fe22ba429a967a45
btrfs: Use ktime_get_real_ts for root ctime

btrfs_root_item maintains the ctime for root updates.  This is not part
of vfs_inode.

Since current_time() uses struct inode* as an argument as Linus
suggested, this cannot be used to update root times unless, we modify
the signature to use inode.

Since btrfs uses nanosecond time granularity, it can also use
ktime_get_real_ts directly to obtain timestamp for the root. It is
necessary to use the timespec time api here because the same
btrfs_set_stack_timespec_*() apis are used for vfs inode times as well.
These can be transitioned to using timespec64 when btrfs internally
changes to use timespec64 as well.

Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Acked-by: David Sterba <dsterba@suse.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/root-tree.c