• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/fs/jbd2/

Lines Matching refs:jh

31 static inline void __buffer_unlink_first(struct journal_head *jh)
33 transaction_t *transaction = jh->b_cp_transaction;
35 jh->b_cpnext->b_cpprev = jh->b_cpprev;
36 jh->b_cpprev->b_cpnext = jh->b_cpnext;
37 if (transaction->t_checkpoint_list == jh) {
38 transaction->t_checkpoint_list = jh->b_cpnext;
39 if (transaction->t_checkpoint_list == jh)
49 static inline void __buffer_unlink(struct journal_head *jh)
51 transaction_t *transaction = jh->b_cp_transaction;
53 __buffer_unlink_first(jh);
54 if (transaction->t_checkpoint_io_list == jh) {
55 transaction->t_checkpoint_io_list = jh->b_cpnext;
56 if (transaction->t_checkpoint_io_list == jh)
66 static inline void __buffer_relink_io(struct journal_head *jh)
68 transaction_t *transaction = jh->b_cp_transaction;
70 __buffer_unlink_first(jh);
73 jh->b_cpnext = jh->b_cpprev = jh;
75 jh->b_cpnext = transaction->t_checkpoint_io_list;
76 jh->b_cpprev = transaction->t_checkpoint_io_list->b_cpprev;
77 jh->b_cpprev->b_cpnext = jh;
78 jh->b_cpnext->b_cpprev = jh;
80 transaction->t_checkpoint_io_list = jh;
89 * Called under jbd_lock_bh_state(jh2bh(jh)), and drops it
91 static int __try_to_free_cp_buf(struct journal_head *jh)
94 struct buffer_head *bh = jh2bh(jh);
96 if (jh->b_jlist == BJ_None && !buffer_locked(bh) && !buffer_dirty(bh)) {
97 JBUFFER_TRACE(jh, "remove from checkpoint list");
98 ret = __jbd2_journal_remove_checkpoint(jh) + 1;
167 struct journal_head *jh;
179 jh = transaction->t_checkpoint_io_list;
180 bh = jh2bh(jh);
201 released = __jbd2_journal_remove_checkpoint(jh);
232 * Called under jbd_lock_bh_state(jh2bh(jh)), and drops it
234 static int __process_buffer(journal_t *journal, struct journal_head *jh,
237 struct buffer_head *bh = jh2bh(jh);
249 } else if (jh->b_transaction != NULL) {
250 transaction_t *t = jh->b_transaction;
259 J_ASSERT_JH(jh, !buffer_jbddirty(bh));
261 __jbd2_journal_remove_checkpoint(jh);
280 __buffer_relink_io(jh);
336 struct journal_head *jh;
342 jh = transaction->t_checkpoint_list;
343 bh = jh2bh(jh);
349 retry = __process_buffer(journal, jh, bhs,&batch_count);
473 static int journal_clean_one_cp_list(struct journal_head *jh, int *released)
476 struct journal_head *next_jh = jh;
480 if (!jh)
483 last_jh = jh->b_cpprev;
485 jh = next_jh;
486 next_jh = jh->b_cpnext;
488 if (jbd_trylock_bh_state(jh2bh(jh))) {
489 ret = __try_to_free_cp_buf(jh);
506 } while (jh != last_jh);
578 * This function is called with jbd_lock_bh_state(jh2bh(jh))
581 int __jbd2_journal_remove_checkpoint(struct journal_head *jh)
587 JBUFFER_TRACE(jh, "entry");
589 if ((transaction = jh->b_cp_transaction) == NULL) {
590 JBUFFER_TRACE(jh, "not on transaction");
595 __buffer_unlink(jh);
596 jh->b_cp_transaction = NULL;
601 JBUFFER_TRACE(jh, "transaction has no more buffers");
613 JBUFFER_TRACE(jh, "belongs to committing transaction");
627 JBUFFER_TRACE(jh, "exit");
639 void __jbd2_journal_insert_checkpoint(struct journal_head *jh,
642 JBUFFER_TRACE(jh, "entry");
643 J_ASSERT_JH(jh, buffer_dirty(jh2bh(jh)) || buffer_jbddirty(jh2bh(jh)));
644 J_ASSERT_JH(jh, jh->b_cp_transaction == NULL);
646 jh->b_cp_transaction = transaction;
649 jh->b_cpnext = jh->b_cpprev = jh;
651 jh->b_cpnext = transaction->t_checkpoint_list;
652 jh->b_cpprev = transaction->t_checkpoint_list->b_cpprev;
653 jh->b_cpprev->b_cpnext = jh;
654 jh->b_cpnext->b_cpprev = jh;
656 transaction->t_checkpoint_list = jh;