summaryrefslogtreecommitdiffstats
path: root/xlators/performance/io-threads/src
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/performance/io-threads/src')
-rw-r--r--xlators/performance/io-threads/src/io-threads.c58
1 files changed, 11 insertions, 47 deletions
diff --git a/xlators/performance/io-threads/src/io-threads.c b/xlators/performance/io-threads/src/io-threads.c
index 501e4019e90..fa067cc4d6a 100644
--- a/xlators/performance/io-threads/src/io-threads.c
+++ b/xlators/performance/io-threads/src/io-threads.c
@@ -126,7 +126,6 @@ __iot_dequeue (iot_conf_t *conf, int *pri)
return stub;
}
-
void
__iot_enqueue (iot_conf_t *conf, call_stub_t *stub, int pri)
{
@@ -157,7 +156,6 @@ __iot_enqueue (iot_conf_t *conf, call_stub_t *stub, int pri)
conf->queue_sizes[pri]++;
}
-
void *
iot_worker (void *data)
{
@@ -232,7 +230,6 @@ iot_worker (void *data)
return NULL;
}
-
int
do_iot_schedule (iot_conf_t *conf, call_stub_t *stub, int pri)
{
@@ -374,7 +371,6 @@ iot_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)
return 0;
}
-
int
iot_setattr (call_frame_t *frame, xlator_t *this, loc_t *loc,
struct iatt *stbuf, int32_t valid, dict_t *xdata)
@@ -383,7 +379,6 @@ iot_setattr (call_frame_t *frame, xlator_t *this, loc_t *loc,
return 0;
}
-
int
iot_fsetattr (call_frame_t *frame, xlator_t *this, fd_t *fd,
struct iatt *stbuf, int32_t valid, dict_t *xdata)
@@ -392,7 +387,6 @@ iot_fsetattr (call_frame_t *frame, xlator_t *this, fd_t *fd,
return 0;
}
-
int
iot_access (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t mask,
dict_t *xdata)
@@ -401,7 +395,6 @@ iot_access (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t mask,
return 0;
}
-
int
iot_readlink (call_frame_t *frame, xlator_t *this, loc_t *loc, size_t size, dict_t *xdata)
{
@@ -409,7 +402,6 @@ iot_readlink (call_frame_t *frame, xlator_t *this, loc_t *loc, size_t size, dict
return 0;
}
-
int
iot_mknod (call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode,
dev_t rdev, mode_t umask, dict_t *xdata)
@@ -418,7 +410,6 @@ iot_mknod (call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode,
return 0;
}
-
int
iot_mkdir (call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode,
mode_t umask, dict_t *xdata)
@@ -427,7 +418,6 @@ iot_mkdir (call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode,
return 0;
}
-
int
iot_rmdir (call_frame_t *frame, xlator_t *this, loc_t *loc, int flags, dict_t *xdata)
{
@@ -435,7 +425,6 @@ iot_rmdir (call_frame_t *frame, xlator_t *this, loc_t *loc, int flags, dict_t *x
return 0;
}
-
int
iot_symlink (call_frame_t *frame, xlator_t *this, const char *linkname,
loc_t *loc, mode_t umask, dict_t *xdata)
@@ -444,7 +433,6 @@ iot_symlink (call_frame_t *frame, xlator_t *this, const char *linkname,
return 0;
}
-
int
iot_rename (call_frame_t *frame, xlator_t *this, loc_t *oldloc, loc_t *newloc,
dict_t *xdata)
@@ -453,7 +441,6 @@ iot_rename (call_frame_t *frame, xlator_t *this, loc_t *oldloc, loc_t *newloc,
return 0;
}
-
int
iot_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
fd_t *fd, dict_t *xdata)
@@ -462,7 +449,6 @@ iot_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
return 0;
}
-
int
iot_create (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
mode_t mode, mode_t umask, fd_t *fd, dict_t *xdata)
@@ -482,7 +468,6 @@ iot_put (call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode,
return 0;
}
-
int
iot_readv (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
off_t offset, uint32_t flags, dict_t *xdata)
@@ -491,7 +476,6 @@ iot_readv (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
return 0;
}
-
int
iot_flush (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
{
@@ -499,7 +483,6 @@ iot_flush (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
return 0;
}
-
int
iot_fsync (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t datasync,
dict_t *xdata)
@@ -508,7 +491,6 @@ iot_fsync (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t datasync,
return 0;
}
-
int
iot_writev (call_frame_t *frame, xlator_t *this, fd_t *fd,
struct iovec *vector, int32_t count, off_t offset,
@@ -519,7 +501,6 @@ iot_writev (call_frame_t *frame, xlator_t *this, fd_t *fd,
return 0;
}
-
int
iot_lk (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t cmd,
struct gf_flock *flock, dict_t *xdata)
@@ -528,7 +509,6 @@ iot_lk (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t cmd,
return 0;
}
-
int
iot_stat (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)
{
@@ -536,7 +516,6 @@ iot_stat (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)
return 0;
}
-
int
iot_fstat (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
{
@@ -544,7 +523,6 @@ iot_fstat (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata)
return 0;
}
-
int
iot_truncate (call_frame_t *frame, xlator_t *this, loc_t *loc, off_t offset,
dict_t *xdata)
@@ -553,7 +531,6 @@ iot_truncate (call_frame_t *frame, xlator_t *this, loc_t *loc, off_t offset,
return 0;
}
-
int
iot_ftruncate (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset,
dict_t *xdata)
@@ -562,8 +539,6 @@ iot_ftruncate (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset,
return 0;
}
-
-
int
iot_unlink (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t xflag,
dict_t *xdata)
@@ -572,7 +547,6 @@ iot_unlink (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t xflag,
return 0;
}
-
int
iot_link (call_frame_t *frame, xlator_t *this, loc_t *oldloc, loc_t *newloc,
dict_t *xdata)
@@ -581,7 +555,6 @@ iot_link (call_frame_t *frame, xlator_t *this, loc_t *oldloc, loc_t *newloc,
return 0;
}
-
int
iot_opendir (call_frame_t *frame, xlator_t *this, loc_t *loc, fd_t *fd,
dict_t *xdata)
@@ -590,7 +563,6 @@ iot_opendir (call_frame_t *frame, xlator_t *this, loc_t *loc, fd_t *fd,
return 0;
}
-
int
iot_fsyncdir (call_frame_t *frame, xlator_t *this, fd_t *fd, int datasync,
dict_t *xdata)
@@ -599,7 +571,6 @@ iot_fsyncdir (call_frame_t *frame, xlator_t *this, fd_t *fd, int datasync,
return 0;
}
-
int
iot_statfs (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)
{
@@ -607,7 +578,6 @@ iot_statfs (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata)
return 0;
}
-
int
iot_setxattr (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *dict,
int32_t flags, dict_t *xdata)
@@ -616,7 +586,6 @@ iot_setxattr (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *dict,
return 0;
}
-
int
iot_getxattr (call_frame_t *frame, xlator_t *this, loc_t *loc,
const char *name, dict_t *xdata)
@@ -624,6 +593,8 @@ iot_getxattr (call_frame_t *frame, xlator_t *this, loc_t *loc,
iot_conf_t *conf = NULL;
dict_t *depths = NULL;
int i = 0;
+ int32_t op_ret = 0;
+ int32_t op_errno = 0;
conf = this->private;
@@ -632,9 +603,12 @@ iot_getxattr (call_frame_t *frame, xlator_t *this, loc_t *loc,
* We explicitly do not want a reference count
* for this dict in this translator
*/
- depths = get_new_dict ();
- if (!depths)
+ depths = dict_new ();
+ if (!depths) {
+ op_ret = -1;
+ op_errno = ENOMEM;
goto unwind_special_getxattr;
+ }
for (i = 0; i < GF_FOP_PRI_MAX; i++) {
if (dict_set_int32 (depths,
@@ -647,7 +621,10 @@ iot_getxattr (call_frame_t *frame, xlator_t *this, loc_t *loc,
}
unwind_special_getxattr:
- STACK_UNWIND_STRICT (getxattr, frame, 0, 0, depths, xdata);
+ STACK_UNWIND_STRICT (getxattr, frame, op_ret, op_errno,
+ depths, xdata);
+ if (depths)
+ dict_unref(depths);
return 0;
}
@@ -655,7 +632,6 @@ unwind_special_getxattr:
return 0;
}
-
int
iot_fgetxattr (call_frame_t *frame, xlator_t *this, fd_t *fd,
const char *name, dict_t *xdata)
@@ -673,7 +649,6 @@ iot_fsetxattr (call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *dict,
return 0;
}
-
int
iot_removexattr (call_frame_t *frame, xlator_t *this, loc_t *loc,
const char *name, dict_t *xdata)
@@ -690,7 +665,6 @@ iot_fremovexattr (call_frame_t *frame, xlator_t *this, fd_t *fd,
return 0;
}
-
int
iot_readdirp (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
off_t offset, dict_t *xdata)
@@ -699,7 +673,6 @@ iot_readdirp (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
return 0;
}
-
int
iot_readdir (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
off_t offset, dict_t *xdata)
@@ -744,7 +717,6 @@ iot_fentrylk (call_frame_t *frame, xlator_t *this,
return 0;
}
-
int
iot_xattrop (call_frame_t *frame, xlator_t *this, loc_t *loc,
gf_xattrop_flags_t optype, dict_t *xattr, dict_t *xdata)
@@ -753,7 +725,6 @@ iot_xattrop (call_frame_t *frame, xlator_t *this, loc_t *loc,
return 0;
}
-
int
iot_fxattrop (call_frame_t *frame, xlator_t *this, fd_t *fd,
gf_xattrop_flags_t optype, dict_t *xattr, dict_t *xdata)
@@ -762,7 +733,6 @@ iot_fxattrop (call_frame_t *frame, xlator_t *this, fd_t *fd,
return 0;
}
-
int32_t
iot_rchecksum (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset,
int32_t len, dict_t *xdata)
@@ -827,7 +797,6 @@ iot_setactivelk (call_frame_t *frame, xlator_t *this, loc_t *loc,
return 0;
}
-
int
__iot_workers_scale (iot_conf_t *conf)
{
@@ -872,7 +841,6 @@ __iot_workers_scale (iot_conf_t *conf)
return diff;
}
-
int
iot_workers_scale (iot_conf_t *conf)
{
@@ -893,7 +861,6 @@ out:
return ret;
}
-
int
set_stack_size (iot_conf_t *conf)
{
@@ -931,7 +898,6 @@ set_stack_size (iot_conf_t *conf)
return err;
}
-
int32_t
mem_acct_init (xlator_t *this)
{
@@ -1022,7 +988,6 @@ out:
return ret;
}
-
int
init (xlator_t *this)
{
@@ -1180,7 +1145,6 @@ iot_client_destroy (xlator_t *this, client_t *client)
return 0;
}
-
struct xlator_dumpops dumpops = {
.priv = iot_priv_dump,
};