Yeah, well, it all comes down to how most the "most" is. If all
that's between the first flush and the second one are some code the
cpu has to eat through, I don't think there's high chance of an IO
going inbetween unless the IO was already there and gets scheduled
inbetween (which can be avoided).
The thing is that detecting dup is possible but missing is not. If
flush is missing in certain corner paths, nobody would know till
somebody reviews the code. Even when the problem triggers, it would
be rare and obscure enough to avoid proper diagnosis, so I think if
the "most" is most enough, it could be the better way to do it. But,
then again, I'm not a FS guy, so if such thing can be guaranteed in
FSes without too much problem, no need to pull such a stunt at the
block layer.
Yeap, that definitely sounds like a good idea. I'll put it on my todo
list.
Thanks.
--
tejun
--