On Thu, Jun 02, 2011 at 08:43:00PM -0400, Ted Ts'o wrote: > On Thu, Jun 02, 2011 at 08:27:14PM -0400, Vivek Goyal wrote: > > > > In this case only a single thread is doing IO continuously. I am assuming > > if there is a database using XFS, it is not unreasonable to have prolonged > > periods of continuous IO activity. In that case I think by above design > > sync will not finish until and unless there is a momentary pause in IO. This > > does not sound like the best design choice. > > Sure, but under what circumstances would a database be blasting data > using AIO/DIO in one thread, and calling fsync() in another thread? > In practice I don't think this situation should ever arise. If it > did, the question of which writes could be considered safely on stable > store and which would not would be undefined. In fact, for most > enterpise databases, they are using preallocated files, so there's no > need at all to use fsync() and AIO/DIO at the same time. In this case I had done "sync" while aio-stress was doing O_DIRECT writes. I really don't have any real world example, I just cooked up a hypothetical scenario. Just wondering why ext4 and XFS behavior are different and which is a more appropriate behavior. ext4 does not seem to be waiting for all pending AIO/DIO to finish while XFS does. Thanks Vivek -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html