diff options
author | Krutika Dhananjay <kdhananj@redhat.com> | 2015-10-14 14:14:51 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2016-04-29 18:21:56 -0700 |
commit | 84c8cc9c5936a2a7539f343c180f06312c8f6d39 (patch) | |
tree | 0a89b67bde2e03dafa9f61ffea34f19d11cc9938 /xlators/cluster/afr/src/afr-inode-write.c | |
parent | f0fb05d2cefae08c143f2bfdef151084f5ddb498 (diff) |
cluster/afr: Entry self-heal performance enhancements
Change-Id: I52da41dff5619492b656c2217f4716a6cdadebe0
BUG: 1269461
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/12442
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-inode-write.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-inode-write.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/xlators/cluster/afr/src/afr-inode-write.c b/xlators/cluster/afr/src/afr-inode-write.c index 15bae87a4f4..f240b5eec39 100644 --- a/xlators/cluster/afr/src/afr-inode-write.c +++ b/xlators/cluster/afr/src/afr-inode-write.c @@ -1104,12 +1104,13 @@ _afr_handle_empty_brick_type (xlator_t *this, call_frame_t *frame, afr_transaction_type type, char *op_type) { - afr_local_t *local = NULL; - afr_private_t *priv = NULL; - unsigned char *locked_nodes = NULL; int count = 0; int ret = -ENOMEM; int idx = -1; + int d_idx = -1; + unsigned char *locked_nodes = NULL; + afr_local_t *local = NULL; + afr_private_t *priv = NULL; priv = this->private; local = frame->local; @@ -1117,6 +1118,7 @@ _afr_handle_empty_brick_type (xlator_t *this, call_frame_t *frame, locked_nodes = alloca0 (priv->child_count); idx = afr_index_for_transaction_type (type); + d_idx = afr_index_for_transaction_type (AFR_DATA_TRANSACTION); local->pending = afr_matrix_create (priv->child_count, AFR_NUM_CHANGE_LOGS); @@ -1125,6 +1127,9 @@ _afr_handle_empty_brick_type (xlator_t *this, call_frame_t *frame, local->pending[empty_index][idx] = hton32 (1); + if ((priv->esh_granular) && (type == AFR_ENTRY_TRANSACTION)) + local->pending[empty_index][d_idx] = hton32 (1); + local->xdata_req = dict_new (); if (!local->xdata_req) goto out; @@ -1165,7 +1170,7 @@ _afr_handle_empty_brick_type (xlator_t *this, call_frame_t *frame, unlock: if (AFR_ENTRY_TRANSACTION == type) { afr_selfheal_unentrylk (frame, this, loc->inode, this->name, - NULL, locked_nodes); + NULL, locked_nodes, NULL); } else { afr_selfheal_uninodelk (frame, this, loc->inode, this->name, LLONG_MAX - 1, 0, locked_nodes); |