um: ubd: Add REQ_FLUSH suppport
authorRichard Weinberger <richard@nod.at>
Sun, 18 Aug 2013 11:30:06 +0000 (13:30 +0200)
committerRichard Weinberger <richard@nod.at>
Sat, 7 Sep 2013 08:56:49 +0000 (10:56 +0200)
commit805f11a0d515658106bfbfadceff0eb30bd90ad2
tree2bcfbc9028d5a92875272302bd9e7daf82b4e4be
parentf75b1b1bedfb498cc43a992ce4d7ed8df3b1e770
um: ubd: Add REQ_FLUSH suppport

UML's block device driver does not support write barriers,
to support this this patch adds REQ_FLUSH suppport.
Every time the block layer sends a REQ_FLUSH we fsync() now
our backing file to guarantee data consistency.

Reported-and-tested-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/drivers/ubd_kern.c
arch/um/include/shared/os.h
arch/um/os-Linux/file.c