summaryrefslogtreecommitdiffstats
path: root/xlators/performance/io-threads
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@zresearch.com>2009-04-01 13:56:27 -0700
committerAnand V. Avati <avati@amp.gluster.com>2009-04-02 19:18:47 +0530
commitd767455020f9730793230a14cd9e795194c5257f (patch)
treef789d77605b409b387a569286533f1419e77826c /xlators/performance/io-threads
parenteab231f3596aa4b6ad2b9b8f3d1a4cc97bda76bc (diff)
io-threads: Wire in support for access 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.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/xlators/performance/io-threads/src/io-threads.c b/xlators/performance/io-threads/src/io-threads.c
index 966a435bf..b429c4b2d 100644
--- a/xlators/performance/io-threads/src/io-threads.c
+++ b/xlators/performance/io-threads/src/io-threads.c
@@ -270,6 +270,48 @@ iot_fchown (call_frame_t *frame,
}
int32_t
+iot_access_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_access_wrapper (call_frame_t *frame,
+ xlator_t *this,
+ loc_t *loc,
+ int32_t mask)
+{
+ STACK_WIND (frame, iot_access_cbk, FIRST_CHILD (this),
+ FIRST_CHILD (this)->fops->access, loc, mask);
+ return 0;
+}
+
+int32_t
+iot_access (call_frame_t *frame,
+ xlator_t *this,
+ loc_t *loc,
+ int32_t mask)
+{
+ call_stub_t *stub = NULL;
+
+ stub = fop_access_stub (frame, iot_access_wrapper, loc, mask);
+ if (!stub) {
+ gf_log (this->name, GF_LOG_ERROR, "cannot get access 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,
@@ -1182,6 +1224,7 @@ struct xlator_fops fops = {
.fchmod = iot_fchmod,
.chown = iot_chown,
.fchown = iot_fchown,
+ .access = iot_access,
};
struct xlator_mops mops = {