Re: [PATCH] ext4: fix blkdev_issue_flush() failure handling

Theodore Tso
2009-03-30T17:46:30Z

On Mon, Mar 30, 2009 at 07:47:47AM -0400, Chris Mason wrote:
> > Yes, it was. Although I got the idea when hch pointed out that SuSE did
> > this... thanks to Chris. It's come full circle. :)
>
> Grin. I'm not sure the I_DIRTY checks alone are enough to decide that a
> commit is required though. I think the inode could be clean but still
> have metadata that needs commit.

So to close this hole, I think what we can do is to track the last
transaction id where ext4_do_update_inode() was called, and if that
transaction id == the currently running transaction id, then we need
to call ext4_force_commit() even though the inode is clean. I think
that should fix up the race that you're concerned about.

- Ted