[Cluster-devel] [PATCH] GFS2: Allow the number of committed revokes to temporarily be negative

Bob Peterson rpeterso at redhat.com
Mon Mar 29 20:20:49 UTC 2010


----- "Benjamin Marzinski" <bmarzins at redhat.com> wrote:
| GFS2 tracks the number of revokes and unrevokes that are part of
| committed
| transactions via sd_log_commited_revoke. It is possible for one
| process to add
| revokes during its transaction, while another process unrevokes them
| during its
| transaction. If the second process finishes its transaction first,
| sd_log_commited_revoke will be decremented by the number of unrevokes
| that the
| second process did, without first being incremented by the number of
| revokes
| the first process did. This is fine, since all started transactions
| must be
| completed before the journal can be flushed.  However,
| sd_log_commited_revoke
| is an unsigned integer, and log_refund() causes an assertion failure
| if it
| would go negative at the end of a transaction.  This patch makes
| sd_log_commited_revoke a signed integer and allows it to go negative.
| __gfs2_log_flush() still checks that it mataches the actual number of
| revokes. 
| 
| Signed-off-by: Benjamin Marzinski <bmarzins at redhat.com>
| ---
|  fs/gfs2/incore.h |    2 +-
|  fs/gfs2/log.c    |    3 +--
|  2 files changed, 2 insertions(+), 3 deletions(-)

Hi,

ACKed by Bob Peterson <rpeterso at redhat.com>

Regards,

Bob Peterson
Red Hat File Systems




More information about the Cluster-devel mailing list