summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorAnand Avati <avati@gluster.com>2010-09-03 14:00:05 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-04 01:45:25 -0700
commita7fd7dbed9b995c173664bcadf3d2e5b6131e4ea (patch)
treea4098ccb4a695f10c07c692edfb9da2b2e561a96 /libglusterfs
parent8b9a144414162413a399d59975fe3b7347907f4f (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 'libglusterfs')
-rw-r--r--libglusterfs/src/call-stub.c13
-rw-r--r--libglusterfs/src/call-stub.h7
-rw-r--r--libglusterfs/src/defaults.c14
-rw-r--r--libglusterfs/src/defaults.h6
-rw-r--r--libglusterfs/src/xlator.h7
5 files changed, 22 insertions, 25 deletions
diff --git a/libglusterfs/src/call-stub.c b/libglusterfs/src/call-stub.c
index 789b12c9796..7008cfd6f38 100644
--- a/libglusterfs/src/call-stub.c
+++ b/libglusterfs/src/call-stub.c
@@ -599,10 +599,8 @@ out:
call_stub_t *
-fop_symlink_stub (call_frame_t *frame,
- fop_symlink_t fn,
- const char *linkname,
- loc_t *loc)
+fop_symlink_stub (call_frame_t *frame, fop_symlink_t fn,
+ const char *linkname, loc_t *loc, dict_t *params)
{
call_stub_t *stub = NULL;
@@ -616,6 +614,8 @@ fop_symlink_stub (call_frame_t *frame,
stub->args.symlink.fn = fn;
stub->args.symlink.linkname = gf_strdup (linkname);
loc_copy (&stub->args.symlink.loc, loc);
+ if (params)
+ stub->args.symlink.params = dict_ref (params);
out:
return stub;
}
@@ -2189,7 +2189,8 @@ call_resume_wind (call_stub_t *stub)
stub->args.symlink.fn (stub->frame,
stub->frame->this,
stub->args.symlink.linkname,
- &stub->args.symlink.loc);
+ &stub->args.symlink.loc,
+ stub->args.symlink.params);
}
break;
@@ -3362,6 +3363,8 @@ call_stub_destroy_wind (call_stub_t *stub)
{
GF_FREE ((char *)stub->args.symlink.linkname);
loc_wipe (&stub->args.symlink.loc);
+ if (stub->args.symlink.params)
+ dict_unref (stub->args.symlink.params);
}
break;
diff --git a/libglusterfs/src/call-stub.h b/libglusterfs/src/call-stub.h
index 7c67b18e514..83efa9a4857 100644
--- a/libglusterfs/src/call-stub.h
+++ b/libglusterfs/src/call-stub.h
@@ -186,6 +186,7 @@ typedef struct {
fop_symlink_t fn;
const char *linkname;
loc_t loc;
+ dict_t *params;
} symlink;
struct {
fop_symlink_cbk_t fn;
@@ -727,10 +728,8 @@ fop_rmdir_cbk_stub (call_frame_t *frame,
struct iatt *postparent);
call_stub_t *
-fop_symlink_stub (call_frame_t *frame,
- fop_symlink_t fn,
- const char *linkname,
- loc_t *loc);
+fop_symlink_stub (call_frame_t *frame, fop_symlink_t fn,
+ const char *linkname, loc_t *loc, dict_t *params);
call_stub_t *
fop_symlink_cbk_stub (call_frame_t *frame,
diff --git a/libglusterfs/src/defaults.c b/libglusterfs/src/defaults.c
index 3224e730405..628130a0946 100644
--- a/libglusterfs/src/defaults.c
+++ b/libglusterfs/src/defaults.c
@@ -370,17 +370,15 @@ default_symlink_cbk (call_frame_t *frame,
return 0;
}
-int32_t
-default_symlink (call_frame_t *frame,
- xlator_t *this,
- const char *linkpath,
- loc_t *loc)
+
+int
+default_symlink (call_frame_t *frame, xlator_t *this,
+ const char *linkpath, loc_t *loc, dict_t *params)
{
- STACK_WIND (frame,
- default_symlink_cbk,
+ STACK_WIND (frame, default_symlink_cbk,
FIRST_CHILD(this),
FIRST_CHILD(this)->fops->symlink,
- linkpath, loc);
+ linkpath, loc, params);
return 0;
}
diff --git a/libglusterfs/src/defaults.h b/libglusterfs/src/defaults.h
index f58d55e1a73..a1177cb6c52 100644
--- a/libglusterfs/src/defaults.h
+++ b/libglusterfs/src/defaults.h
@@ -96,10 +96,8 @@ int32_t default_rmdir (call_frame_t *frame,
xlator_t *this,
loc_t *loc);
-int32_t default_symlink (call_frame_t *frame,
- xlator_t *this,
- const char *linkpath,
- loc_t *loc);
+int32_t default_symlink (call_frame_t *frame, xlator_t *this,
+ const char *linkpath, loc_t *loc, dict_t *params);
int32_t default_rename (call_frame_t *frame,
xlator_t *this,
diff --git a/libglusterfs/src/xlator.h b/libglusterfs/src/xlator.h
index 84839418374..c71aa7bb3cc 100644
--- a/libglusterfs/src/xlator.h
+++ b/libglusterfs/src/xlator.h
@@ -458,10 +458,9 @@ typedef int32_t (*fop_rmdir_t) (call_frame_t *frame,
xlator_t *this,
loc_t *loc);
-typedef int32_t (*fop_symlink_t) (call_frame_t *frame,
- xlator_t *this,
- const char *linkname,
- loc_t *loc);
+typedef int32_t (*fop_symlink_t) (call_frame_t *frame, xlator_t *this,
+ const char *linkname, loc_t *loc,
+ dict_t *params);
typedef int32_t (*fop_rename_t) (call_frame_t *frame,
xlator_t *this,