summaryrefslogtreecommitdiff
path: root/arch/um/include/shared/os.h
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2013-08-18 15:30:06 +0400
committerRichard Weinberger <richard@nod.at>2013-09-07 12:56:49 +0400
commit805f11a0d515658106bfbfadceff0eb30bd90ad2 (patch)
tree2bcfbc9028d5a92875272302bd9e7daf82b4e4be /arch/um/include/shared/os.h
parentf75b1b1bedfb498cc43a992ce4d7ed8df3b1e770 (diff)
downloadlinux-805f11a0d515658106bfbfadceff0eb30bd90ad2.tar.xz
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>
Diffstat (limited to 'arch/um/include/shared/os.h')
-rw-r--r--arch/um/include/shared/os.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/um/include/shared/os.h b/arch/um/include/shared/os.h
index c70a234a3f8c..e98303925cc5 100644
--- a/arch/um/include/shared/os.h
+++ b/arch/um/include/shared/os.h
@@ -141,6 +141,7 @@ extern int os_seek_file(int fd, unsigned long long offset);
extern int os_open_file(const char *file, struct openflags flags, int mode);
extern int os_read_file(int fd, void *buf, int len);
extern int os_write_file(int fd, const void *buf, int count);
+extern int os_sync_file(int fd);
extern int os_file_size(const char *file, unsigned long long *size_out);
extern int os_file_modtime(const char *file, unsigned long *modtime);
extern int os_pipe(int *fd, int stream, int close_on_exec);