diff options
author | Anand Avati <avati@gluster.com> | 2010-09-03 14:00:05 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-09-04 01:45:25 -0700 |
commit | a7fd7dbed9b995c173664bcadf3d2e5b6131e4ea (patch) | |
tree | a4098ccb4a695f10c07c692edfb9da2b2e561a96 /xlators/cluster | |
parent | 8b9a144414162413a399d59975fe3b7347907f4f (diff) |
gfid: changes in symlink() 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')
-rw-r--r-- | xlators/cluster/afr/src/afr-common.c | 5 | ||||
-rw-r--r-- | xlators/cluster/afr/src/afr-dir-write.c | 7 | ||||
-rw-r--r-- | xlators/cluster/afr/src/afr-dir-write.h | 4 | ||||
-rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-common.c | 2 | ||||
-rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-entry.c | 2 | ||||
-rw-r--r-- | xlators/cluster/afr/src/afr.h | 1 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 4 |
7 files changed, 17 insertions, 8 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index e5330b4e4..d536b4554 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -405,6 +405,11 @@ afr_local_cleanup (afr_local_t *local, xlator_t *this) dict_unref (local->cont.mkdir.params); } + { /* symlink */ + if (local->cont.symlink.params) + dict_unref (local->cont.symlink.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 70da6f949..5d5bf40e0 100644 --- a/xlators/cluster/afr/src/afr-dir-write.c +++ b/xlators/cluster/afr/src/afr-dir-write.c @@ -1253,7 +1253,8 @@ afr_symlink_wind (call_frame_t *frame, xlator_t *this) priv->children[i], priv->children[i]->fops->symlink, local->cont.symlink.linkpath, - &local->loc); + &local->loc, + local->cont.symlink.params); if (!--call_count) break; @@ -1280,7 +1281,7 @@ afr_symlink_done (call_frame_t *frame, xlator_t *this) int afr_symlink (call_frame_t *frame, xlator_t *this, - const char *linkpath, loc_t *loc) + const char *linkpath, loc_t *loc, dict_t *params) { afr_private_t * priv = NULL; afr_local_t * local = NULL; @@ -1324,6 +1325,8 @@ afr_symlink (call_frame_t *frame, xlator_t *this, UNLOCK (&priv->read_child_lock); local->cont.symlink.linkpath = gf_strdup (linkpath); + if (params) + local->cont.symlink.params = dict_ref (params); if (loc->parent) local->cont.symlink.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 878e1e714..e2ed8c759 100644 --- a/xlators/cluster/afr/src/afr-dir-write.h +++ b/xlators/cluster/afr/src/afr-dir-write.h @@ -49,9 +49,9 @@ int32_t afr_rename (call_frame_t *frame, xlator_t *this, loc_t *oldloc, loc_t *newloc); -int32_t +int afr_symlink (call_frame_t *frame, xlator_t *this, - const char *linkpath, loc_t *oldloc); + const char *linkpath, loc_t *oldloc, dict_t *params); int32_t afr_setdents (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 fda879d3c..0e25be694 100644 --- a/xlators/cluster/afr/src/afr-self-heal-common.c +++ b/xlators/cluster/afr/src/afr-self-heal-common.c @@ -1115,7 +1115,7 @@ sh_missing_entries_symlink (call_frame_t *frame, xlator_t *this, (void *) (long) i, priv->children[i], priv->children[i]->fops->symlink, - link, &local->loc); + link, &local->loc, 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 140795bdd..af6c0c689 100644 --- a/xlators/cluster/afr/src/afr-self-heal-entry.c +++ b/xlators/cluster/afr/src/afr-self-heal-entry.c @@ -1341,7 +1341,7 @@ afr_sh_entry_impunge_symlink (call_frame_t *impunge_frame, xlator_t *this, (void *) (long) child_index, priv->children[child_index], priv->children[child_index]->fops->symlink, - linkname, &impunge_local->loc); + linkname, &impunge_local->loc, NULL); return 0; } diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h index 85f66c825..af3e7f204 100644 --- a/xlators/cluster/afr/src/afr.h +++ b/xlators/cluster/afr/src/afr.h @@ -561,6 +561,7 @@ typedef struct _afr_local { uint64_t gen; ino_t parent_ino; inode_t *inode; + dict_t *params; struct iatt buf; struct iatt read_child_buf; char *linkpath; diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index 0da8ad73e..24430e6bc 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -2901,7 +2901,7 @@ err: int dht_symlink (call_frame_t *frame, xlator_t *this, - const char *linkname, loc_t *loc) + const char *linkname, loc_t *loc, dict_t *params) { xlator_t *subvol = NULL; int op_errno = -1; @@ -2942,7 +2942,7 @@ dht_symlink (call_frame_t *frame, xlator_t *this, STACK_WIND (frame, dht_newfile_cbk, subvol, subvol->fops->symlink, - linkname, loc); + linkname, loc, params); return 0; |