From 2a3d70e536a88ac2d0cef6a56c00f871afc1667b Mon Sep 17 00:00:00 2001 From: Prasanna Kumar Kalever Date: Fri, 19 May 2017 13:30:25 +0530 Subject: gluster-block: update journal data synchronously Also use O_SYNC while creating/truncating block file. Change-Id: Ic0bcc3f2905c438ca5b5d3e95955bbd5d95d3ef4 Signed-off-by: Prasanna Kumar Kalever --- rpc/glfs-operations.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rpc/glfs-operations.c') diff --git a/rpc/glfs-operations.c b/rpc/glfs-operations.c index c7d38c4..9ae8ec5 100644 --- a/rpc/glfs-operations.c +++ b/rpc/glfs-operations.c @@ -102,7 +102,7 @@ glusterBlockCreateEntry(struct glfs *glfs, blockCreateCli *blk, char *gbid, } tgfd = glfs_creat(glfs, gbid, - O_WRONLY | O_CREAT | O_EXCL, + O_WRONLY | O_CREAT | O_EXCL | O_SYNC, S_IRUSR | S_IWUSR); if (!tgfd) { *errCode = errno; -- cgit