[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111228232550.GE12370@thunk.org>
Date: Wed, 28 Dec 2011 18:25:50 -0500
From: Ted Ts'o <tytso@....edu>
To: Yongqiang Yang <xiaoqiangnk@...il.com>
Cc: linux-ext4@...r.kernel.org
Subject: Re: [PATCH 5/5] jbd2: clear revoked flag on buffers before a new
transaction started
On Tue, Nov 15, 2011 at 04:07:54PM +0800, Yongqiang Yang wrote:
> A revoked block in a transaction means the block is deleted by filesystem
> in the transaction. If the block is reused in the same transaction, we
> need to cancel revoke status of the block. We also should prohibit a block
> from being revoked more than once in a transaction. So we need to look up
> the revoke table to check if a given block is revoked, to acceletate the
> looking up, jbd/jbd2 use revoked flag to cache status of a block.
>
> Ok, we should clear revoked flag once the transaction is not running. Because
> the revoking and cancelling revoke operate on a running transaction. Once
> a transaction is non-running, revoked flag is useless.
>
> Without this patch, the following case triggers a false journal error.
> Given that a block is used as a meta block and is deleted(revoked) in ordered
> mode, then the block is allocated as a data block to a file. Up to now,
> user changes the file's journal mode from ordered to journaled, then truncates
> the file. The block will be considered re-revoked by journal because it
> has revoked flag in last transaction.
>
> Signed-off-by: Yongqiang Yang <xiaoqiangnk@...il.com>
Applied, thanks.
- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists