From 7645411f134c2b7ae004f0a8478449965e424a97 Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Wed, 27 Feb 2013 14:30:15 -0800 Subject: nfs: handle stable write with @flags rather than fsync() stable writes can be "made stable" by simply setting O_SYNC (or O_DSYNC, accordingly) in the write flags or fd->flags. Performing fsync() at the end of the write is extremely inefficient and completely messes up eager-locking logic in AFR. Change-Id: I4d954c133641e246b2ab4df874bad0282667561f BUG: 916372 Signed-off-by: Anand Avati Reviewed-on: http://review.gluster.org/4591 Tested-by: Gluster Build System Reviewed-by: Amar Tumballi Reviewed-by: Jeff Darcy --- xlators/nfs/server/src/nfs-fops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/nfs/server/src/nfs-fops.c') diff --git a/xlators/nfs/server/src/nfs-fops.c b/xlators/nfs/server/src/nfs-fops.c index f85f6b2c471..b6edc99c7f9 100644 --- a/xlators/nfs/server/src/nfs-fops.c +++ b/xlators/nfs/server/src/nfs-fops.c @@ -1379,7 +1379,7 @@ nfs_fop_write (xlator_t *nfsx, xlator_t *xl, nfs_user_t *nfu, fd_t *fd, iobref_add (nfl->iobref, srciob); */ STACK_WIND_COOKIE (frame, nfs_fop_writev_cbk, xl, xl,xl->fops->writev, - fd, vector, count, offset, 0, srciobref, NULL); + fd, vector, count, offset, fd->flags, srciobref, NULL); ret = 0; err: if (ret < 0) { -- cgit