summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@zresearch.com>2009-04-01 13:57:51 -0700
committerAnand V. Avati <avati@amp.gluster.com>2009-04-02 19:19:01 +0530
commit6afeb9dd1bb9f329b5b0508d49c2e5142c6fc8cc (patch)
treeb6f96f1f3384831cba6c6ab8c96294775789755d
parent21363da2935615b5574cce597c95a8a7b0503766 (diff)
io-threads: Wire in support for rmdir fop
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
-rw-r--r--xlators/performance/io-threads/src/io-threads.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/xlators/performance/io-threads/src/io-threads.c b/xlators/performance/io-threads/src/io-threads.c
index 7a17b51f9..bf0393144 100644
--- a/xlators/performance/io-threads/src/io-threads.c
+++ b/xlators/performance/io-threads/src/io-threads.c
@@ -443,6 +443,45 @@ iot_mkdir (call_frame_t *frame,
}
int32_t
+iot_rmdir_cbk (call_frame_t *frame,
+ void * cookie,
+ xlator_t *this,
+ int32_t op_ret,
+ int32_t op_errno)
+{
+ STACK_UNWIND (frame, op_ret, op_errno);
+ return 0;
+}
+
+int32_t
+iot_rmdir_wrapper (call_frame_t *frame,
+ xlator_t *this,
+ loc_t *loc)
+{
+ STACK_WIND (frame, iot_rmdir_cbk, FIRST_CHILD (this),
+ FIRST_CHILD (this)->fops->rmdir, loc);
+ return 0;
+}
+
+int32_t
+iot_rmdir (call_frame_t *frame,
+ xlator_t *this,
+ loc_t *loc)
+{
+ call_stub_t *stub = NULL;
+
+ stub = fop_rmdir_stub (frame, iot_rmdir_wrapper, loc);
+ if (!stub) {
+ gf_log (this->name, GF_LOG_ERROR, "cannot get rmdir stub");
+ STACK_UNWIND (frame, -1, ENOMEM);
+ return 0;
+ }
+
+ iot_schedule ((iot_conf_t *)this->private, loc->inode, stub);
+ return 0;
+}
+
+int32_t
iot_open_cbk (call_frame_t *frame,
void *cookie,
xlator_t *this,
@@ -1359,6 +1398,7 @@ struct xlator_fops fops = {
.readlink = iot_readlink,
.mknod = iot_mknod,
.mkdir = iot_mkdir,
+ .rmdir = iot_rmdir,
};
struct xlator_mops mops = {