struct recovery_info info;
- memset (&info, 0, sizeof(info));
+ memset(&info, 0, sizeof(info));
sb = journal->j_superblock;
err = do_one_pass(journal, &info, PASS_SCAN);
* cancel the revoke before the transaction commits.
*
* Block is journaled and then revoked:
- * The revoke must take precedence over the write of the block, so
- * we need either to cancel the journal entry or to write the revoke
+ * The revoke must take precedence over the write of the block, so we
+ * need either to cancel the journal entry or to write the revoke
* later in the log than the log block. In this case, we choose the
- * former: the commit code must skip any block that has the Revoke bit
- * set.
+ * latter: journaling a block cancels any revoke record for that block
+ * in the current transaction, so any revoke for that block in the
+ * transaction must have happened after the block was journaled and so
+ * the revoke must take precedence.
*
* Block is revoked and then written as data:
* The data write is allowed to succeed, but the revoke is _not_
* buffer has not been revoked, and cancel_revoke
* need do nothing.
* RevokeValid set, Revoke set:
- * buffer has been revoked.
+ * buffer has been revoked.
*/
#ifndef __KERNEL__
if (record) {
/* If we have multiple occurences, only record the
* latest sequence number in the hashed record */
- if (tid_ge(sequence, record->sequence))
+ if (tid_gt(sequence, record->sequence))
record->sequence = sequence;
return 0;
}
record = find_revoke_record(journal, blocknr);
if (!record)
return 0;
- if (tid_ge(sequence, record->sequence))
+ if (tid_gt(sequence, record->sequence))
return 0;
return 1;
}
/* Comparison functions for transaction IDs: perform comparisons using
* modulo arithmetic so that they work over sequence number wraps. */
-static inline int tid_ge(tid_t x, tid_t y)
+static inline int tid_gt(tid_t x, tid_t y)
{
int difference = (x - y);
return (difference > 0);