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/features/access-control/src/access-control.c | 12 ++++++------ xlators/features/quiesce/src/quiesce.c | 14 ++++++-------- xlators/features/quota/src/quota.c | 8 +++++--- xlators/features/read-only/src/read-only.c | 5 +++-- 4 files changed, 20 insertions(+), 19 deletions(-) (limited to 'xlators/features') diff --git a/xlators/features/access-control/src/access-control.c b/xlators/features/access-control/src/access-control.c index 34422f9ca0c..a8aae9780ff 100644 --- a/xlators/features/access-control/src/access-control.c +++ b/xlators/features/access-control/src/access-control.c @@ -788,11 +788,11 @@ out: } -int32_t -ac_rmdir_resume (call_frame_t *frame, xlator_t *this, loc_t *loc) +int +ac_rmdir_resume (call_frame_t *frame, xlator_t *this, loc_t *loc, int flags) { STACK_WIND (frame, default_rmdir_cbk, FIRST_CHILD(this), - FIRST_CHILD(this)->fops->rmdir, loc); + FIRST_CHILD(this)->fops->rmdir, loc, flags); return 0; } @@ -827,14 +827,14 @@ out: } -int32_t -ac_rmdir (call_frame_t *frame, xlator_t *this, loc_t *loc) +int +ac_rmdir (call_frame_t *frame, xlator_t *this, loc_t *loc, int flags) { call_stub_t *stub = NULL; int ret = -EFAULT; loc_t parentloc = {0, }; - stub = fop_rmdir_stub (frame, ac_rmdir_resume, loc); + stub = fop_rmdir_stub (frame, ac_rmdir_resume, loc, flags); if (!stub) { gf_log (this->name, GF_LOG_ERROR, "cannot create call stub: " "(out of memory)"); diff --git a/xlators/features/quiesce/src/quiesce.c b/xlators/features/quiesce/src/quiesce.c index 168e32373d5..32fac39bb0a 100644 --- a/xlators/features/quiesce/src/quiesce.c +++ b/xlators/features/quiesce/src/quiesce.c @@ -628,10 +628,9 @@ quiesce_symlink (call_frame_t *frame, xlator_t *this, return 0; } -int32_t -quiesce_rmdir (call_frame_t *frame, - xlator_t *this, - loc_t *loc) + +int +quiesce_rmdir (call_frame_t *frame, xlator_t *this, loc_t *loc, int flags) { quiesce_priv_t *priv = NULL; call_stub_t *stub = NULL; @@ -639,15 +638,14 @@ quiesce_rmdir (call_frame_t *frame, priv = this->private; if (priv->pass_through) { - STACK_WIND (frame, - default_rmdir_cbk, + STACK_WIND (frame, default_rmdir_cbk, FIRST_CHILD(this), FIRST_CHILD(this)->fops->rmdir, - loc); + loc, flags); return 0; } - stub = fop_rmdir_stub (frame, default_rmdir_resume, loc); + stub = fop_rmdir_stub (frame, default_rmdir_resume, loc, flags); if (!stub) { STACK_UNWIND_STRICT (rmdir, frame, -1, ENOMEM, NULL, NULL); return 0; diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c index 094b62d4a56..0f862e090b8 100644 --- a/xlators/features/quota/src/quota.c +++ b/xlators/features/quota/src/quota.c @@ -43,6 +43,7 @@ struct quota_local { struct iovec vector[MAX_IOVEC]; struct iobref *iobref; loc_t loc; + int flags; }; @@ -520,14 +521,14 @@ quota_rmdir_stat_cbk (call_frame_t *frame, void *cookie, xlator_t *this, STACK_WIND (frame, quota_rmdir_cbk, FIRST_CHILD(this), FIRST_CHILD(this)->fops->rmdir, - &local->loc); + &local->loc, local->flags); return 0; } int -quota_rmdir (call_frame_t *frame, xlator_t *this, loc_t *loc) +quota_rmdir (call_frame_t *frame, xlator_t *this, loc_t *loc, int flags) { struct quota_local *local = NULL; struct quota_priv *priv = NULL; @@ -540,6 +541,7 @@ quota_rmdir (call_frame_t *frame, xlator_t *this, loc_t *loc) frame->local = local; loc_copy (&local->loc, loc); + local->flags = flags; STACK_WIND (frame, quota_rmdir_stat_cbk, FIRST_CHILD(this), @@ -550,7 +552,7 @@ quota_rmdir (call_frame_t *frame, xlator_t *this, loc_t *loc) STACK_WIND (frame, quota_rmdir_cbk, FIRST_CHILD(this), FIRST_CHILD(this)->fops->rmdir, - loc); + loc, flags); return 0; } diff --git a/xlators/features/read-only/src/read-only.c b/xlators/features/read-only/src/read-only.c index 8c71f0a0d78..fe0e95b9fd1 100644 --- a/xlators/features/read-only/src/read-only.c +++ b/xlators/features/read-only/src/read-only.c @@ -137,8 +137,9 @@ ro_unlink (call_frame_t *frame, xlator_t *this, loc_t *loc) return 0; } -int32_t -ro_rmdir (call_frame_t *frame, xlator_t *this, loc_t *loc) + +int +ro_rmdir (call_frame_t *frame, xlator_t *this, loc_t *loc, int flags) { STACK_UNWIND_STRICT (rmdir, frame, -1, EROFS, NULL, NULL); return 0; -- cgit