Re: ext3 weirdness

Andrew Morton (akpm@digeo.com)
Fri, 11 Apr 2003 16:26:39 -0700


Andreas Dilger <adilger@clusterfs.com> wrote:
>
> On Apr 11, 2003 15:40 -0700, Andrew Morton wrote:
> > Andreas Dilger <adilger@clusterfs.com> wrote:
> > > Because you can't reallocate in-use blocks until the dirty bitmaps have
> > > been committed to disk in a transaction.
> >
> > Also, in 2.5 pdflush will take a ref on the inode while writing it out. So
> > an unlink while pdflush is writing back the inode's pages will be magically
> > instantaneous, and pdflush actually does the truncate.
>
> It should be possible to have pdflush check for i_nlink == 0 and i_count == 1
> periodically, indicating it is the only one that has a reference and then
> immediately iput the node (truncating the pages instead of writing them out).
>

Yes. It is supposed to iput() the inode every sync_writeback_pages() (up to
1024 pages) anyway, partly for this reason.

But I have a vague feeling that this is not working. I'll take a look.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/