Re: [PATCH]: reiser4 [8/8] reiser4 code

Nikita Danilov (Nikita@Namesys.COM)
Thu, 31 Oct 2002 21:16:21 +0300


[Reiserfs-List@Namesys.COM is no longer subscribers-only, back into CC]

Alexander Viro writes:
>
>
> On Thu, 31 Oct 2002, Nikita Danilov wrote:
>
> > generic_shutdown_super() calls fsync_super(sb) (which will call
> > ->writepage() on each dirty page) and then invalidate_inodes().
> >
> > Reiser4 has commit out-standing transactions -between- these two points:
> > after ->writepage() has been called on all dirty pages, but before
> > inodes were destroyed. Thus, we cannot use
> > kill_block_super()/generic_shutdown_super().
>
> Why don't you do that from within fsync_super()? That would be much
> more natural point for such stuff...
>
> I hadn't looked into akpm's stuff in fs-writeback.c for a while, but
> if one can't stick such flush point in there I'd argue that this is
> a bug that needs to be fixed - either there or by providing explicit

->writepages gets (in wbc->sync_mode) enough information to tell
synchronization request like umount or sync from
balance_dirty_pages(). Yes, it looks like better solution,
->writepages(inode, WB_SYNC_ALL) should just synchronously commit all
transactions involving any of inode's pages.

> callback from fsync_super().

Hmm, I just noted that for now we probably could simply use exported
fsync_bdev(s->s_bdev) in fsync_super(s) stead. How simple. Thank you for
the useful discussion. :-)

Nikita.
-
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/