Revert the revert of the direct IO (most of the changes basically)
Switch back all IO operations to the regular ones by default instead of direct disk write. Remaining bio requests are flushed in the direct mode though. Thanks to that we combine best both two approaches, not losing in performance from one side, and making it possible to guarantee the data integrity from the other
Therefore, there's no need to read the cow file extents in many places as it was before: now they are read only once before the driver is switched to the dormant state. Right after that, we flush the remaining bio requests
But simply performing direct IO itself isn't enough, we must make sure the FS will see that changes. This is possible when all assigned file extents are valid from the perspective of the FS. This is done by filling the cow file with zeroes in advance when the cow file is allocated
The main points of this gigantic patch are:
Closes #249