summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src
diff options
context:
space:
mode:
authorAnand Avati <avati@gluster.com>2010-09-03 13:59:06 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-04 01:45:10 -0700
commitb304333f8686468b2d3b2c60e040b1667d8c38c9 (patch)
tree8923cfe294e7cb61745d7bf3aed9523c35332f20 /xlators/cluster/afr/src
parentac60a2a7f3c7b07830669e282d9fc796cbc78f38 (diff)
gfid: change in create() 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.c2
-rw-r--r--xlators/cluster/afr/src/afr-dir-write.c8
-rw-r--r--xlators/cluster/afr/src/afr-dir-write.h3
-rw-r--r--xlators/cluster/afr/src/afr.h1
4 files changed, 11 insertions, 3 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c
index 22bb4322edd..6a732e1180d 100644
--- a/xlators/cluster/afr/src/afr-common.c
+++ b/xlators/cluster/afr/src/afr-common.c
@@ -391,6 +391,8 @@ afr_local_cleanup (afr_local_t *local, xlator_t *this)
{ /* create */
if (local->cont.create.fd)
fd_unref (local->cont.create.fd);
+ if (local->cont.create.params)
+ dict_unref (local->cont.create.params);
}
{ /* writev */
diff --git a/xlators/cluster/afr/src/afr-dir-write.c b/xlators/cluster/afr/src/afr-dir-write.c
index 27dd3517794..3e9f48f9a2c 100644
--- a/xlators/cluster/afr/src/afr-dir-write.c
+++ b/xlators/cluster/afr/src/afr-dir-write.c
@@ -253,7 +253,8 @@ afr_create_wind (call_frame_t *frame, xlator_t *this)
&local->loc,
local->cont.create.flags,
local->cont.create.mode,
- local->cont.create.fd);
+ local->cont.create.fd,
+ local->cont.create.params);
if (!--call_count)
break;
}
@@ -280,7 +281,8 @@ afr_create_done (call_frame_t *frame, xlator_t *this)
int
afr_create (call_frame_t *frame, xlator_t *this,
- loc_t *loc, int32_t flags, mode_t mode, fd_t *fd)
+ loc_t *loc, int32_t flags, mode_t mode,
+ fd_t *fd, dict_t *params)
{
afr_private_t * priv = NULL;
afr_local_t * local = NULL;
@@ -326,6 +328,8 @@ afr_create (call_frame_t *frame, xlator_t *this,
local->cont.create.flags = flags;
local->cont.create.mode = mode;
local->cont.create.fd = fd_ref (fd);
+ if (params)
+ local->cont.create.params = dict_ref (params);
if (loc->parent)
local->cont.create.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 4fa618b6575..5369ba968a0 100644
--- a/xlators/cluster/afr/src/afr-dir-write.h
+++ b/xlators/cluster/afr/src/afr-dir-write.h
@@ -22,7 +22,8 @@
int32_t
afr_create (call_frame_t *frame, xlator_t *this,
- loc_t *loc, int32_t flags, mode_t mode, fd_t *fd);
+ loc_t *loc, int32_t flags, mode_t mode,
+ fd_t *fd, dict_t *params);
int32_t
afr_mknod (call_frame_t *frame, xlator_t *this,
diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h
index 6df8c697ca6..f222cb0f866 100644
--- a/xlators/cluster/afr/src/afr.h
+++ b/xlators/cluster/afr/src/afr.h
@@ -480,6 +480,7 @@ typedef struct _afr_local {
uint64_t gen;
ino_t parent_ino;
fd_t *fd;
+ dict_t *params;
int32_t flags;
mode_t mode;
inode_t *inode;