Lines Matching defs:journal
12 * Journal revoke routines for the generic filesystem journaling code;
20 * transaction's revoked blocks to the journal
37 * need either to cancel the journal entry or to write the revoke
78 journal replay, this involves recording the transaction ID of the
110 static inline int hash(journal_t *journal, unsigned long block)
112 struct jbd_revoke_table_s *table = journal->j_revoke;
120 static int insert_revoke_hash(journal_t *journal, unsigned long blocknr,
135 hash_list = &journal->j_revoke->hash_table[hash(journal, blocknr)];
152 /* Find a revoke record in the journal's hash table. */
154 static struct jbd_revoke_record_s *find_revoke_record(journal_t *journal,
160 hash_list = &journal->j_revoke->hash_table[hash(journal, blocknr)];
198 /* Initialise the revoke table for a given journal to a given size. */
200 int journal_init_revoke(journal_t *journal, int hash_size)
204 J_ASSERT (journal->j_revoke == NULL);
206 journal->j_revoke = kmem_cache_alloc(revoke_table_cache, GFP_KERNEL);
207 if (!journal->j_revoke)
213 journal->j_revoke->hash_size = hash_size;
219 journal->j_revoke->hash_shift = shift;
221 journal->j_revoke->hash_table =
223 if (!journal->j_revoke->hash_table) {
224 kmem_cache_free(revoke_table_cache, journal->j_revoke);
225 journal->j_revoke = NULL;
230 INIT_LIST_HEAD(&journal->j_revoke->hash_table[tmp]);
235 /* Destoy a journal's revoke table. The table must already be empty! */
237 void journal_destroy_revoke(journal_t *journal)
243 table = journal->j_revoke;
254 journal->j_revoke = NULL;
261 * journal_revoke: revoke a given buffer_head from the journal. This
288 journal_t *journal;
295 journal = handle->h_transaction->t_journal;
296 if (!journal_set_features(journal, 0, 0, JFS_FEATURE_INCOMPAT_REVOKE)){
301 dev = journal->j_fs_dev;
305 bh = get_hash_table(dev, blocknr, journal->j_blocksize);
315 bh2 = get_hash_table(dev, blocknr, journal->j_blocksize);
349 lock_journal(journal);
351 err = insert_revoke_hash(journal, blocknr,
353 unlock_journal(journal);
373 * The caller must have the journal locked.
378 journal_t *journal = handle->h_transaction->t_journal;
397 record = find_revoke_record(journal, bh->b_blocknr);
409 record = find_revoke_record(journal, bh->b_blocknr);
431 * Write revoke records to the journal for all entries in the current
434 * Called with the journal lock held.
437 void journal_write_revoke_records(journal_t *journal,
449 revoke = journal->j_revoke;
457 write_one_revoke_record(journal, transaction,
466 flush_descriptor(journal, descriptor, offset);
475 static void write_one_revoke_record(journal_t *journal,
488 revoke records: only the IO to the journal is omitted. */
489 if (is_journal_aborted(journal))
497 if (offset == journal->j_blocksize) {
498 flush_descriptor(journal, descriptor, offset);
504 descriptor = journal_get_descriptor_buffer(journal);
527 * Flush a revoke descriptor out to the journal. If we are aborting,
530 * journal buffer list.
533 static void flush_descriptor(journal_t *journal,
539 if (is_journal_aborted(journal)) {
563 * of each revoke in the journal
579 int journal_set_revoke(journal_t *journal,
585 record = find_revoke_record(journal, blocknr);
593 return insert_revoke_hash(journal, blocknr, sequence);
603 int journal_test_revoke(journal_t *journal,
609 record = find_revoke_record(journal, blocknr);
622 void journal_clear_revoke(journal_t *journal)
629 revoke = journal->j_revoke;