From 8b9a144414162413a399d59975fe3b7347907f4f Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Fri, 3 Sep 2010 13:59:48 +0000 Subject: gfid: changes in mkdir() prototype to have params dictionary with uuid in it Signed-off-by: Anand V. Avati Signed-off-by: Anand V. Avati Signed-off-by: Vijay Bellur BUG: 971 (dynamic volume management) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971 --- xlators/cluster/dht/src/dht-common.c | 9 ++++++--- xlators/cluster/dht/src/dht-selfheal.c | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'xlators/cluster/dht') diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index bf84dfa6b22..0da8ad73eef 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -3493,7 +3493,7 @@ dht_mkdir_hashed_cbk (call_frame_t *frame, void *cookie, STACK_WIND (frame, dht_mkdir_cbk, conf->subvolumes[i], conf->subvolumes[i]->fops->mkdir, - &local->loc, local->mode); + &local->loc, local->mode, local->params); } return 0; err: @@ -3501,9 +3501,10 @@ err: return 0; } + int dht_mkdir (call_frame_t *frame, xlator_t *this, - loc_t *loc, mode_t mode) + loc_t *loc, mode_t mode, dict_t *params) { dht_local_t *local = NULL; dht_conf_t *conf = NULL; @@ -3552,6 +3553,8 @@ dht_mkdir (call_frame_t *frame, xlator_t *this, goto err; } + local->params = dict_ref (params); + local->layout = dht_layout_new (this, conf->subvolume_cnt); if (!local->layout) { gf_log (this->name, GF_LOG_ERROR, @@ -3563,7 +3566,7 @@ dht_mkdir (call_frame_t *frame, xlator_t *this, STACK_WIND (frame, dht_mkdir_hashed_cbk, hashed_subvol, hashed_subvol->fops->mkdir, - loc, mode); + loc, mode, params); return 0; diff --git a/xlators/cluster/dht/src/dht-selfheal.c b/xlators/cluster/dht/src/dht-selfheal.c index f3504935ded..d5d9892b556 100644 --- a/xlators/cluster/dht/src/dht-selfheal.c +++ b/xlators/cluster/dht/src/dht-selfheal.c @@ -277,7 +277,8 @@ dht_selfheal_dir_mkdir (call_frame_t *frame, loc_t *loc, layout->list[i].xlator->fops->mkdir, loc, st_mode_from_ia (local->stbuf.ia_prot, - local->stbuf.ia_type)); + local->stbuf.ia_type), + NULL); } } -- cgit