linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ted Ts'o <tytso@mit.edu>
To: Yongqiang Yang <xiaoqiangnk@gmail.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH 5/5] jbd2: clear revoked flag on buffers before a new transaction started
Date: Wed, 28 Dec 2011 18:25:50 -0500	[thread overview]
Message-ID: <20111228232550.GE12370@thunk.org> (raw)
In-Reply-To: <1321344474-14707-5-git-send-email-xiaoqiangnk@gmail.com>

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@gmail.com>

Applied, thanks.

						- Ted

  reply	other threads:[~2011-12-28 23:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-15  8:07 [PATCH 1/5] ext4: allocate delalloc blocks before changing journal mode Yongqiang Yang
2011-11-15  8:07 ` [PATCH 2/5] ext4: let ext4 journal deletion of data blocks Yongqiang Yang
2011-12-28 17:23   ` Ted Ts'o
2011-12-30 14:59     ` Yongqiang Yang
2011-12-30 15:05       ` Ted Ts'o
2011-11-15  8:07 ` [PATCH 3/5] ext4: let ext4_free_blocks handle multiblock correctly Yongqiang Yang
2011-12-28 17:23   ` Ted Ts'o
2011-11-15  8:07 ` [PATCH 4/5] ext4: flush journal when switching from journal data mode Yongqiang Yang
2011-12-28 18:56   ` Ted Ts'o
2011-12-29 21:01     ` Darrick J. Wong
2011-12-30 14:43       ` Yongqiang Yang
2011-12-30 14:57       ` Ted Ts'o
2011-11-15  8:07 ` [PATCH 5/5] jbd2: clear revoked flag on buffers before a new transaction started Yongqiang Yang
2011-12-28 23:25   ` Ted Ts'o [this message]
2011-12-09  3:31 ` [PATCH 1/5] ext4: allocate delalloc blocks before changing journal mode Toshiyuki Okajima
2011-12-28 17:14 ` Ted Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111228232550.GE12370@thunk.org \
    --to=tytso@mit.edu \
    --cc=linux-ext4@vger.kernel.org \
    --cc=xiaoqiangnk@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).