From 6f85f6ce64c99e70d3b674e2e01657803ee3c082 Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Tue, 27 Aug 2013 05:02:20 -0700 Subject: afr: make NOP truncate/ftruncate efficient If truncate/ftruncate is called with the offset as the current size of file, then skip the durability fsync and unwind quickly. Change-Id: I0baec68d96c6d4d8217d33bd9738f7ed0d1b40c5 BUG: 958118 Signed-off-by: Anand Avati Reviewed-on: http://review.gluster.org/5737 Reviewed-by: Pranith Kumar Karampuri Reviewed-by: Vijay Bellur Tested-by: Gluster Build System --- xlators/cluster/afr/src/afr-transaction.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'xlators/cluster/afr/src/afr-transaction.h') diff --git a/xlators/cluster/afr/src/afr-transaction.h b/xlators/cluster/afr/src/afr-transaction.h index 05d1c1a8..fa626fd0 100644 --- a/xlators/cluster/afr/src/afr-transaction.h +++ b/xlators/cluster/afr/src/afr-transaction.h @@ -45,4 +45,7 @@ __mark_all_success (int32_t *pending[], int child_count, afr_transaction_type type); gf_boolean_t afr_any_fops_failed (afr_local_t *local, afr_private_t *priv); + +gf_boolean_t +afr_txn_nothing_failed (call_frame_t *frame, xlator_t *this); #endif /* __TRANSACTION_H__ */ -- cgit