From c9bf5e6d2897de488967f5d736a5b9898b3deb94 Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Mon, 6 May 2013 19:18:21 +0530 Subject: cluster/dht: Do not open fd in migration check/complete for non fd ops if local->fd == NULL, then in dht_migration_check_complete, do not do open call. Let the layout get updated, and proceed with invoking the registered target_fn. if local->fd == NULL, do not call dht_rebalance_in_progress_check for truncate fop, but proceed with truncate2. Change-Id: Ia5a5d40bcea7bfb320ef7096af1e035b8847d4ff BUG: 960055 Signed-off-by: shishir gowda Reviewed-on: http://review.gluster.org/4958 Reviewed-by: Amar Tumballi Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/cluster/dht/src/dht-inode-write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/cluster/dht/src/dht-inode-write.c') diff --git a/xlators/cluster/dht/src/dht-inode-write.c b/xlators/cluster/dht/src/dht-inode-write.c index b23434cdf3c..b87d2f73284 100644 --- a/xlators/cluster/dht/src/dht-inode-write.c +++ b/xlators/cluster/dht/src/dht-inode-write.c @@ -212,7 +212,7 @@ dht_truncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this, dht_iatt_merge (this, &local->stbuf, postbuf, NULL); dht_iatt_merge (this, &local->prebuf, prebuf, NULL); ret = fd_ctx_get (local->fd, this, NULL); - if (!ret) { + if (!ret || !local->fd) { dht_truncate2 (this, frame, 0); return 0; } -- cgit