From 3a35f975fceb89c5ae0e8e3e189545f6fceaf6e5 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Thu, 1 May 2014 10:29:54 +0530 Subject: mgmt/gluster: Use fsync instead of O_SYNC Glusterd uses O_SYNC to write to temp file then performs renames to the actual file and performs fsync on parent directory. Until this rename happens syncing writes to the file can be deferred. In this patch O_SYNC open of temp file is removed and fsync of the fd before rename is done. Change-Id: Ie7da161b0daec845c7dcfab4154cc45c2f49d825 BUG: 908277 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/7370 Reviewed-by: Krishnan Parthasarathi Reviewed-by: Raghavendra Bhat Tested-by: Gluster Build System Reviewed-by: Anand Avati --- libglusterfs/src/store.h | 1 + 1 file changed, 1 insertion(+) (limited to 'libglusterfs/src/store.h') diff --git a/libglusterfs/src/store.h b/libglusterfs/src/store.h index 337103ff73e..beb17ac4a2f 100644 --- a/libglusterfs/src/store.h +++ b/libglusterfs/src/store.h @@ -20,6 +20,7 @@ struct gf_store_handle_ { char *path; int fd; + int tmp_fd; FILE *read; int locked; /* state of lockf() */ }; -- cgit