From 99caede76b0ef312d622b2387bf9524724e7c6df Mon Sep 17 00:00:00 2001 From: "Anand V. Avati" Date: Sat, 2 Oct 2010 11:25:05 +0000 Subject: rmdir: introduce extra flags parameter in FOP prototype Signed-off-by: Anand V. Avati Signed-off-by: Vijay Bellur BUG: 971 (dynamic volume management) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971 --- xlators/protocol/client/src/client.c | 3 ++- xlators/protocol/client/src/client3_1-fops.c | 1 + xlators/protocol/server/src/server3_1-fops.c | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) (limited to 'xlators/protocol') diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c index 4297c628dc0..e64d8135fff 100644 --- a/xlators/protocol/client/src/client.c +++ b/xlators/protocol/client/src/client.c @@ -444,7 +444,7 @@ out: } int32_t -client_rmdir (call_frame_t *frame, xlator_t *this, loc_t *loc) +client_rmdir (call_frame_t *frame, xlator_t *this, loc_t *loc, int flags) { int ret = -1; clnt_conf_t *conf = NULL; @@ -456,6 +456,7 @@ client_rmdir (call_frame_t *frame, xlator_t *this, loc_t *loc) goto out; args.loc = loc; + args.flags = flags; proc = &conf->fops->proctable[GF_FOP_RMDIR]; if (proc->fn) diff --git a/xlators/protocol/client/src/client3_1-fops.c b/xlators/protocol/client/src/client3_1-fops.c index f4a9b198808..9b6d2bb7145 100644 --- a/xlators/protocol/client/src/client3_1-fops.c +++ b/xlators/protocol/client/src/client3_1-fops.c @@ -2855,6 +2855,7 @@ client3_1_rmdir (call_frame_t *frame, xlator_t *this, memcpy (req.pargfid, args->loc->parent->gfid, 16); req.path = (char *)args->loc->path; req.bname = (char *)args->loc->name; + req.flags = args->flags; conf = this->private; ret = client_submit_request (this, &req, frame, conf->fops, diff --git a/xlators/protocol/server/src/server3_1-fops.c b/xlators/protocol/server/src/server3_1-fops.c index d156e3cc386..b996778ef1c 100644 --- a/xlators/protocol/server/src/server3_1-fops.c +++ b/xlators/protocol/server/src/server3_1-fops.c @@ -1956,7 +1956,7 @@ server_rmdir_resume (call_frame_t *frame, xlator_t *bound_xl) goto err; STACK_WIND (frame, server_rmdir_cbk, - bound_xl, bound_xl->fops->rmdir, &state->loc); + bound_xl, bound_xl->fops->rmdir, &state->loc, state->flags); return 0; err: server_rmdir_cbk (frame, NULL, frame->this, state->resolve.op_ret, @@ -4256,6 +4256,8 @@ server_rmdir (rpcsvc_request_t *req) state->resolve.path = gf_strdup (args.path); state->resolve.bname = gf_strdup (args.bname); + state->flags = args.flags; + resolve_and_resume (frame, server_rmdir_resume); out: return 0; -- cgit