diff options
-rw-r--r-- | xlators/cluster/afr/src/afr-common.c | 1 | ||||
-rw-r--r-- | xlators/cluster/afr/src/afr-lk-common.c | 2 | ||||
-rw-r--r-- | xlators/cluster/afr/src/afr-transaction.c | 6 | ||||
-rw-r--r-- | xlators/cluster/afr/src/afr.h | 1 |
4 files changed, 6 insertions, 4 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index 424a6997160..801346406d7 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -4024,6 +4024,7 @@ afr_transaction_local_init (afr_local_t *local, xlator_t *this) AFR_NUM_CHANGE_LOGS); if (!local->transaction.txn_changelog) goto out; + local->transaction.eager_lock_on = priv->eager_lock; ret = 0; out: return ret; diff --git a/xlators/cluster/afr/src/afr-lk-common.c b/xlators/cluster/afr/src/afr-lk-common.c index 542b2959d83..75df3bb3dea 100644 --- a/xlators/cluster/afr/src/afr-lk-common.c +++ b/xlators/cluster/afr/src/afr-lk-common.c @@ -1554,7 +1554,7 @@ afr_nonblocking_inodelk (call_frame_t *frame, xlator_t *this) continue; flock_use = &flock; - if (!priv->eager_lock) { + if (!local->transaction.eager_lock_on) { goto wind; } diff --git a/xlators/cluster/afr/src/afr-transaction.c b/xlators/cluster/afr/src/afr-transaction.c index c0316f86aae..a8b317878f7 100644 --- a/xlators/cluster/afr/src/afr-transaction.c +++ b/xlators/cluster/afr/src/afr-transaction.c @@ -1291,10 +1291,10 @@ afr_set_delayed_post_op (call_frame_t *frame, xlator_t *this) if (!priv->post_op_delay_secs) return; - if (!priv->eager_lock) + local = frame->local; + if (!local->transaction.eager_lock_on) return; - local = frame->local; if (!local) return; @@ -1477,7 +1477,7 @@ afr_transaction (call_frame_t *frame, xlator_t *this, afr_transaction_type type) local->transaction.resume = afr_transaction_resume; local->transaction.type = type; - if (local->fd && priv->eager_lock && + if (local->fd && local->transaction.eager_lock_on && local->transaction.type == AFR_DATA_TRANSACTION) afr_set_lk_owner (frame, this, local->fd); else diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h index 9405ff29512..cc0d0107763 100644 --- a/xlators/cluster/afr/src/afr.h +++ b/xlators/cluster/afr/src/afr.h @@ -655,6 +655,7 @@ typedef struct _afr_local { struct { off_t start, len; + gf_boolean_t eager_lock_on; int *eager_lock; char *basename; |