linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Tso <tytso@mit.edu>
To: Curt Wohlgemuth <curtw@google.com>
Cc: Valerie Aurora <vaurora@redhat.com>,
	ext4 development <linux-ext4@vger.kernel.org>
Subject: Re: Odd "leak" of extent info into data blocks?
Date: Tue, 8 Sep 2009 15:40:45 -0400	[thread overview]
Message-ID: <20090908194045.GQ22901@mit.edu> (raw)
In-Reply-To: <6601abe90909081121p17b154a4s2e6852da2b71951f@mail.gmail.com>

On Tue, Sep 08, 2009 at 11:21:11AM -0700, Curt Wohlgemuth wrote:
> Hi Valerie:
> 
> On Tue, Sep 8, 2009 at 10:56 AM, Valerie Aurora<vaurora@redhat.com> wrote:
> > Hey, did you figure this out?  If not, I want to have a bug open
> > somewhere.
> 
> Yes, sorry.  I was going to post a patch for this, but have been
> waiting to verify that it really fixes the issue.  And see the thread
> started by Frank Mayhar about fsync issues as well...
> 
> The problem is a race, between the last write to a to-be-freed
> metadata block (to update the extent header) and the block being
> marked free in the on-disk/buddy bitmaps.  Note that this only happens
> without a journal, since *with* a journal the ordering is done
> correctly.

Just to clarify, this a race that shows up even without an unclean
shutdown, right?

> Without a journal, the block buffer_head is written to, the
> buffer_head is marked dirty, and the bitmaps are updated via
> ext4_free_blocks().  In rare cases, the block is re-allocated for
> another inode and written to -- subsequently, the writeback mechanism
> will then flush the dirty extent header back to disk.  That's why it
> looks like "leaked extent data" in the data block.

If this shows up even without an unclean shutdown, then it sounds like
the problem is a missing bforget() call.

					- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2009-09-08 19:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-22 23:10 Odd "leak" of extent info into data blocks? Curt Wohlgemuth
     [not found] ` <20090908175605.GB7801@shell>
2009-09-08 18:21   ` Curt Wohlgemuth
2009-09-08 19:40     ` Theodore Tso [this message]
2009-09-08 21:18       ` Curt Wohlgemuth
2009-09-08 23:36         ` Theodore Tso
2009-09-09  4:00           ` Curt Wohlgemuth
2009-09-09 15:19             ` Theodore Tso

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=20090908194045.GQ22901@mit.edu \
    --to=tytso@mit.edu \
    --cc=curtw@google.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=vaurora@redhat.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).