summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr.h
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/afr/src/afr.h')
-rw-r--r--xlators/cluster/afr/src/afr.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h
index 8e7bea79712..4adbd5d5c83 100644
--- a/xlators/cluster/afr/src/afr.h
+++ b/xlators/cluster/afr/src/afr.h
@@ -187,6 +187,18 @@ afr_index_for_transaction_type (afr_transaction_type type)
return -1; /* make gcc happy */
}
+static inline int
+afr_index_from_ia_type (ia_type_t type)
+{
+ switch (type) {
+ case IA_IFDIR:
+ return afr_index_for_transaction_type (AFR_ENTRY_TRANSACTION);
+ case IA_IFREG:
+ return afr_index_for_transaction_type (AFR_DATA_TRANSACTION);
+ default: return -1;
+ }
+}
+
typedef struct {
loc_t loc;
char *basename;
@@ -935,6 +947,10 @@ afr_matrix_cleanup (int32_t **pending, unsigned int m);
int32_t**
afr_matrix_create (unsigned int m, unsigned int n);
+int**
+afr_mark_pending_changelog (afr_private_t *priv, unsigned char *pending,
+ dict_t *xattr, ia_type_t iat);
+
void
afr_filter_xattrs (dict_t *xattr);