summaryrefslogtreecommitdiff
path: root/drivers/md/bcache/util.h
diff options
context:
space:
mode:
authorKent Overstreet <kmo@daterainc.com>2013-12-21 01:24:46 (GMT)
committerKent Overstreet <kmo@daterainc.com>2014-01-08 21:05:11 (GMT)
commit9a02b7eeeb446a0418ec83afc80eb38bc188f5c8 (patch)
tree5bd89524457deb026aae402150f0f81553f7f7c8 /drivers/md/bcache/util.h
parent0a45114534766058193eb2605c136562a4f7bcc8 (diff)
downloadlinux-9a02b7eeeb446a0418ec83afc80eb38bc188f5c8.tar.xz
bcache: Remove/fix some header dependencies
In the process of disentagling/libraryizing bset.c from the rest of the bcache code. Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Diffstat (limited to 'drivers/md/bcache/util.h')
-rw-r--r--drivers/md/bcache/util.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/md/bcache/util.h b/drivers/md/bcache/util.h
index 1030c60..3ebaef5 100644
--- a/drivers/md/bcache/util.h
+++ b/drivers/md/bcache/util.h
@@ -2,6 +2,7 @@
#ifndef _BCACHE_UTIL_H
#define _BCACHE_UTIL_H
+#include <linux/blkdev.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/llist.h>
@@ -391,6 +392,11 @@ struct time_stats {
void bch_time_stats_update(struct time_stats *stats, uint64_t time);
+static inline unsigned local_clock_us(void)
+{
+ return local_clock() >> 10;
+}
+
#define NSEC_PER_ns 1L
#define NSEC_PER_us NSEC_PER_USEC
#define NSEC_PER_ms NSEC_PER_MSEC