From: Mingming Cao <cmm@us.ibm.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: akpm@osdl.org, torvalds@osdl.org, linux-kernel@vger.kernel.org,
bernard@blackham.com.au
Subject: Re: [patch 130/198] ext2 corruption - regression between 2.6.9 and 2.6.10
Date: Mon, 18 Apr 2005 11:06:52 -0700 [thread overview]
Message-ID: <1113847613.13550.9.camel@localhost.localdomain> (raw)
In-Reply-To: <20050418112213.GA22356@infradead.org>
On Mon, 2005-04-18 at 12:22 +0100, Christoph Hellwig wrote:
> > Mingming Cao <cmm@us.ibm.com> said:
> > The ext2 handle discard preallocation differently at that time, it discard the
> > preallocation at each iput(), not in input_final(), so we think it's
> > unnecessary to thrash it so frequently, and the right thing to do, as we did
> > for ext3 reservation, discard preallocation on last iput(). So we moved the
> > ext2_discard_preallocation from ext2_put_inode(0 to ext2_clear_inode.
> >
> > Since ext2 preallocation is doing pre-allocation on disk, so it is possible
> > that at the unmount time, someone is still hold the reference of the inode, so
> > the preallocation for a file is not discard yet, so we still mark those blocks
> > allocated on disk, while they are not actually in the inode's block map, so
> > fsck will catch/fix that error later.
> >
> > This is not a issue for ext3, as ext3 reservation(pre-allocation) is done in
> > memory.
>
> Shouldn't we have a pass to discard on unmount instead? ->put_inode is
> a really bad interface and all usages including this one are racy (not that
> it matters too much here, but I'd like to get rid of it eventually).
> As a band-aid to avoid the corruption it's certainly okay (and needed), but
> we should try to fix this for real. Mingming, do you want to look into it
> or should I put it on my TODO list?
>
>
Hi Christoph,
I dislike the fact that ext2 discard preallocation on every iput rather
than the last iput. Yes, I think doing a check of the preallocated
blocks at umount time is doable. Please go for it. Thanks for asking.
Mingming
prev parent reply other threads:[~2005-04-18 18:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-12 10:32 [patch 130/198] ext2 corruption - regression between 2.6.9 and 2.6.10 akpm
2005-04-18 11:22 ` Christoph Hellwig
2005-04-18 18:06 ` Mingming Cao [this message]
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=1113847613.13550.9.camel@localhost.localdomain \
--to=cmm@us.ibm.com \
--cc=akpm@osdl.org \
--cc=bernard@blackham.com.au \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/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