Lines Matching refs:jh
30 static inline void __buffer_unlink(struct journal_head *jh) in __buffer_unlink() argument
32 transaction_t *transaction = jh->b_cp_transaction; in __buffer_unlink()
34 jh->b_cpnext->b_cpprev = jh->b_cpprev; in __buffer_unlink()
35 jh->b_cpprev->b_cpnext = jh->b_cpnext; in __buffer_unlink()
36 if (transaction->t_checkpoint_list == jh) { in __buffer_unlink()
37 transaction->t_checkpoint_list = jh->b_cpnext; in __buffer_unlink()
38 if (transaction->t_checkpoint_list == jh) in __buffer_unlink()
156 struct journal_head *jh; in jbd2_log_do_checkpoint() local
198 jh = transaction->t_checkpoint_list; in jbd2_log_do_checkpoint()
199 bh = jh2bh(jh); in jbd2_log_do_checkpoint()
201 if (jh->b_transaction != NULL) { in jbd2_log_do_checkpoint()
202 transaction_t *t = jh->b_transaction; in jbd2_log_do_checkpoint()
256 if (__jbd2_journal_remove_checkpoint(jh) || in jbd2_log_do_checkpoint()
273 transaction->t_checkpoint_list = jh->b_cpnext; in jbd2_log_do_checkpoint()
356 static unsigned long journal_shrink_one_cp_list(struct journal_head *jh, in journal_shrink_one_cp_list() argument
361 struct journal_head *next_jh = jh; in journal_shrink_one_cp_list()
366 if (!jh) in journal_shrink_one_cp_list()
369 last_jh = jh->b_cpprev; in journal_shrink_one_cp_list()
371 jh = next_jh; in journal_shrink_one_cp_list()
372 next_jh = jh->b_cpnext; in journal_shrink_one_cp_list()
375 ret = __jbd2_journal_remove_checkpoint(jh); in journal_shrink_one_cp_list()
377 ret = jbd2_journal_try_remove_checkpoint(jh); in journal_shrink_one_cp_list()
393 } while (jh != last_jh); in journal_shrink_one_cp_list()
565 int __jbd2_journal_remove_checkpoint(struct journal_head *jh) in __jbd2_journal_remove_checkpoint() argument
571 JBUFFER_TRACE(jh, "entry"); in __jbd2_journal_remove_checkpoint()
573 transaction = jh->b_cp_transaction; in __jbd2_journal_remove_checkpoint()
575 JBUFFER_TRACE(jh, "not on transaction"); in __jbd2_journal_remove_checkpoint()
580 JBUFFER_TRACE(jh, "removing from transaction"); in __jbd2_journal_remove_checkpoint()
582 __buffer_unlink(jh); in __jbd2_journal_remove_checkpoint()
583 jh->b_cp_transaction = NULL; in __jbd2_journal_remove_checkpoint()
585 jbd2_journal_put_journal_head(jh); in __jbd2_journal_remove_checkpoint()
626 int jbd2_journal_try_remove_checkpoint(struct journal_head *jh) in jbd2_journal_try_remove_checkpoint() argument
628 struct buffer_head *bh = jh2bh(jh); in jbd2_journal_try_remove_checkpoint()
630 if (jh->b_transaction) in jbd2_journal_try_remove_checkpoint()
645 JBUFFER_TRACE(jh, "remove from checkpoint list"); in jbd2_journal_try_remove_checkpoint()
646 return __jbd2_journal_remove_checkpoint(jh); in jbd2_journal_try_remove_checkpoint()
657 void __jbd2_journal_insert_checkpoint(struct journal_head *jh, in __jbd2_journal_insert_checkpoint() argument
660 JBUFFER_TRACE(jh, "entry"); in __jbd2_journal_insert_checkpoint()
661 J_ASSERT_JH(jh, buffer_dirty(jh2bh(jh)) || buffer_jbddirty(jh2bh(jh))); in __jbd2_journal_insert_checkpoint()
662 J_ASSERT_JH(jh, jh->b_cp_transaction == NULL); in __jbd2_journal_insert_checkpoint()
665 jbd2_journal_grab_journal_head(jh2bh(jh)); in __jbd2_journal_insert_checkpoint()
666 jh->b_cp_transaction = transaction; in __jbd2_journal_insert_checkpoint()
669 jh->b_cpnext = jh->b_cpprev = jh; in __jbd2_journal_insert_checkpoint()
671 jh->b_cpnext = transaction->t_checkpoint_list; in __jbd2_journal_insert_checkpoint()
672 jh->b_cpprev = transaction->t_checkpoint_list->b_cpprev; in __jbd2_journal_insert_checkpoint()
673 jh->b_cpprev->b_cpnext = jh; in __jbd2_journal_insert_checkpoint()
674 jh->b_cpnext->b_cpprev = jh; in __jbd2_journal_insert_checkpoint()
676 transaction->t_checkpoint_list = jh; in __jbd2_journal_insert_checkpoint()