summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorAnand V. Avati <avati@amp.gluster.com>2010-10-02 11:25:05 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-10-02 22:18:56 -0700
commit99caede76b0ef312d622b2387bf9524724e7c6df (patch)
tree7b6c8cc969b5e8460e4ac4b67734422e3fad782c /libglusterfs
parent5a4e1e69b2ec65dcefa6b37b8ac7d058f3a2c29f (diff)
rmdir: introduce extra flags parameter in FOP prototype
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.c26
-rw-r--r--libglusterfs/src/call-stub.h6
-rw-r--r--libglusterfs/src/defaults.c9
-rw-r--r--libglusterfs/src/defaults.h10
-rw-r--r--libglusterfs/src/xlator.h5
5 files changed, 27 insertions, 29 deletions
diff --git a/libglusterfs/src/call-stub.c b/libglusterfs/src/call-stub.c
index 551fa99aecb..3b0e7f0b409 100644
--- a/libglusterfs/src/call-stub.c
+++ b/libglusterfs/src/call-stub.c
@@ -552,9 +552,8 @@ out:
call_stub_t *
-fop_rmdir_stub (call_frame_t *frame,
- fop_rmdir_t fn,
- loc_t *loc)
+fop_rmdir_stub (call_frame_t *frame, fop_rmdir_t fn,
+ loc_t *loc, int flags)
{
call_stub_t *stub = NULL;
@@ -566,6 +565,7 @@ fop_rmdir_stub (call_frame_t *frame,
stub->args.rmdir.fn = fn;
loc_copy (&stub->args.rmdir.loc, loc);
+ stub->args.rmdir.flags = flags;
out:
return stub;
}
@@ -2178,9 +2178,9 @@ call_resume_wind (call_stub_t *stub)
case GF_FOP_RMDIR:
{
- stub->args.rmdir.fn (stub->frame,
- stub->frame->this,
- &stub->args.rmdir.loc);
+ stub->args.rmdir.fn (stub->frame, stub->frame->this,
+ &stub->args.rmdir.loc,
+ stub->args.rmdir.flags);
}
break;
@@ -2672,13 +2672,13 @@ call_resume_unwind (call_stub_t *stub)
&stub->args.rmdir_cbk.preparent,
&stub->args.rmdir_cbk.postparent);
else
- stub->args.unlink_cbk.fn (stub->frame,
- stub->frame->cookie,
- stub->frame->this,
- stub->args.rmdir_cbk.op_ret,
- stub->args.rmdir_cbk.op_errno,
- &stub->args.rmdir_cbk.preparent,
- &stub->args.rmdir_cbk.postparent);
+ stub->args.rmdir_cbk.fn (stub->frame,
+ stub->frame->cookie,
+ stub->frame->this,
+ stub->args.rmdir_cbk.op_ret,
+ stub->args.rmdir_cbk.op_errno,
+ &stub->args.rmdir_cbk.preparent,
+ &stub->args.rmdir_cbk.postparent);
break;
}
diff --git a/libglusterfs/src/call-stub.h b/libglusterfs/src/call-stub.h
index 340468c3e7c..834a38ec0ac 100644
--- a/libglusterfs/src/call-stub.h
+++ b/libglusterfs/src/call-stub.h
@@ -173,6 +173,7 @@ typedef struct {
struct {
fop_rmdir_t fn;
loc_t loc;
+ int flags;
} rmdir;
struct {
fop_rmdir_cbk_t fn;
@@ -715,9 +716,8 @@ fop_unlink_cbk_stub (call_frame_t *frame,
struct iatt *postparent);
call_stub_t *
-fop_rmdir_stub (call_frame_t *frame,
- fop_rmdir_t fn,
- loc_t *loc);
+fop_rmdir_stub (call_frame_t *frame, fop_rmdir_t fn,
+ loc_t *loc, int flags);
call_stub_t *
fop_rmdir_cbk_stub (call_frame_t *frame,
diff --git a/libglusterfs/src/defaults.c b/libglusterfs/src/defaults.c
index 3e271dde421..8af9c235ec8 100644
--- a/libglusterfs/src/defaults.c
+++ b/libglusterfs/src/defaults.c
@@ -574,10 +574,11 @@ default_symlink_resume (call_frame_t *frame, xlator_t *this,
}
int32_t
-default_rmdir_resume (call_frame_t *frame, xlator_t *this, loc_t *loc)
+default_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;
}
@@ -945,10 +946,10 @@ default_symlink (call_frame_t *frame, xlator_t *this, const char *linkpath,
}
int32_t
-default_rmdir (call_frame_t *frame, xlator_t *this, loc_t *loc)
+default_rmdir (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;
}
diff --git a/libglusterfs/src/defaults.h b/libglusterfs/src/defaults.h
index f0235821061..76cb78d7e35 100644
--- a/libglusterfs/src/defaults.h
+++ b/libglusterfs/src/defaults.h
@@ -87,9 +87,8 @@ int32_t default_unlink (call_frame_t *frame,
xlator_t *this,
loc_t *loc);
-int32_t default_rmdir (call_frame_t *frame,
- xlator_t *this,
- loc_t *loc);
+int32_t default_rmdir (call_frame_t *frame, xlator_t *this,
+ loc_t *loc, int flags);
int32_t default_symlink (call_frame_t *frame, xlator_t *this,
const char *linkpath, loc_t *loc, dict_t *params);
@@ -302,9 +301,8 @@ int32_t default_unlink_resume (call_frame_t *frame,
xlator_t *this,
loc_t *loc);
-int32_t default_rmdir_resume (call_frame_t *frame,
- xlator_t *this,
- loc_t *loc);
+int32_t default_rmdir_resume (call_frame_t *frame, xlator_t *this,
+ loc_t *loc, int flags);
int32_t default_symlink_resume (call_frame_t *frame, xlator_t *this,
const char *linkpath, loc_t *loc, dict_t *params);
diff --git a/libglusterfs/src/xlator.h b/libglusterfs/src/xlator.h
index 217ad97bb4c..db5e652890c 100644
--- a/libglusterfs/src/xlator.h
+++ b/libglusterfs/src/xlator.h
@@ -454,9 +454,8 @@ typedef int32_t (*fop_unlink_t) (call_frame_t *frame,
xlator_t *this,
loc_t *loc);
-typedef int32_t (*fop_rmdir_t) (call_frame_t *frame,
- xlator_t *this,
- loc_t *loc);
+typedef int32_t (*fop_rmdir_t) (call_frame_t *frame, xlator_t *this,
+ loc_t *loc, int flags);
typedef int32_t (*fop_symlink_t) (call_frame_t *frame, xlator_t *this,
const char *linkname, loc_t *loc,