summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/ec/src
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/ec/src')
-rw-r--r--xlators/cluster/ec/src/ec.c23
-rw-r--r--xlators/cluster/ec/src/ec.h2
2 files changed, 25 insertions, 0 deletions
diff --git a/xlators/cluster/ec/src/ec.c b/xlators/cluster/ec/src/ec.c
index 9fecde4c495..9b8251a5403 100644
--- a/xlators/cluster/ec/src/ec.c
+++ b/xlators/cluster/ec/src/ec.c
@@ -576,16 +576,39 @@ int32_t ec_gf_fsyncdir(call_frame_t * frame, xlator_t * this, fd_t * fd,
return 0;
}
+int
+ec_marker_populate_args (call_frame_t *frame, int type, int *gauge,
+ xlator_t **subvols)
+{
+ xlator_t *this = frame->this;
+ ec_t *ec = this->private;
+
+ memcpy (subvols, ec->xl_list, sizeof (*subvols) * ec->nodes);
+
+ if (type == MARKER_XTIME_TYPE) {
+ /*Don't error out on ENOENT/ENOTCONN */
+ gauge[MCNT_NOTFOUND] = 0;
+ gauge[MCNT_ENOTCONN] = 0;
+ }
+
+ return ec->nodes;
+}
+
int32_t
ec_gf_getxattr (call_frame_t *frame, xlator_t *this, loc_t *loc,
const char *name, dict_t *xdata)
{
int error = 0;
+ ec_t *ec = this->private;
if (name && strcmp (name, EC_XATTR_HEAL) != 0) {
EC_INTERNAL_XATTR_OR_GOTO(name, NULL, error, out);
}
+ if (cluster_handle_marker_getxattr (frame, loc, name, ec->vol_uuid,
+ NULL, ec_marker_populate_args) == 0)
+ return 0;
+
ec_getxattr (frame, this, -1, EC_MINIMUM_MIN, default_getxattr_cbk,
NULL, loc, name, xdata);
diff --git a/xlators/cluster/ec/src/ec.h b/xlators/cluster/ec/src/ec.h
index 1c740187757..d565bf8fcb4 100644
--- a/xlators/cluster/ec/src/ec.h
+++ b/xlators/cluster/ec/src/ec.h
@@ -14,6 +14,7 @@
#include "xlator.h"
#include "timer.h"
#include "ec-heald.h"
+#include "libxlator.h"
#define EC_XATTR_PREFIX "trusted.ec."
#define EC_XATTR_CONFIG EC_XATTR_PREFIX"config"
@@ -45,5 +46,6 @@ struct _ec
struct mem_pool * cbk_pool;
struct mem_pool * lock_pool;
ec_self_heald_t shd;
+ char vol_uuid[UUID_SIZE + 1];
};
#endif /* __EC_H__ */