aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_log_priv.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_log_priv.h')
-rw-r--r--fs/xfs/xfs_log_priv.h26
1 files changed, 22 insertions, 4 deletions
diff --git a/fs/xfs/xfs_log_priv.h b/fs/xfs/xfs_log_priv.h
index a5b3c021a406..2f74c80a7a40 100644
--- a/fs/xfs/xfs_log_priv.h
+++ b/fs/xfs/xfs_log_priv.h
@@ -518,10 +518,8 @@ typedef struct log {
518 spinlock_t l_grant_lock ____cacheline_aligned_in_smp; 518 spinlock_t l_grant_lock ____cacheline_aligned_in_smp;
519 struct list_head l_reserveq; 519 struct list_head l_reserveq;
520 struct list_head l_writeq; 520 struct list_head l_writeq;
521 int l_grant_reserve_cycle; 521 int64_t l_grant_reserve_head;
522 int l_grant_reserve_bytes; 522 int64_t l_grant_write_head;
523 int l_grant_write_cycle;
524 int l_grant_write_bytes;
525 523
526 /* The following field are used for debugging; need to hold icloglock */ 524 /* The following field are used for debugging; need to hold icloglock */
527#ifdef DEBUG 525#ifdef DEBUG
@@ -561,6 +559,26 @@ int xlog_write(struct log *log, struct xfs_log_vec *log_vector,
561 xlog_in_core_t **commit_iclog, uint flags); 559 xlog_in_core_t **commit_iclog, uint flags);
562 560
563/* 561/*
562 * When we crack the grrant head, we sample it first so that the value will not
563 * change while we are cracking it into the component values. This means we
564 * will always get consistent component values to work from.
565 */
566static inline void
567xlog_crack_grant_head(int64_t *head, int *cycle, int *space)
568{
569 int64_t val = *head;
570
571 *cycle = val >> 32;
572 *space = val & 0xffffffff;
573}
574
575static inline void
576xlog_assign_grant_head(int64_t *head, int cycle, int space)
577{
578 *head = ((int64_t)cycle << 32) | space;
579}
580
581/*
564 * Committed Item List interfaces 582 * Committed Item List interfaces
565 */ 583 */
566int xlog_cil_init(struct log *log); 584int xlog_cil_init(struct log *log);