From: Theodore Ts'o Date: Fri, 8 Jun 2001 11:55:44 +0000 (+0000) Subject: ChangeLog, jfs.h: X-Git-Tag: E2FSPROGS-1_21~29 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=725c474ffcf09bbdbd6cd396a867914fec7b4510;p=tools%2Fe2fsprogs.git ChangeLog, jfs.h: jfs.h: Synchronize with ext3 0.7a ChangeLog, recovery.c, revoke.c: recover.c, revoke.c: Synchronize with ext3 0.7a --- diff --git a/e2fsck/ChangeLog b/e2fsck/ChangeLog index 3edbacc..28cbf55 100644 --- a/e2fsck/ChangeLog +++ b/e2fsck/ChangeLog @@ -1,3 +1,7 @@ +2001-06-08 Theodore Tso + + * recover.c, revoke.c: Synchronize with ext3 0.7a + 2001-06-02 Theodore Tso * recovery.c (scan_revoke_records): Fix bug in recovery code; diff --git a/e2fsck/recovery.c b/e2fsck/recovery.c index 9867503..cabf278 100644 --- a/e2fsck/recovery.c +++ b/e2fsck/recovery.c @@ -284,7 +284,7 @@ int journal_skip_recovery(journal_t *journal) 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); diff --git a/e2fsck/revoke.c b/e2fsck/revoke.c index 28f8fa2..cdcf8ef 100644 --- a/e2fsck/revoke.c +++ b/e2fsck/revoke.c @@ -33,11 +33,13 @@ * 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_ @@ -52,7 +54,7 @@ * 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__ @@ -489,7 +491,7 @@ int journal_set_revoke(journal_t *journal, 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; } @@ -512,7 +514,7 @@ int journal_test_revoke(journal_t *journal, 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; } diff --git a/include/linux/ChangeLog b/include/linux/ChangeLog index a72940f..8f92e6a 100644 --- a/include/linux/ChangeLog +++ b/include/linux/ChangeLog @@ -1,3 +1,7 @@ +2001-06-08 Theodore Tso + + * jfs.h: Synchronize with ext3 0.7a + 2001-05-25 Theodore Tso * Release of E2fsprogs 1.20 diff --git a/include/linux/jfs.h b/include/linux/jfs.h index d4a83de..c00f4ed 100644 --- a/include/linux/jfs.h +++ b/include/linux/jfs.h @@ -667,7 +667,7 @@ extern void journal_clear_revoke(journal_t *); /* 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);