loop: support barrier writes
authorNikanth Karthikesan <knikanth@suse.de>
Tue, 24 Mar 2009 11:29:54 +0000 (12:29 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 24 Mar 2009 11:35:18 +0000 (12:35 +0100)
commit68db1961bbf4e16c220ccec4a780e966bc1fece3
tree8101ee12fb24abd2e794ecadfedbc0e0c6859891
parent05378940caf979a8655c18b18a17213dcfa52412
loop: support barrier writes

Honour barrier requests in the loop back block device driver.
In case of barrier bios, flush the backing file once before processing the
barrier and once after to guarantee ordering. In case of filesystems that
does not support fsync, barrier bios would be failed with -EOPNOTSUPP.

Signed-off-by: Nikanth Karthikesan <knikanth@suse.de>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
drivers/block/loop.c