diff options
author | Brian Foster <bfoster@redhat.com> | 2012-07-23 13:34:27 -0400 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-07-23 11:48:29 -0700 |
commit | d6f88e9edb564ed2300939e4f4fb6d83ac7fc5b6 (patch) | |
tree | e55691b8f942f2cc0ffc1086530c714495250896 /xlators/cluster | |
parent | 35810fb2a7a124a78af3a4749e5b7c682c67e458 (diff) |
afr: pass back xdata in create
A striped, replicated volume spits an error on file creation because
stripe requires xdata to process stripe information and AFR isn't
passing it back.
This fix was suggested by Amar Tumballi.
BUG: 842373
Change-Id: Ia7063590ca5e873d4a4e155989cf067e8a07501f
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-on: http://review.gluster.com/3713
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/cluster')
-rw-r--r-- | xlators/cluster/afr/src/afr-dir-write.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/xlators/cluster/afr/src/afr-dir-write.c b/xlators/cluster/afr/src/afr-dir-write.c index ca2c3a235..759fa0581 100644 --- a/xlators/cluster/afr/src/afr-dir-write.c +++ b/xlators/cluster/afr/src/afr-dir-write.c @@ -105,7 +105,7 @@ afr_create_unwind (call_frame_t *frame, xlator_t *this) local->cont.create.inode, unwind_buf, &local->cont.create.preparent, &local->cont.create.postparent, - NULL); + local->xdata_rsp); } return 0; @@ -167,8 +167,11 @@ afr_create_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this, fd_ctx->opened_on[child_index] = AFR_FD_OPENED; fd_ctx->flags = local->cont.create.flags; - if (local->success_count == 0) + if (local->success_count == 0) { local->cont.create.buf = *buf; + if (xdata) + local->xdata_rsp = dict_ref(xdata); + } if (child_index == local->read_child_index) { local->cont.create.read_child_buf = *buf; |