Re: [PATCH 1/7] block: Add block_flush_device()

Chris Mason
2009-03-30T20:20:20Z

On Mon, 2009-03-30 at 22:09 +0200, Andi Kleen wrote:
> Chris Mason <chris.mason@oracle.com> writes:
> >
> > As far as I know, reiserfs is the only one actively using it to choose
> > different code. It moves a single wait_on_buffer when barriers are on,
> > which I took out once to simplify the code. Ric saw it in some
> > benchmark numbers and I put it back in.
> >
> > Given that it was a long time ago, I don't have a problem with changing
> > it to work like all the other filesystems.
>
> When it was a win on reiserfs back then maybe it would be a win
> on ext4 or xfs today too?

It could be, but you get into some larger changes. The theory behind
the code was that writeback cache is on, so wait_on_buffer isn't really
going to give you a worthwhile error return anyway. Might as well do
the wait_on_buffer some time later and fix up the commit blocks if it
didn't work out.

We're still arguing about barriers being a good idea all these years
later, and the drives are better at them than they used to be. So, I'd
rather see less complex code in the filesystems than more.

-chris