From 13c1c105146288a12210dfbd2b2c4cbbd6960c06 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Thu, 17 Jan 2013 21:11:28 +0530 Subject: cluster/afr: Disable delayed post op when eager-lock is off Problem: When eager-lock is disabled, inodelks for write-fops on same fd conflict with each other. If eager-lock is disabled but delayed post-op is enabled then each write fop's inodelk unlock waits for post-op-delay-secs. So the conflicting write fop acquires inodelk after post-op-delay-secs. This results in post-op-delay-secs delay for every write fop on the fd for sequential writes (Ex: dd). Fix: Disable delayed-post-op when eager-lock is off. Change-Id: I87ea4c8d1c7bb269b9b174388ae50f37e82629b7 BUG: 895235 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/4391 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- xlators/cluster/afr/src/afr-transaction.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'xlators/cluster/afr/src/afr-transaction.c') diff --git a/xlators/cluster/afr/src/afr-transaction.c b/xlators/cluster/afr/src/afr-transaction.c index 73dd50f6..a1700783 100644 --- a/xlators/cluster/afr/src/afr-transaction.c +++ b/xlators/cluster/afr/src/afr-transaction.c @@ -1275,6 +1275,9 @@ afr_set_delayed_post_op (call_frame_t *frame, xlator_t *this) if (!priv->post_op_delay_secs) return; + if (!priv->eager_lock) + return; + local = frame->local; if (!local) return; -- cgit