summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src
diff options
context:
space:
mode:
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.c6
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-entry.c2
-rw-r--r--xlators/cluster/afr/src/afr.h1
6 files changed, 16 insertions, 7 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c
index 6a732e1180d..1cbc3ba558f 100644
--- a/xlators/cluster/afr/src/afr-common.c
+++ b/xlators/cluster/afr/src/afr-common.c
@@ -395,6 +395,11 @@ afr_local_cleanup (afr_local_t *local, xlator_t *this)
dict_unref (local->cont.create.params);
}
+ { /* mknod */
+ if (local->cont.mknod.params)
+ dict_unref (local->cont.mknod.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 3e9f48f9a2c..d1077af9eef 100644
--- a/xlators/cluster/afr/src/afr-dir-write.c
+++ b/xlators/cluster/afr/src/afr-dir-write.c
@@ -508,7 +508,8 @@ afr_mknod_wind (call_frame_t *frame, xlator_t *this)
priv->children[i],
priv->children[i]->fops->mknod,
&local->loc, local->cont.mknod.mode,
- local->cont.mknod.dev);
+ local->cont.mknod.dev,
+ local->cont.mknod.params);
if (!--call_count)
break;
}
@@ -534,7 +535,7 @@ afr_mknod_done (call_frame_t *frame, xlator_t *this)
int
afr_mknod (call_frame_t *frame, xlator_t *this,
- loc_t *loc, mode_t mode, dev_t dev)
+ loc_t *loc, mode_t mode, dev_t dev, dict_t *params)
{
afr_private_t * priv = NULL;
afr_local_t * local = NULL;
@@ -579,6 +580,8 @@ afr_mknod (call_frame_t *frame, xlator_t *this,
local->cont.mknod.mode = mode;
local->cont.mknod.dev = dev;
+ if (params)
+ local->cont.mknod.params = dict_ref (params);
if (loc->parent)
local->cont.mknod.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 5369ba968a0..2394c46698b 100644
--- a/xlators/cluster/afr/src/afr-dir-write.h
+++ b/xlators/cluster/afr/src/afr-dir-write.h
@@ -27,7 +27,7 @@ afr_create (call_frame_t *frame, xlator_t *this,
int32_t
afr_mknod (call_frame_t *frame, xlator_t *this,
- loc_t *loc, mode_t mode, dev_t dev);
+ loc_t *loc, mode_t mode, dev_t dev, dict_t *params);
int32_t
afr_mkdir (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 1324ea3fa3e..cc26abc02a0 100644
--- a/xlators/cluster/afr/src/afr-self-heal-common.c
+++ b/xlators/cluster/afr/src/afr-self-heal-common.c
@@ -987,7 +987,7 @@ sh_missing_entries_mknod (call_frame_t *frame, xlator_t *this)
int enoent_count = 0;
int call_count = 0;
mode_t st_mode = 0;
- dev_t ia_gen = 0;
+ dev_t ia_dev = 0;
local = frame->local;
@@ -1003,7 +1003,7 @@ sh_missing_entries_mknod (call_frame_t *frame, xlator_t *this)
st_mode = st_mode_from_ia (sh->buf[sh->source].ia_prot,
sh->buf[sh->source].ia_type);
- ia_gen = sh->buf[sh->source].ia_gen;
+ ia_dev = sh->buf[sh->source].ia_dev;
gf_log (this->name, GF_LOG_TRACE,
"mknod %s mode 0%o on %d subvolumes",
@@ -1016,7 +1016,7 @@ sh_missing_entries_mknod (call_frame_t *frame, xlator_t *this)
(void *) (long) i,
priv->children[i],
priv->children[i]->fops->mknod,
- &local->loc, st_mode, ia_gen);
+ &local->loc, st_mode, ia_dev, 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 31f8c7bbca9..f95d8fc7e9c 100644
--- a/xlators/cluster/afr/src/afr-self-heal-entry.c
+++ b/xlators/cluster/afr/src/afr-self-heal-entry.c
@@ -1288,7 +1288,7 @@ afr_sh_entry_impunge_mknod (call_frame_t *impunge_frame, xlator_t *this,
priv->children[child_index]->fops->mknod,
&impunge_local->loc,
st_mode_from_ia (stbuf->ia_prot, stbuf->ia_type),
- stbuf->ia_rdev);
+ stbuf->ia_rdev, NULL);
return 0;
}
diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h
index f222cb0f866..2f44dce7073 100644
--- a/xlators/cluster/afr/src/afr.h
+++ b/xlators/cluster/afr/src/afr.h
@@ -496,6 +496,7 @@ typedef struct _afr_local {
ino_t parent_ino;
dev_t dev;
mode_t mode;
+ dict_t *params;
inode_t *inode;
struct iatt buf;
struct iatt preparent;