diff options
Diffstat (limited to 'xlators/performance')
| -rw-r--r-- | xlators/performance/io-threads/src/io-threads.c | 34 | 
1 files changed, 34 insertions, 0 deletions
diff --git a/xlators/performance/io-threads/src/io-threads.c b/xlators/performance/io-threads/src/io-threads.c index 31581fe24d5..1dc6094d410 100644 --- a/xlators/performance/io-threads/src/io-threads.c +++ b/xlators/performance/io-threads/src/io-threads.c @@ -1496,6 +1496,39 @@ iot_link (call_frame_t *frame, xlator_t *this, loc_t *oldloc, loc_t *newloc)          return 0;  } +int +iot_opendir_cbk (call_frame_t *frame, void *cookie, xlator_t *this, +                        int32_t op_ret, int32_t op_errno, fd_t *fd) +{ +        STACK_UNWIND (frame, op_ret, op_errno, fd); +        return 0; +} + +int +iot_opendir_wrapper (call_frame_t *frame, xlator_t *this, loc_t *loc, fd_t *fd) +{ +        STACK_WIND (frame, iot_opendir_cbk, FIRST_CHILD (this), +                        FIRST_CHILD (this)->fops->opendir, loc, fd); +        return 0; +} + +int +iot_opendir (call_frame_t *frame, xlator_t *this, loc_t *loc, fd_t *fd) +{ +        call_stub_t     *stub  = NULL; + +        stub = fop_opendir_stub (frame, iot_opendir_wrapper, loc, fd); +        if (!stub) { +                gf_log (this->name, GF_LOG_ERROR, "cannot get opendir stub"); +                STACK_UNWIND (frame, -1, ENOMEM, NULL); +                return 0; +        } + +        iot_schedule_unordered ((iot_conf_t *)this->private, loc->inode, stub); + +        return 0; +} +  /* Must be called with worker lock held */  void  _iot_queue (iot_worker_t *worker, @@ -2018,6 +2051,7 @@ struct xlator_fops fops = {          .symlink     = iot_symlink,     /* U */          .rename      = iot_rename,      /* U */          .link        = iot_link,        /* U */ +        .opendir     = iot_opendir,     /* U */  };  struct xlator_mops mops = {  | 
