summaryrefslogtreecommitdiffstats
path: root/xlators/features/shard/src/shard.h
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features/shard/src/shard.h')
-rw-r--r--xlators/features/shard/src/shard.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/xlators/features/shard/src/shard.h b/xlators/features/shard/src/shard.h
index 0eeabc51f5e..14f181624f7 100644
--- a/xlators/features/shard/src/shard.h
+++ b/xlators/features/shard/src/shard.h
@@ -101,11 +101,13 @@
} while (0)
-#define SHARD_MD_READ_FOP_INIT_REQ_DICT(this, xattr_req, gfid, label) do { \
+#define SHARD_MD_READ_FOP_INIT_REQ_DICT(this, dict, gfid, local, label) do { \
int __ret = -1; \
\
- __ret = dict_set_uint64 (xattr_req, GF_XATTR_SHARD_FILE_SIZE, 8 * 4); \
+ __ret = dict_set_uint64 (dict, GF_XATTR_SHARD_FILE_SIZE, 8 * 4); \
if (__ret) { \
+ local->op_ret = -1; \
+ local->op_errno = ENOMEM; \
gf_log (this->name, GF_LOG_WARNING, "Failed to set dict" \
" value: key:%s for %s.", GF_XATTR_SHARD_FILE_SIZE, \
uuid_utoa (gfid)); \
@@ -126,6 +128,9 @@ typedef struct {
char *domain;
} shard_lock_t;
+typedef int32_t (*shard_post_fop_handler_t) (call_frame_t *frame,
+ xlator_t *this);
+
typedef struct shard_local {
int op_ret;
int op_errno;
@@ -151,6 +156,7 @@ typedef struct shard_local {
struct iatt postbuf;
struct iovec *vector;
struct iobref *iobref;
+ shard_post_fop_handler_t handler;
struct {
int lock_count;
fop_inodelk_cbk_t inodelk_cbk;