Lines Matching full:log

32  * In core log state
35 XLOG_STATE_ACTIVE, /* Current IC log being written to */
37 XLOG_STATE_SYNCING, /* This IC log is syncing */
40 XLOG_STATE_DIRTY, /* Dirty IC log, not ready for ACTIVE status */
52 * In core log flags
63 * Log ticket flags
73 * log write such that no allocation transactions will be re-done during
75 * log write.
77 * These states are used to insert dummy log entries to cover
90 * in the log record header needs to point beyond the last possible
103 * when the log becomes idle.
107 * on disk log with no other transactions.
112 * 1.) In xfs_sync, when we detect an idle log and are in NEED or NEED2.
116 * 2.) When we finish writing the on-disk log (xlog_state_clean_log).
132 * one file space allocation. When this happens, the log recovery
159 * - A log record header is 512 bytes. There is plenty of room to grow the
165 * - ic_log is a pointer back to the global log structure.
166 * - ic_size is the full size of the log buffer, minus the cycle headers.
168 * - ic_refcnt is bumped when someone is writing to the log.
227 struct list_head log_items; /* log items in chkpt */
249 * This structure is used to track log items that have been committed but not
250 * yet written into the log. It is used only when the delayed logging mount
291 * The amount of log space we allow the CIL to aggregate is difficult to size.
293 * log space effectively, that it is large enough to capture sufficient
294 * relogging to reduce log buffer IO significantly, but it is not too large for
295 * the log or induces too much latency when writing out through the iclogs. We
299 * Every log buffer we write out during a push needs a header reserved, which
301 * at least 512 bytes per 32k of log space just for the LR headers. That means
306 * limit space consumed in the log rather than by the number of objects being
309 * Further, use of static reservations through the log grant mechanism is
312 * can block on log pushes. Hence if we have to regrant log space during a log
326 * Recovery imposes a rule that no transaction exceed half the log, so we are
327 * limited by that. Furthermore, the log transaction reservation subsystem
328 * tries to keep 25% of the log free, so we need to keep below that limit or we
329 * risk running out of free log space to start any new transactions.
334 * to grow to a substantial fraction of the log, then we may be pinning hundreds
345 * defined to be 12.5% of the log space - half the 25% push threshold of the
373 #define XLOG_CIL_SPACE_LIMIT(log) \ argument
374 min_t(int, (log)->l_logsize >> 3, BBTOB(XLOG_TOTAL_REC_SHIFT(log)) << 4)
376 #define XLOG_CIL_BLOCKING_SPACE_LIMIT(log) \ argument
377 (XLOG_CIL_SPACE_LIMIT(log) * 2)
398 struct xfs_ail *l_ailp; /* AIL log is working with */
399 struct xfs_cil *l_cilp; /* CIL log is working with */
400 struct xfs_buftarg *l_targ; /* buftarg of log */
409 int l_iclog_size; /* size of log in bytes */
411 xfs_daddr_t l_logBBstart; /* start block of log */
412 int l_logsize; /* size of log in bytes */
413 int l_logBBsize; /* size of log in BB chunks */
419 * log entries" */
420 xlog_in_core_t *l_iclog; /* head log queue */
422 int l_curr_cycle; /* Cycle number of log writes */
425 int l_curr_block; /* current logical log block */
426 int l_prev_block; /* previous logical log block */
444 /* log recovery lsn tracking (for buffer submission */
449 /* Users of log incompat features should take a read lock. */
457 #define XLOG_RECOVERY_NEEDED 1 /* log was recovered */
458 #define XLOG_IO_ERROR 2 /* log hit an I/O error, and being
460 #define XLOG_TAIL_WARN 3 /* log tail verify warning issued */
463 xlog_recovery_needed(struct xlog *log) in xlog_recovery_needed() argument
465 return test_bit(XLOG_RECOVERY_NEEDED, &log->l_opstate); in xlog_recovery_needed()
469 xlog_in_recovery(struct xlog *log) in xlog_in_recovery() argument
471 return test_bit(XLOG_ACTIVE_RECOVERY, &log->l_opstate); in xlog_in_recovery()
475 xlog_is_shutdown(struct xlog *log) in xlog_is_shutdown() argument
477 return test_bit(XLOG_IO_ERROR, &log->l_opstate); in xlog_is_shutdown()
481 * Wait until the xlog_force_shutdown() has marked the log as shut down
486 struct xlog *log) in xlog_shutdown_wait() argument
488 wait_var_event(&log->l_opstate, xlog_is_shutdown(log)); in xlog_shutdown_wait()
494 struct xlog *log);
497 struct xlog *log);
501 extern __le32 xlog_cksum(struct xlog *log, struct xlog_rec_header *rhead,
505 struct xlog_ticket *xlog_ticket_alloc(struct xlog *log, int unit_bytes,
510 int xlog_write(struct xlog *log, struct xfs_cil_ctx *ctx,
513 void xfs_log_ticket_ungrant(struct xlog *log, struct xlog_ticket *ticket);
514 void xfs_log_ticket_regrant(struct xlog *log, struct xlog_ticket *ticket);
516 void xlog_state_switch_iclogs(struct xlog *log, struct xlog_in_core *iclog,
518 int xlog_state_release_iclog(struct xlog *log, struct xlog_in_core *iclog,
579 int xlog_cil_init(struct xlog *log);
580 void xlog_cil_init_post_recovery(struct xlog *log);
581 void xlog_cil_destroy(struct xlog *log);
582 bool xlog_cil_empty(struct xlog *log);
583 void xlog_cil_commit(struct xlog *log, struct xfs_trans *tp,
592 void xlog_cil_flush(struct xlog *log);
593 xfs_lsn_t xlog_cil_force_seq(struct xlog *log, xfs_csn_t sequence);
596 xlog_cil_force(struct xlog *log) in xlog_cil_force() argument
598 xlog_cil_force_seq(log, log->l_cilp->xc_current_sequence); in xlog_cil_force()
604 * log code.
625 * means that the next log record that includes this metadata could have a
626 * smaller LSN. In turn, this means that the modification in the log would not
631 struct xlog *log, in xlog_valid_lsn() argument
650 cur_cycle = READ_ONCE(log->l_curr_cycle); in xlog_valid_lsn()
652 cur_block = READ_ONCE(log->l_curr_block); in xlog_valid_lsn()
658 * above raced with a wrap to the next log cycle. Grab the lock in xlog_valid_lsn()
661 spin_lock(&log->l_icloglock); in xlog_valid_lsn()
662 cur_cycle = log->l_curr_cycle; in xlog_valid_lsn()
663 cur_block = log->l_curr_block; in xlog_valid_lsn()
664 spin_unlock(&log->l_icloglock); in xlog_valid_lsn()
675 * Log vector and shadow buffers can be large, so we need to use kvmalloc() here
711 void xlog_cil_pcp_dead(struct xlog *log, unsigned int cpu);