summaryrefslogtreecommitdiffstats
path: root/xlators/performance/io-threads
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@zresearch.com>2009-04-01 13:57:34 -0700
committerAnand V. Avati <avati@amp.gluster.com>2009-04-02 19:18:58 +0530
commit21363da2935615b5574cce597c95a8a7b0503766 (patch)
treee25a85c4332e600aa9ac1c48d32cfca0c58e1fad /xlators/performance/io-threads
parentcbf8858a230b91174dc6134e4729a047db6ff914 (diff)
io-threads: Wire in support for mkdir fop
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'xlators/performance/io-threads')
-rw-r--r--xlators/performance/io-threads/src/io-threads.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/xlators/performance/io-threads/src/io-threads.c b/xlators/performance/io-threads/src/io-threads.c
index dcd4522af..7a17b51f9 100644
--- a/xlators/performance/io-threads/src/io-threads.c
+++ b/xlators/performance/io-threads/src/io-threads.c
@@ -400,6 +400,49 @@ iot_mknod (call_frame_t *frame,
}
int32_t
+iot_mkdir_cbk (call_frame_t *frame,
+ void * cookie,
+ xlator_t *this,
+ int32_t op_ret,
+ int32_t op_errno,
+ inode_t *inode,
+ struct stat *buf)
+{
+ STACK_UNWIND (frame, op_ret, op_errno, inode, buf);
+ return 0;
+}
+
+int32_t
+iot_mkdir_wrapper (call_frame_t *frame,
+ xlator_t *this,
+ loc_t *loc,
+ mode_t mode)
+{
+ STACK_WIND (frame, iot_mkdir_cbk, FIRST_CHILD (this),
+ FIRST_CHILD (this)->fops->mkdir, loc, mode);
+ return 0;
+}
+
+int32_t
+iot_mkdir (call_frame_t *frame,
+ xlator_t *this,
+ loc_t *loc,
+ mode_t mode)
+{
+ call_stub_t *stub = NULL;
+
+ stub = fop_mkdir_stub (frame, iot_mkdir_wrapper, loc, mode);
+ if (!stub) {
+ gf_log (this->name, GF_LOG_ERROR, "cannot get mkdir stub");
+ STACK_UNWIND (frame, -1, ENOMEM, NULL, NULL);
+ 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,
@@ -1315,6 +1358,7 @@ struct xlator_fops fops = {
.access = iot_access,
.readlink = iot_readlink,
.mknod = iot_mknod,
+ .mkdir = iot_mkdir,
};
struct xlator_mops mops = {