aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache/journal.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/bcache/journal.h')
-rw-r--r--drivers/md/bcache/journal.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/md/bcache/journal.h b/drivers/md/bcache/journal.h
index 06b3eaab7d16..f2ea34d5f431 100644
--- a/drivers/md/bcache/journal.h
+++ b/drivers/md/bcache/journal.h
@@ -157,6 +157,10 @@ struct journal_device {
};
#define BTREE_FLUSH_NR 8
+
+#define journal_pin_cmp(c, l, r) \
+ (fifo_idx(&(c)->journal.pin, (l)) > fifo_idx(&(c)->journal.pin, (r)))
+
#define JOURNAL_PIN 20000
#define journal_full(j) \