summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src
diff options
context:
space:
mode:
authorAnand Avati <avati@gluster.com>2010-09-03 13:59:48 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-04 01:45:21 -0700
commit8b9a144414162413a399d59975fe3b7347907f4f (patch)
treeb37a01b2c146b47a772dd3a7f4ce3563577923fa /xlators/cluster/afr/src
parentd838e4496dec6b8889de47dd0ee31c4899ec7407 (diff)
gfid: changes in mkdir() prototype to have params dictionary with uuid in it
Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@amp.gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 971 (dynamic volume management) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971
Diffstat (limited to 'xlators/cluster/afr/src')
-rw-r--r--xlators/cluster/afr/src/afr-common.c5
-rw-r--r--xlators/cluster/afr/src/afr-dir-write.c7
-rw-r--r--xlators/cluster/afr/src/afr-dir-write.h2
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-common.c2
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-entry.c5
-rw-r--r--xlators/cluster/afr/src/afr.h1
6 files changed, 16 insertions, 6 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c
index 1cbc3ba558f..e5330b4e468 100644
--- a/xlators/cluster/afr/src/afr-common.c
+++ b/xlators/cluster/afr/src/afr-common.c
@@ -400,6 +400,11 @@ afr_local_cleanup (afr_local_t *local, xlator_t *this)
dict_unref (local->cont.mknod.params);
}
+ { /* mkdir */
+ if (local->cont.mkdir.params)
+ dict_unref (local->cont.mkdir.params);
+ }
+
{ /* writev */
GF_FREE (local->cont.writev.vector);
}
diff --git a/xlators/cluster/afr/src/afr-dir-write.c b/xlators/cluster/afr/src/afr-dir-write.c
index d1077af9eef..70da6f94955 100644
--- a/xlators/cluster/afr/src/afr-dir-write.c
+++ b/xlators/cluster/afr/src/afr-dir-write.c
@@ -762,7 +762,8 @@ afr_mkdir_wind (call_frame_t *frame, xlator_t *this)
(void *) (long) i,
priv->children[i],
priv->children[i]->fops->mkdir,
- &local->loc, local->cont.mkdir.mode);
+ &local->loc, local->cont.mkdir.mode,
+ local->cont.mkdir.params);
if (!--call_count)
break;
}
@@ -789,7 +790,7 @@ afr_mkdir_done (call_frame_t *frame, xlator_t *this)
int
afr_mkdir (call_frame_t *frame, xlator_t *this,
- loc_t *loc, mode_t mode)
+ loc_t *loc, mode_t mode, dict_t *params)
{
afr_private_t * priv = NULL;
afr_local_t * local = NULL;
@@ -833,6 +834,8 @@ afr_mkdir (call_frame_t *frame, xlator_t *this,
UNLOCK (&priv->read_child_lock);
local->cont.mkdir.mode = mode;
+ if (params)
+ local->cont.mkdir.params = dict_ref (params);
if (loc->parent)
local->cont.mkdir.parent_ino = loc->parent->ino;
diff --git a/xlators/cluster/afr/src/afr-dir-write.h b/xlators/cluster/afr/src/afr-dir-write.h
index 2394c46698b..878e1e714cf 100644
--- a/xlators/cluster/afr/src/afr-dir-write.h
+++ b/xlators/cluster/afr/src/afr-dir-write.h
@@ -31,7 +31,7 @@ afr_mknod (call_frame_t *frame, xlator_t *this,
int32_t
afr_mkdir (call_frame_t *frame, xlator_t *this,
- loc_t *loc, mode_t mode);
+ loc_t *loc, mode_t mode, dict_t *params);
int32_t
afr_unlink (call_frame_t *frame, xlator_t *this,
diff --git a/xlators/cluster/afr/src/afr-self-heal-common.c b/xlators/cluster/afr/src/afr-self-heal-common.c
index cc26abc02a0..fda879d3cb2 100644
--- a/xlators/cluster/afr/src/afr-self-heal-common.c
+++ b/xlators/cluster/afr/src/afr-self-heal-common.c
@@ -1070,7 +1070,7 @@ sh_missing_entries_mkdir (call_frame_t *frame, xlator_t *this)
(void *) (long) i,
priv->children[i],
priv->children[i]->fops->mkdir,
- &local->loc, st_mode);
+ &local->loc, st_mode, NULL);
if (!--call_count)
break;
}
diff --git a/xlators/cluster/afr/src/afr-self-heal-entry.c b/xlators/cluster/afr/src/afr-self-heal-entry.c
index f95d8fc7e9c..140795bdd7f 100644
--- a/xlators/cluster/afr/src/afr-self-heal-entry.c
+++ b/xlators/cluster/afr/src/afr-self-heal-entry.c
@@ -575,7 +575,7 @@ afr_sh_entry_expunge_lookup_trash_cbk (call_frame_t *expunge_frame, void *cookie
(void *) (long) active_src,
priv->children[active_src],
priv->children[active_src]->fops->mkdir,
- &trash_loc, 0777);
+ &trash_loc, 0777, NULL);
loc_wipe (&trash_loc);
return 0;
@@ -1315,7 +1315,8 @@ afr_sh_entry_impunge_mkdir (call_frame_t *impunge_frame, xlator_t *this,
priv->children[child_index],
priv->children[child_index]->fops->mkdir,
&impunge_local->loc,
- st_mode_from_ia (stbuf->ia_prot, stbuf->ia_type));
+ st_mode_from_ia (stbuf->ia_prot, stbuf->ia_type),
+ NULL);
return 0;
}
diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h
index 2f44dce7073..85f66c8255c 100644
--- a/xlators/cluster/afr/src/afr.h
+++ b/xlators/cluster/afr/src/afr.h
@@ -509,6 +509,7 @@ typedef struct _afr_local {
uint64_t gen;
ino_t parent_ino;
int32_t mode;
+ dict_t *params;
inode_t *inode;
struct iatt buf;
struct iatt read_child_buf;