Lines Matching refs:revoke

3  * linux/fs/jbd2/revoke.c
9 * Journal revoke routines for the generic filesystem journaling code;
14 * blocks. The revoke mechanism is used in two separate places:
20 * revoked blocks. If there are multiple revoke records in the log
22 * entry for a block beyond the last revoke, then that log entry still
30 * cancel the revoke before the transaction commits.
33 * The revoke must take precedence over the write of the block, so we
34 * need either to cancel the journal entry or to write the revoke
36 * latter: journaling a block cancels any revoke record for that block
37 * in the current transaction, so any revoke for that block in the
39 * the revoke must take precedence.
42 * The data write is allowed to succeed, but the revoke is _not_
44 * overwriting the new data. We don't even need to clear the revoke
47 * We cache revoke status of a buffer in the current transaction in b_states
48 * bits. As the name says, revokevalid flag indicates that the cached revoke
53 * RevokeValid clear: no cached revoke status, need to look it up
61 * We keep two hash tables of revoke records. One hashtable belongs to the
98 /* Each revoke record represents one single revoked block. During
100 last transaction to revoke this block. */
110 /* The revoke table is just a simple hash table of revoke records. */
129 /* Utility functions to maintain the revoke table */
158 /* Find a revoke record in the journal's hash table. */
262 /* Initialise the revoke table for a given journal to a given size. */
289 /* Destroy a journal's revoke table. The table must already be empty! */
303 * jbd2_journal_revoke: revoke a given buffer_head from the journal. This
307 * revoke.
311 * before the revoke is complete. In ext3, this implies calling the
312 * revoke before clearing the block bitmap when we are deleting
340 J_ASSERT (!"Cannot set revoke feature!");
363 * since it's illegal to create a revoke
366 * risk missing a subsequent revoke
379 /* We really ought not ever to revoke twice in a row without
380 first having the revoke cancelled: it's illegal to free a
401 jbd2_debug(2, "insert revoke for block %llu, bh_in=%p\n",blocknr, bh_in);
409 * Cancel an outstanding revoke. For use only internally by the
413 * being journaled: if there is no revoke pending on the buffer, then we
419 * the second time we would still have a pending revoke to cancel. So,
431 jbd2_debug(4, "journal_head %p, cancelling revoke\n", jh);
434 * only perform the full cancel if the revoke bit is set. If
435 * not, we can't trust the revoke bit, and we need to do the
436 * full search for a revoke record. */
447 jbd2_debug(4, "cancelled existing revoke on "
463 /* Finally, have we just cleared revoke on an unhashed
465 * revoked status on any hashed alias too, otherwise the revoke
481 * revoke table to reflect there is no revoked buffers in the next
486 struct jbd2_revoke_table_s *revoke = journal->j_revoke;
489 for (i = 0; i < revoke->hash_size; i++) {
492 hash_list = &revoke->hash_table[i];
527 * Write revoke records to the journal for all entries in the current
528 * revoke hash, deleting the entries as we go.
536 struct jbd2_revoke_table_s *revoke;
544 /* select revoke table for committing transaction */
545 revoke = journal->j_revoke == journal->j_revoke_table[0] ?
548 for (i = 0; i < revoke->hash_size; i++) {
549 hash_list = &revoke->hash_table[i];
563 jbd2_debug(1, "Wrote %d revoke records\n", count);
567 * Write out one revoke record. We need to create a new descriptor
585 revoke records: only the IO to the journal is omitted. */
635 * Flush a revoke descriptor out to the journal. If we are aborting,
666 * record all revoke records, including the tid of the latest instance
667 * of each revoke in the journal
670 * (ie. has not been revoked by a revoke record in that or a subsequent
673 * empty the revoke table after recovery.
677 * First, setting revoke records. We create a new revoke record for
701 * Test revoke records. For a given block referenced in the log, has
702 * that block been revoked? A revoke record with a given transaction
722 * Finally, once recovery is over, we need to clear the revoke table so
731 struct jbd2_revoke_table_s *revoke;
733 revoke = journal->j_revoke;
735 for (i = 0; i < revoke->hash_size; i++) {
736 hash_list = &revoke->hash_table[i];