diff options
author | Kent Overstreet <kmo@daterainc.com> | 2013-12-20 20:24:46 -0500 |
---|---|---|
committer | Kent Overstreet <kmo@daterainc.com> | 2014-01-08 16:05:11 -0500 |
commit | 9a02b7eeeb446a0418ec83afc80eb38bc188f5c8 (patch) | |
tree | 5bd89524457deb026aae402150f0f81553f7f7c8 /drivers/md/bcache/util.h | |
parent | 0a45114534766058193eb2605c136562a4f7bcc8 (diff) |
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.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/md/bcache/util.h b/drivers/md/bcache/util.h index 1030c6020e98..3ebaef5f645b 100644 --- a/drivers/md/bcache/util.h +++ b/drivers/md/bcache/util.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #ifndef _BCACHE_UTIL_H | 2 | #ifndef _BCACHE_UTIL_H |
3 | #define _BCACHE_UTIL_H | 3 | #define _BCACHE_UTIL_H |
4 | 4 | ||
5 | #include <linux/blkdev.h> | ||
5 | #include <linux/errno.h> | 6 | #include <linux/errno.h> |
6 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
7 | #include <linux/llist.h> | 8 | #include <linux/llist.h> |
@@ -391,6 +392,11 @@ struct time_stats { | |||
391 | 392 | ||
392 | void bch_time_stats_update(struct time_stats *stats, uint64_t time); | 393 | void bch_time_stats_update(struct time_stats *stats, uint64_t time); |
393 | 394 | ||
395 | static inline unsigned local_clock_us(void) | ||
396 | { | ||
397 | return local_clock() >> 10; | ||
398 | } | ||
399 | |||
394 | #define NSEC_PER_ns 1L | 400 | #define NSEC_PER_ns 1L |
395 | #define NSEC_PER_us NSEC_PER_USEC | 401 | #define NSEC_PER_us NSEC_PER_USEC |
396 | #define NSEC_PER_ms NSEC_PER_MSEC | 402 | #define NSEC_PER_ms NSEC_PER_MSEC |