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

Lines Matching defs:jh

33 static inline void __buffer_unlink(struct hfsplus_jbd_head *jh)
37 transaction = jh->b_cp_transaction;
38 jh->b_cp_transaction = NULL;
40 jh->b_cpnext->b_cpprev = jh->b_cpprev;
41 jh->b_cpprev->b_cpnext = jh->b_cpnext;
42 if (transaction->t_checkpoint_list == jh)
43 transaction->t_checkpoint_list = jh->b_cpnext;
44 if (transaction->t_checkpoint_list == jh)
52 * Called under hfsplus_jbd_lock_bh_state(hfsplus_jh2bh(jh)), and drops it
54 static int __try_to_free_cp_buf(struct hfsplus_jbd_head *jh)
57 struct buffer_head *bh = hfsplus_jh2bh(jh);
59 if (jh->b_jlist == HFSPLUS_BJ_None && !buffer_locked(bh) && !buffer_dirty(bh)) {
60 HFSPLUS_JBUFFER_TRACE(jh, "remove from checkpoint list");
61 __hfsplus_jbd_remove_checkpoint(jh);
134 struct hfsplus_jbd_head *jh, *next_jh, *last_jh;
139 jh = transaction->t_checkpoint_list;
140 if (!jh)
143 last_jh = jh->b_cpprev;
144 next_jh = jh;
146 jh = next_jh;
147 bh = hfsplus_jh2bh(jh);
166 if (jh->b_transaction != NULL) {
167 hfsplus_transaction_t *t = jh->b_transaction;
181 next_jh = jh->b_cpnext;
184 __hfsplus_jbd_remove_checkpoint(jh);
192 } while (jh != last_jh);
226 * Called under hfsplus_jbd_lock_bh_state(hfsplus_jh2bh(jh)), and drops it
228 static int __flush_buffer(hfsplus_jbd_t *journal, struct hfsplus_jbd_head *jh,
232 struct buffer_head *bh = hfsplus_jh2bh(jh);
235 if (buffer_dirty(bh) && !buffer_locked(bh) && jh->b_jlist == HFSPLUS_BJ_None) {
236 HFSPLUS_J_ASSERT_JH(jh, jh->b_transaction == NULL);
258 if (jh->b_cpnext == jh) {
264 if (__try_to_free_cp_buf(jh)) {
313 struct hfsplus_jbd_head *jh, *last_jh, *next_jh;
320 jh = transaction->t_checkpoint_list;
321 last_jh = jh->b_cpprev;
322 next_jh = jh;
326 jh = next_jh;
327 next_jh = jh->b_cpnext;
328 bh = hfsplus_jh2bh(jh);
335 retry = __flush_buffer(journal, jh, bhs, &batch_count, &drop_count);
340 } while (jh != last_jh && !retry);
485 struct hfsplus_jbd_head *jh;
489 jh = transaction->t_checkpoint_list;
490 if (jh) {
491 struct hfsplus_jbd_head *last_jh = jh->b_cpprev;
492 struct hfsplus_jbd_head *next_jh = jh;
495 jh = next_jh;
496 next_jh = jh->b_cpnext;
498 if (hfsplus_jbd_trylock_bh_state(hfsplus_jh2bh(jh)))
499 ret += __try_to_free_cp_buf(jh);
508 } while (jh != last_jh);
532 void __hfsplus_jbd_remove_checkpoint(struct hfsplus_jbd_head *jh)
537 HFSPLUS_JBUFFER_TRACE(jh, "entry");
539 if ((transaction = jh->b_cp_transaction) == NULL) {
540 HFSPLUS_JBUFFER_TRACE(jh, "not on transaction");
545 __buffer_unlink(jh);
549 HFSPLUS_JBUFFER_TRACE(jh, "transaction has no more buffers");
561 HFSPLUS_JBUFFER_TRACE(jh, "belongs to committing transaction");
574 HFSPLUS_JBUFFER_TRACE(jh, "exit");
585 void __hfsplus_jbd_insert_checkpoint(struct hfsplus_jbd_head *jh,
588 HFSPLUS_JBUFFER_TRACE(jh, "entry");
589 HFSPLUS_J_ASSERT_JH(jh, buffer_dirty(hfsplus_jh2bh(jh)) || buffer_hfsplus_jbddirty(hfsplus_jh2bh(jh)));
590 HFSPLUS_J_ASSERT_JH(jh, jh->b_cp_transaction == NULL);
592 jh->b_cp_transaction = transaction;
595 jh->b_cpnext = jh->b_cpprev = jh;
597 jh->b_cpnext = transaction->t_checkpoint_list;
598 jh->b_cpprev = transaction->t_checkpoint_list->b_cpprev;
599 jh->b_cpprev->b_cpnext = jh;
600 jh->b_cpnext->b_cpprev = jh;
602 transaction->t_checkpoint_list = jh;