summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@zresearch.com>2009-04-21 04:49:10 -0700
committerAnand V. Avati <avati@amp.gluster.com>2009-04-22 13:06:31 +0530
commit609c5aff6faa21cf3aaefa6b7a2a31a91590d726 (patch)
tree860080f0f3121262b27cdc9f75c8459f33053af2
parenta77340b94147a078918536a5297746803c846809 (diff)
io-threads: Add fsetxattr fop
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
-rw-r--r--xlators/performance/io-threads/src/io-threads.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/xlators/performance/io-threads/src/io-threads.c b/xlators/performance/io-threads/src/io-threads.c
index 11aa7bb51..363a64929 100644
--- a/xlators/performance/io-threads/src/io-threads.c
+++ b/xlators/performance/io-threads/src/io-threads.c
@@ -1714,6 +1714,40 @@ iot_fgetxattr (call_frame_t *frame, xlator_t *this, fd_t *fd,
return 0;
}
+int
+iot_fsetxattr_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;
+}
+
+int
+iot_fsetxattr_wrapper (call_frame_t *frame, xlator_t *this, fd_t *fd,
+ dict_t *dict, int32_t flags)
+{
+ STACK_WIND (frame, iot_fsetxattr_cbk, FIRST_CHILD (this),
+ FIRST_CHILD (this)->fops->fsetxattr, fd, dict, flags);
+ return 0;
+}
+
+int
+iot_fsetxattr (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *dict,
+ int32_t flags)
+{
+ call_stub_t *stub = NULL;
+
+ stub = fop_fsetxattr_stub (frame, iot_fsetxattr_wrapper, fd, dict,
+ flags);
+ if (!stub) {
+ gf_log (this->name, GF_LOG_ERROR, "cannot get fsetxattr stub");
+ STACK_UNWIND (frame, -1, ENOMEM);
+ return 0;
+ }
+
+ iot_schedule_ordered ((iot_conf_t *)this->private, fd->inode, stub);
+ return 0;
+}
/* Must be called with worker lock held */
void
_iot_queue (iot_worker_t *worker,
@@ -2242,6 +2276,7 @@ struct xlator_fops fops = {
.setxattr = iot_setxattr, /* U */
.getxattr = iot_getxattr, /* U */
.fgetxattr = iot_fgetxattr, /* O */
+ .fsetxattr = iot_fsetxattr, /* O */
};
struct xlator_mops mops = {