While reading about I/O schedulers (CFQ, noop, deadline) I found that some of them (for example deadline) sorts blocks before writing.
Could anybody give a hint how file system survives power failures when blocks are sorted before writing? Let's say journal has to go before writing data on file system level, then i/o scheduler reordered blocks and in the middle of writing this batch to a block device we have a power failure?