diff options
author | Anand Avati <avati@gluster.com> | 2010-09-03 13:59:48 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-09-04 01:45:21 -0700 |
commit | 8b9a144414162413a399d59975fe3b7347907f4f (patch) | |
tree | b37a01b2c146b47a772dd3a7f4ce3563577923fa /libglusterfs | |
parent | d838e4496dec6b8889de47dd0ee31c4899ec7407 (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 'libglusterfs')
-rw-r--r-- | libglusterfs/src/call-stub.c | 16 | ||||
-rw-r--r-- | libglusterfs/src/call-stub.h | 7 | ||||
-rw-r--r-- | libglusterfs/src/defaults.c | 14 | ||||
-rw-r--r-- | libglusterfs/src/defaults.h | 6 | ||||
-rw-r--r-- | libglusterfs/src/xlator.h | 6 |
5 files changed, 22 insertions, 27 deletions
diff --git a/libglusterfs/src/call-stub.c b/libglusterfs/src/call-stub.c index c80dfb593..789b12c97 100644 --- a/libglusterfs/src/call-stub.c +++ b/libglusterfs/src/call-stub.c @@ -449,10 +449,8 @@ out: call_stub_t * -fop_mkdir_stub (call_frame_t *frame, - fop_mkdir_t fn, - loc_t *loc, - mode_t mode) +fop_mkdir_stub (call_frame_t *frame, fop_mkdir_t fn, + loc_t *loc, mode_t mode, dict_t *params) { call_stub_t *stub = NULL; @@ -465,6 +463,8 @@ fop_mkdir_stub (call_frame_t *frame, stub->args.mkdir.fn = fn; loc_copy (&stub->args.mkdir.loc, loc); stub->args.mkdir.mode = mode; + if (params) + stub->args.mkdir.params = dict_ref (params); out: return stub; } @@ -2161,10 +2161,10 @@ call_resume_wind (call_stub_t *stub) case GF_FOP_MKDIR: { - stub->args.mkdir.fn (stub->frame, - stub->frame->this, + stub->args.mkdir.fn (stub->frame, stub->frame->this, &stub->args.mkdir.loc, - stub->args.mkdir.mode); + stub->args.mkdir.mode, + stub->args.mkdir.params); } break; @@ -3341,6 +3341,8 @@ call_stub_destroy_wind (call_stub_t *stub) case GF_FOP_MKDIR: { loc_wipe (&stub->args.mkdir.loc); + if (stub->args.mkdir.params) + dict_unref (stub->args.mkdir.params); } break; diff --git a/libglusterfs/src/call-stub.h b/libglusterfs/src/call-stub.h index 1c46cbc0b..7c67b18e5 100644 --- a/libglusterfs/src/call-stub.h +++ b/libglusterfs/src/call-stub.h @@ -146,6 +146,7 @@ typedef struct { fop_mkdir_t fn; loc_t loc; mode_t mode; + dict_t *params; } mkdir; struct { fop_mkdir_cbk_t fn; @@ -686,10 +687,8 @@ fop_mknod_cbk_stub (call_frame_t *frame, struct iatt *postparent); call_stub_t * -fop_mkdir_stub (call_frame_t *frame, - fop_mkdir_t fn, - loc_t *loc, - mode_t mode); +fop_mkdir_stub (call_frame_t *frame, fop_mkdir_t fn, + loc_t *loc, mode_t mode, dict_t *params); call_stub_t * fop_mkdir_cbk_stub (call_frame_t *frame, diff --git a/libglusterfs/src/defaults.c b/libglusterfs/src/defaults.c index d7018855e..3224e7304 100644 --- a/libglusterfs/src/defaults.c +++ b/libglusterfs/src/defaults.c @@ -285,17 +285,15 @@ default_mkdir_cbk (call_frame_t *frame, return 0; } -int32_t -default_mkdir (call_frame_t *frame, - xlator_t *this, - loc_t *loc, - mode_t mode) + +int +default_mkdir (call_frame_t *frame, xlator_t *this, + loc_t *loc, mode_t mode, dict_t *params) { - STACK_WIND (frame, - default_mkdir_cbk, + STACK_WIND (frame, default_mkdir_cbk, FIRST_CHILD(this), FIRST_CHILD(this)->fops->mkdir, - loc, mode); + loc, mode, params); return 0; } diff --git a/libglusterfs/src/defaults.h b/libglusterfs/src/defaults.h index b951b0781..f58d55e1a 100644 --- a/libglusterfs/src/defaults.h +++ b/libglusterfs/src/defaults.h @@ -85,10 +85,8 @@ int32_t default_readlink (call_frame_t *frame, int32_t default_mknod (call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode, dev_t rdev, dict_t *params); -int32_t default_mkdir (call_frame_t *frame, - xlator_t *this, - loc_t *loc, - mode_t mode); +int32_t default_mkdir (call_frame_t *frame, xlator_t *this, + loc_t *loc, mode_t mode, dict_t *params); int32_t default_unlink (call_frame_t *frame, xlator_t *this, diff --git a/libglusterfs/src/xlator.h b/libglusterfs/src/xlator.h index 73ca9e0c6..848394183 100644 --- a/libglusterfs/src/xlator.h +++ b/libglusterfs/src/xlator.h @@ -447,10 +447,8 @@ typedef int32_t (*fop_mknod_t) (call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode, dev_t rdev, dict_t *params); -typedef int32_t (*fop_mkdir_t) (call_frame_t *frame, - xlator_t *this, - loc_t *loc, - mode_t mode); +typedef int32_t (*fop_mkdir_t) (call_frame_t *frame, xlator_t *this, + loc_t *loc, mode_t mode, dict_t *params); typedef int32_t (*fop_unlink_t) (call_frame_t *frame, xlator_t *this, |