diff options
Diffstat (limited to 'fs/xfs/xfs_log_priv.h')
-rw-r--r-- | fs/xfs/xfs_log_priv.h | 46 |
1 files changed, 31 insertions, 15 deletions
diff --git a/fs/xfs/xfs_log_priv.h b/fs/xfs/xfs_log_priv.h index 5bc33261f5be..72eba2201b14 100644 --- a/fs/xfs/xfs_log_priv.h +++ b/fs/xfs/xfs_log_priv.h | |||
@@ -19,7 +19,7 @@ | |||
19 | #define __XFS_LOG_PRIV_H__ | 19 | #define __XFS_LOG_PRIV_H__ |
20 | 20 | ||
21 | struct xfs_buf; | 21 | struct xfs_buf; |
22 | struct log; | 22 | struct xlog; |
23 | struct xlog_ticket; | 23 | struct xlog_ticket; |
24 | struct xfs_mount; | 24 | struct xfs_mount; |
25 | 25 | ||
@@ -352,7 +352,7 @@ typedef struct xlog_in_core { | |||
352 | struct xlog_in_core *ic_next; | 352 | struct xlog_in_core *ic_next; |
353 | struct xlog_in_core *ic_prev; | 353 | struct xlog_in_core *ic_prev; |
354 | struct xfs_buf *ic_bp; | 354 | struct xfs_buf *ic_bp; |
355 | struct log *ic_log; | 355 | struct xlog *ic_log; |
356 | int ic_size; | 356 | int ic_size; |
357 | int ic_offset; | 357 | int ic_offset; |
358 | int ic_bwritecnt; | 358 | int ic_bwritecnt; |
@@ -409,7 +409,7 @@ struct xfs_cil_ctx { | |||
409 | * operations almost as efficient as the old logging methods. | 409 | * operations almost as efficient as the old logging methods. |
410 | */ | 410 | */ |
411 | struct xfs_cil { | 411 | struct xfs_cil { |
412 | struct log *xc_log; | 412 | struct xlog *xc_log; |
413 | struct list_head xc_cil; | 413 | struct list_head xc_cil; |
414 | spinlock_t xc_cil_lock; | 414 | spinlock_t xc_cil_lock; |
415 | struct xfs_cil_ctx *xc_ctx; | 415 | struct xfs_cil_ctx *xc_ctx; |
@@ -487,7 +487,7 @@ struct xlog_grant_head { | |||
487 | * overflow 31 bits worth of byte offset, so using a byte number will mean | 487 | * overflow 31 bits worth of byte offset, so using a byte number will mean |
488 | * that round off problems won't occur when releasing partial reservations. | 488 | * that round off problems won't occur when releasing partial reservations. |
489 | */ | 489 | */ |
490 | typedef struct log { | 490 | typedef struct xlog { |
491 | /* The following fields don't need locking */ | 491 | /* The following fields don't need locking */ |
492 | struct xfs_mount *l_mp; /* mount point */ | 492 | struct xfs_mount *l_mp; /* mount point */ |
493 | struct xfs_ail *l_ailp; /* AIL log is working with */ | 493 | struct xfs_ail *l_ailp; /* AIL log is working with */ |
@@ -553,9 +553,14 @@ extern int xlog_recover_finish(xlog_t *log); | |||
553 | extern void xlog_pack_data(xlog_t *log, xlog_in_core_t *iclog, int); | 553 | extern void xlog_pack_data(xlog_t *log, xlog_in_core_t *iclog, int); |
554 | 554 | ||
555 | extern kmem_zone_t *xfs_log_ticket_zone; | 555 | extern kmem_zone_t *xfs_log_ticket_zone; |
556 | struct xlog_ticket *xlog_ticket_alloc(struct log *log, int unit_bytes, | 556 | struct xlog_ticket * |
557 | int count, char client, bool permanent, | 557 | xlog_ticket_alloc( |
558 | xfs_km_flags_t alloc_flags); | 558 | struct xlog *log, |
559 | int unit_bytes, | ||
560 | int count, | ||
561 | char client, | ||
562 | bool permanent, | ||
563 | xfs_km_flags_t alloc_flags); | ||
559 | 564 | ||
560 | 565 | ||
561 | static inline void | 566 | static inline void |
@@ -567,9 +572,14 @@ xlog_write_adv_cnt(void **ptr, int *len, int *off, size_t bytes) | |||
567 | } | 572 | } |
568 | 573 | ||
569 | void xlog_print_tic_res(struct xfs_mount *mp, struct xlog_ticket *ticket); | 574 | void xlog_print_tic_res(struct xfs_mount *mp, struct xlog_ticket *ticket); |
570 | int xlog_write(struct log *log, struct xfs_log_vec *log_vector, | 575 | int |
571 | struct xlog_ticket *tic, xfs_lsn_t *start_lsn, | 576 | xlog_write( |
572 | xlog_in_core_t **commit_iclog, uint flags); | 577 | struct xlog *log, |
578 | struct xfs_log_vec *log_vector, | ||
579 | struct xlog_ticket *tic, | ||
580 | xfs_lsn_t *start_lsn, | ||
581 | struct xlog_in_core **commit_iclog, | ||
582 | uint flags); | ||
573 | 583 | ||
574 | /* | 584 | /* |
575 | * When we crack an atomic LSN, we sample it first so that the value will not | 585 | * When we crack an atomic LSN, we sample it first so that the value will not |
@@ -629,17 +639,23 @@ xlog_assign_grant_head(atomic64_t *head, int cycle, int space) | |||
629 | /* | 639 | /* |
630 | * Committed Item List interfaces | 640 | * Committed Item List interfaces |
631 | */ | 641 | */ |
632 | int xlog_cil_init(struct log *log); | 642 | int |
633 | void xlog_cil_init_post_recovery(struct log *log); | 643 | xlog_cil_init(struct xlog *log); |
634 | void xlog_cil_destroy(struct log *log); | 644 | void |
645 | xlog_cil_init_post_recovery(struct xlog *log); | ||
646 | void | ||
647 | xlog_cil_destroy(struct xlog *log); | ||
635 | 648 | ||
636 | /* | 649 | /* |
637 | * CIL force routines | 650 | * CIL force routines |
638 | */ | 651 | */ |
639 | xfs_lsn_t xlog_cil_force_lsn(struct log *log, xfs_lsn_t sequence); | 652 | xfs_lsn_t |
653 | xlog_cil_force_lsn( | ||
654 | struct xlog *log, | ||
655 | xfs_lsn_t sequence); | ||
640 | 656 | ||
641 | static inline void | 657 | static inline void |
642 | xlog_cil_force(struct log *log) | 658 | xlog_cil_force(struct xlog *log) |
643 | { | 659 | { |
644 | xlog_cil_force_lsn(log, log->l_cilp->xc_current_sequence); | 660 | xlog_cil_force_lsn(log, log->l_cilp->xc_current_sequence); |
645 | } | 661 | } |