diff options
author | Anand Avati <avati@gluster.com> | 2010-09-03 13:59:30 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-09-04 01:45:15 -0700 |
commit | d838e4496dec6b8889de47dd0ee31c4899ec7407 (patch) | |
tree | 051793458e42079aacdfcb455a051eca13c60104 /libglusterfs | |
parent | b304333f8686468b2d3b2c60e040b1667d8c38c9 (diff) |
gfid: changes in mknod() 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 | 17 | ||||
-rw-r--r-- | libglusterfs/src/call-stub.h | 8 | ||||
-rw-r--r-- | libglusterfs/src/defaults.c | 15 | ||||
-rw-r--r-- | libglusterfs/src/defaults.h | 7 | ||||
-rw-r--r-- | libglusterfs/src/xlator.h | 8 |
5 files changed, 23 insertions, 32 deletions
diff --git a/libglusterfs/src/call-stub.c b/libglusterfs/src/call-stub.c index 4e62276fc5f..c80dfb593c3 100644 --- a/libglusterfs/src/call-stub.c +++ b/libglusterfs/src/call-stub.c @@ -393,11 +393,8 @@ out: call_stub_t * -fop_mknod_stub (call_frame_t *frame, - fop_mknod_t fn, - loc_t *loc, - mode_t mode, - dev_t rdev) +fop_mknod_stub (call_frame_t *frame, fop_mknod_t fn, + loc_t *loc, mode_t mode, dev_t rdev, dict_t *params) { call_stub_t *stub = NULL; @@ -411,6 +408,8 @@ fop_mknod_stub (call_frame_t *frame, loc_copy (&stub->args.mknod.loc, loc); stub->args.mknod.mode = mode; stub->args.mknod.rdev = rdev; + if (params) + stub->args.mknod.params = dict_ref (params); out: return stub; } @@ -2152,11 +2151,11 @@ call_resume_wind (call_stub_t *stub) case GF_FOP_MKNOD: { - stub->args.mknod.fn (stub->frame, - stub->frame->this, + stub->args.mknod.fn (stub->frame, stub->frame->this, &stub->args.mknod.loc, stub->args.mknod.mode, - stub->args.mknod.rdev); + stub->args.mknod.rdev, + stub->args.mknod.params); } break; @@ -3334,6 +3333,8 @@ call_stub_destroy_wind (call_stub_t *stub) case GF_FOP_MKNOD: { loc_wipe (&stub->args.mknod.loc); + if (stub->args.mknod.params) + dict_unref (stub->args.mknod.params); } break; diff --git a/libglusterfs/src/call-stub.h b/libglusterfs/src/call-stub.h index fd79cc2d6cf..1c46cbc0bee 100644 --- a/libglusterfs/src/call-stub.h +++ b/libglusterfs/src/call-stub.h @@ -130,6 +130,7 @@ typedef struct { loc_t loc; mode_t mode; dev_t rdev; + dict_t *params; } mknod; struct { fop_mknod_cbk_t fn; @@ -671,11 +672,8 @@ fop_readlink_cbk_stub (call_frame_t *frame, struct iatt *buf); call_stub_t * -fop_mknod_stub (call_frame_t *frame, - fop_mknod_t fn, - loc_t *loc, - mode_t mode, - dev_t rdev); +fop_mknod_stub (call_frame_t *frame, fop_mknod_t fn, + loc_t *loc, mode_t mode, dev_t rdev, dict_t *params); call_stub_t * fop_mknod_cbk_stub (call_frame_t *frame, diff --git a/libglusterfs/src/defaults.c b/libglusterfs/src/defaults.c index 8a450b6d6d6..d7018855e9d 100644 --- a/libglusterfs/src/defaults.c +++ b/libglusterfs/src/defaults.c @@ -252,18 +252,15 @@ default_mknod_cbk (call_frame_t *frame, return 0; } -int32_t -default_mknod (call_frame_t *frame, - xlator_t *this, - loc_t *loc, - mode_t mode, - dev_t rdev) + +int +default_mknod (call_frame_t *frame, xlator_t *this, + loc_t *loc, mode_t mode, dev_t rdev, dict_t *parms) { - STACK_WIND (frame, - default_mknod_cbk, + STACK_WIND (frame, default_mknod_cbk, FIRST_CHILD(this), FIRST_CHILD(this)->fops->mknod, - loc, mode, rdev); + loc, mode, rdev, parms); return 0; } diff --git a/libglusterfs/src/defaults.h b/libglusterfs/src/defaults.h index 751380d3207..b951b0781da 100644 --- a/libglusterfs/src/defaults.h +++ b/libglusterfs/src/defaults.h @@ -82,11 +82,8 @@ int32_t default_readlink (call_frame_t *frame, loc_t *loc, size_t size); -int32_t default_mknod (call_frame_t *frame, - xlator_t *this, - loc_t *loc, - mode_t mode, - dev_t rdev); +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, diff --git a/libglusterfs/src/xlator.h b/libglusterfs/src/xlator.h index 10f0418df2d..73ca9e0c648 100644 --- a/libglusterfs/src/xlator.h +++ b/libglusterfs/src/xlator.h @@ -443,11 +443,9 @@ typedef int32_t (*fop_readlink_t) (call_frame_t *frame, loc_t *loc, size_t size); -typedef int32_t (*fop_mknod_t) (call_frame_t *frame, - xlator_t *this, - loc_t *loc, - mode_t mode, - dev_t rdev); +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, |