• Home
  • Raw
  • Download

Lines Matching refs:journal

133 static inline int hash(journal_t *journal, unsigned int block)  in hash()  argument
135 struct jbd_revoke_table_s *table = journal->j_revoke; in hash()
143 static int insert_revoke_hash(journal_t *journal, unsigned int blocknr, in insert_revoke_hash() argument
156 hash_list = &journal->j_revoke->hash_table[hash(journal, blocknr)]; in insert_revoke_hash()
157 spin_lock(&journal->j_revoke_lock); in insert_revoke_hash()
159 spin_unlock(&journal->j_revoke_lock); in insert_revoke_hash()
172 static struct jbd_revoke_record_s *find_revoke_record(journal_t *journal, in find_revoke_record() argument
178 hash_list = &journal->j_revoke->hash_table[hash(journal, blocknr)]; in find_revoke_record()
180 spin_lock(&journal->j_revoke_lock); in find_revoke_record()
184 spin_unlock(&journal->j_revoke_lock); in find_revoke_record()
189 spin_unlock(&journal->j_revoke_lock); in find_revoke_record()
277 int journal_init_revoke(journal_t *journal, int hash_size) in journal_init_revoke() argument
279 J_ASSERT(journal->j_revoke_table[0] == NULL); in journal_init_revoke()
282 journal->j_revoke_table[0] = journal_init_revoke_table(hash_size); in journal_init_revoke()
283 if (!journal->j_revoke_table[0]) in journal_init_revoke()
286 journal->j_revoke_table[1] = journal_init_revoke_table(hash_size); in journal_init_revoke()
287 if (!journal->j_revoke_table[1]) in journal_init_revoke()
290 journal->j_revoke = journal->j_revoke_table[1]; in journal_init_revoke()
292 spin_lock_init(&journal->j_revoke_lock); in journal_init_revoke()
297 journal_destroy_revoke_table(journal->j_revoke_table[0]); in journal_init_revoke()
303 void journal_destroy_revoke(journal_t *journal) in journal_destroy_revoke() argument
305 journal->j_revoke = NULL; in journal_destroy_revoke()
306 if (journal->j_revoke_table[0]) in journal_destroy_revoke()
307 journal_destroy_revoke_table(journal->j_revoke_table[0]); in journal_destroy_revoke()
308 if (journal->j_revoke_table[1]) in journal_destroy_revoke()
309 journal_destroy_revoke_table(journal->j_revoke_table[1]); in journal_destroy_revoke()
343 journal_t *journal; in journal_revoke() local
351 journal = handle->h_transaction->t_journal; in journal_revoke()
352 if (!journal_set_features(journal, 0, 0, JFS_FEATURE_INCOMPAT_REVOKE)){ in journal_revoke()
357 bdev = journal->j_fs_dev; in journal_revoke()
361 bh = __find_get_block(bdev, blocknr, journal->j_blocksize); in journal_revoke()
371 bh2 = __find_get_block(bdev, blocknr, journal->j_blocksize); in journal_revoke()
409 err = insert_revoke_hash(journal, blocknr, in journal_revoke()
433 journal_t *journal = handle->h_transaction->t_journal; in journal_cancel_revoke() local
452 record = find_revoke_record(journal, bh->b_blocknr); in journal_cancel_revoke()
456 spin_lock(&journal->j_revoke_lock); in journal_cancel_revoke()
458 spin_unlock(&journal->j_revoke_lock); in journal_cancel_revoke()
466 record = find_revoke_record(journal, bh->b_blocknr); in journal_cancel_revoke()
491 void journal_clear_buffer_revoked_flags(journal_t *journal) in journal_clear_buffer_revoked_flags() argument
493 struct jbd_revoke_table_s *revoke = journal->j_revoke; in journal_clear_buffer_revoked_flags()
505 bh = __find_get_block(journal->j_fs_dev, in journal_clear_buffer_revoked_flags()
507 journal->j_blocksize); in journal_clear_buffer_revoked_flags()
520 void journal_switch_revoke_table(journal_t *journal) in journal_switch_revoke_table() argument
524 if (journal->j_revoke == journal->j_revoke_table[0]) in journal_switch_revoke_table()
525 journal->j_revoke = journal->j_revoke_table[1]; in journal_switch_revoke_table()
527 journal->j_revoke = journal->j_revoke_table[0]; in journal_switch_revoke_table()
529 for (i = 0; i < journal->j_revoke->hash_size; i++) in journal_switch_revoke_table()
530 INIT_LIST_HEAD(&journal->j_revoke->hash_table[i]); in journal_switch_revoke_table()
537 void journal_write_revoke_records(journal_t *journal, in journal_write_revoke_records() argument
551 revoke = journal->j_revoke == journal->j_revoke_table[0] ? in journal_write_revoke_records()
552 journal->j_revoke_table[1] : journal->j_revoke_table[0]; in journal_write_revoke_records()
560 write_one_revoke_record(journal, transaction, in journal_write_revoke_records()
569 flush_descriptor(journal, descriptor, offset, write_op); in journal_write_revoke_records()
578 static void write_one_revoke_record(journal_t *journal, in write_one_revoke_record() argument
593 if (is_journal_aborted(journal)) in write_one_revoke_record()
601 if (offset == journal->j_blocksize) { in write_one_revoke_record()
602 flush_descriptor(journal, descriptor, offset, write_op); in write_one_revoke_record()
608 descriptor = journal_get_descriptor_buffer(journal); in write_one_revoke_record()
637 static void flush_descriptor(journal_t *journal, in flush_descriptor() argument
644 if (is_journal_aborted(journal)) { in flush_descriptor()
680 int journal_set_revoke(journal_t *journal, in journal_set_revoke() argument
686 record = find_revoke_record(journal, blocknr); in journal_set_revoke()
694 return insert_revoke_hash(journal, blocknr, sequence); in journal_set_revoke()
704 int journal_test_revoke(journal_t *journal, in journal_test_revoke() argument
710 record = find_revoke_record(journal, blocknr); in journal_test_revoke()
723 void journal_clear_revoke(journal_t *journal) in journal_clear_revoke() argument
730 revoke = journal->j_revoke; in journal_clear_revoke()