summaryrefslogtreecommitdiffstats
path: root/xlators/debug
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2010-03-28 23:53:17 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-03-31 02:22:11 -0700
commit31e69430140538f5fee3e8dc89bd2971917820d1 (patch)
treeada4b36ba616bff17f1a2d2ecba46bc3e09ea27f /xlators/debug
parenta79d50fc723ffa4d93fa8f567676b18591fac5fe (diff)
fop namespace cleanup.
removed 'lock_notify', 'lock_fnotify', 'setdents', 'getdents' from 'fop' list, and removed 'stats' from mop list, as they are no more used in the codebase, and had made code bulky/buggy. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 734 (keep only the working/usable code in build tree to focus more on development) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=734
Diffstat (limited to 'xlators/debug')
-rw-r--r--xlators/debug/error-gen/src/error-gen.c131
-rw-r--r--xlators/debug/io-stats/src/io-stats.c70
-rw-r--r--xlators/debug/trace/src/trace.c99
3 files changed, 0 insertions, 300 deletions
diff --git a/xlators/debug/error-gen/src/error-gen.c b/xlators/debug/error-gen/src/error-gen.c
index 931e9dc96a1..434965b5c1a 100644
--- a/xlators/debug/error-gen/src/error-gen.c
+++ b/xlators/debug/error-gen/src/error-gen.c
@@ -124,9 +124,6 @@ sys_error_t error_no_list[] = {
[ERR_READDIRP] = { .error_no_count = 5,
.error_no = {EINVAL,EACCES,EBADF,
EMFILE,ENOENT}},
- [ERR_GETDENTS] = { .error_no_count = 5,
- .error_no = {EBADF,EFAULT,EINVAL,
- ENOENT,ENOTDIR}},
[ERR_FSYNCDIR] = { .error_no_count = 4,
.error_no = {EBADF,EIO,EROFS,EINVAL}},
[ERR_ACCESS] = { .error_no_count = 8,
@@ -144,9 +141,6 @@ sys_error_t error_no_list[] = {
[ERR_LK] = { .error_no_count = 4,
.error_no = {EACCES,EFAULT,ENOENT,
EINTR}},
- [ERR_SETDENTS] = { .error_no_count = 4,
- .error_no = {EACCES,EBADF,EINTR,
- ENAMETOOLONG}},
[ERR_CHECKSUM] = { .error_no_count = 4,
.error_no = {EACCES,EBADF,
ENAMETOOLONG,EINTR}},
@@ -180,9 +174,6 @@ sys_error_t error_no_list[] = {
ENAMETOOLONG,ENOENT,
ENOMEM,ENOTDIR,EPERM,
EROFS,EBADF,EIO}},
- [ERR_STATS] = { .error_no_count = 4,
- .error_no = {EACCES,EBADF,ENAMETOOLONG,
- EINTR}},
[ERR_GETSPEC] = { .error_no_count = 4,
.error_no = {EACCES,EBADF,ENAMETOOLONG,
EINTR}}
@@ -304,8 +295,6 @@ get_fop_int (char **op_no_str)
return ERR_READDIR;
else if (!strcmp ((*op_no_str), "readdirp"))
return ERR_READDIRP;
- else if (!strcmp ((*op_no_str), "getdents"))
- return ERR_GETDENTS;
else if (!strcmp ((*op_no_str), "fsyncdir"))
return ERR_FSYNCDIR;
else if (!strcmp ((*op_no_str), "access"))
@@ -316,8 +305,6 @@ get_fop_int (char **op_no_str)
return ERR_FSTAT;
else if (!strcmp ((*op_no_str), "lk"))
return ERR_LK;
- else if (!strcmp ((*op_no_str), "setdents"))
- return ERR_SETDENTS;
else if (!strcmp ((*op_no_str), "checksum"))
return ERR_CHECKSUM;
else if (!strcmp ((*op_no_str), "xattrop"))
@@ -336,8 +323,6 @@ get_fop_int (char **op_no_str)
return ERR_SETATTR;
else if (!strcmp ((*op_no_str), "fsetattr"))
return ERR_FSETATTR;
- else if (!strcmp ((*op_no_str), "stats"))
- return ERR_STATS;
else if (!strcmp ((*op_no_str), "getspec"))
return ERR_GETSPEC;
else
@@ -1280,83 +1265,6 @@ error_gen_opendir (call_frame_t *frame, xlator_t *this, loc_t *loc, fd_t *fd)
return 0;
}
-
-int
-error_gen_getdents_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, dir_entry_t *entries,
- int32_t count)
-{
- STACK_UNWIND_STRICT (getdents, frame, op_ret, op_errno, entries,
- count);
- return 0;
-}
-
-
-int
-error_gen_getdents (call_frame_t *frame, xlator_t *this, fd_t *fd,
- size_t size, off_t offset, int32_t flag)
-{
- int op_errno = 0;
- eg_t *egp = NULL;
- int enable = 1;
-
- egp = this->private;
- enable = egp->enable[ERR_GETDENTS];
-
- if (enable)
- op_errno = error_gen (this, ERR_GETDENTS);
-
- if (op_errno) {
- GF_ERROR(this, "unwind(-1, %s)", strerror (op_errno));
- STACK_UNWIND_STRICT (getdents, frame, -1, op_errno, NULL, 0);
- return 0;
- }
-
- STACK_WIND (frame, error_gen_getdents_cbk,
- FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->getdents,
- fd, size, offset, flag);
- return 0;
-}
-
-
-int
-error_gen_setdents_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno)
-{
- STACK_UNWIND_STRICT (setdents, frame, op_ret, op_errno);
- return 0;
-}
-
-
-int
-error_gen_setdents (call_frame_t *frame, xlator_t *this, fd_t *fd,
- int32_t flags, dir_entry_t *entries, int32_t count)
-{
- int op_errno = 0;
- eg_t *egp = NULL;
- int enable = 1;
-
- egp = this->private;
- enable = egp->enable[ERR_SETDENTS];
-
- if (enable)
- op_errno = error_gen (this, ERR_SETDENTS);
-
- if (op_errno) {
- GF_ERROR(this, "unwind(-1, %s)", strerror (op_errno));
- STACK_UNWIND_STRICT (setdents, frame, -1, op_errno);
- return 0;
- }
-
- STACK_WIND (frame, error_gen_setdents_cbk,
- FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->setdents,
- fd, flags, entries, count);
- return 0;
-}
-
-
int
error_gen_fsyncdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno)
@@ -1815,42 +1723,6 @@ error_gen_fentrylk (call_frame_t *frame, xlator_t *this,
/* Management operations */
-int
-error_gen_stats_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno,
- struct xlator_stats *stats)
-{
- STACK_UNWIND (frame, op_ret, op_errno, stats);
- return 0;
-}
-
-
-int
-error_gen_stats (call_frame_t *frame, xlator_t *this, int32_t flags)
-{
- int op_errno = 0;
- eg_t *egp = NULL;
- int enable = 1;
-
- egp = this->private;
- enable = egp->enable[ERR_STATS];
-
- if (enable)
- op_errno = error_gen (this, ERR_STATS);
-
- if (op_errno) {
- GF_ERROR(this, "unwind(-1, %s)", strerror (op_errno));
- STACK_UNWIND (frame, -1, op_errno, NULL);
- return 0;
- }
-
- STACK_WIND (frame, error_gen_stats_cbk,
- FIRST_CHILD(this),
- FIRST_CHILD(this)->mops->stats,
- flags);
- return 0;
-}
-
int
error_gen_getspec_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
@@ -2154,13 +2026,11 @@ struct xlator_fops fops = {
.opendir = error_gen_opendir,
.readdir = error_gen_readdir,
.readdirp = error_gen_readdirp,
- .getdents = error_gen_getdents,
.fsyncdir = error_gen_fsyncdir,
.access = error_gen_access,
.ftruncate = error_gen_ftruncate,
.fstat = error_gen_fstat,
.lk = error_gen_lk,
- .setdents = error_gen_setdents,
.lookup_cbk = error_gen_lookup_cbk,
.checksum = error_gen_checksum,
.xattrop = error_gen_xattrop,
@@ -2174,7 +2044,6 @@ struct xlator_fops fops = {
};
struct xlator_mops mops = {
- .stats = error_gen_stats,
.getspec = error_gen_getspec,
};
diff --git a/xlators/debug/io-stats/src/io-stats.c b/xlators/debug/io-stats/src/io-stats.c
index eecca0a72b9..fa0c8891e7c 100644
--- a/xlators/debug/io-stats/src/io-stats.c
+++ b/xlators/debug/io-stats/src/io-stats.c
@@ -462,14 +462,6 @@ io_stats_writev_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
-int
-io_stats_getdents_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno,
- dir_entry_t *entries, int32_t count)
-{
- STACK_UNWIND_STRICT (getdents, frame, op_ret, op_errno, entries, count);
- return 0;
-}
int
@@ -731,15 +723,6 @@ io_stats_lk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int
-io_stats_setdents_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno)
-{
- STACK_UNWIND_STRICT (setdents, frame, op_ret, op_errno);
- return 0;
-}
-
-
-int
io_stats_entrylk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno)
{
@@ -1246,21 +1229,6 @@ io_stats_opendir (call_frame_t *frame, xlator_t *this,
return 0;
}
-
-int
-io_stats_getdents (call_frame_t *frame, xlator_t *this,
- fd_t *fd, size_t size, off_t offset, int32_t flag)
-{
- BUMP_FOP (GETDENTS);
-
- STACK_WIND (frame, io_stats_getdents_cbk,
- FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->getdents,
- fd, size, offset, flag);
- return 0;
-}
-
-
int
io_stats_readdirp (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
off_t offset)
@@ -1377,21 +1345,6 @@ io_stats_lk (call_frame_t *frame, xlator_t *this,
int
-io_stats_setdents (call_frame_t *frame, xlator_t *this,
- fd_t *fd, int32_t flags,
- dir_entry_t *entries, int32_t count)
-{
- BUMP_FOP (SETDENTS);
-
- STACK_WIND (frame, io_stats_setdents_cbk,
- FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->setdents,
- fd, flags, entries, count);
- return 0;
-}
-
-
-int
io_stats_checksum_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno,
uint8_t *fchecksum, uint8_t *dchecksum)
@@ -1416,26 +1369,6 @@ io_stats_checksum (call_frame_t *frame, xlator_t *this,
}
-int
-io_stats_stats_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, struct xlator_stats *stats)
-{
- STACK_UNWIND (frame, op_ret, op_errno, stats);
- return 0;
-}
-
-
-int
-io_stats_stats (call_frame_t *frame, xlator_t *this, int32_t flags)
-{
- STACK_WIND (frame, io_stats_stats_cbk,
- FIRST_CHILD(this),
- FIRST_CHILD(this)->mops->stats,
- flags);
-
- return 0;
-}
-
int
io_stats_release (xlator_t *this, fd_t *fd)
@@ -1576,8 +1509,6 @@ struct xlator_fops fops = {
.finodelk = io_stats_finodelk,
.entrylk = io_stats_entrylk,
.lookup = io_stats_lookup,
- .setdents = io_stats_setdents,
- .getdents = io_stats_getdents,
.checksum = io_stats_checksum,
.xattrop = io_stats_xattrop,
.fxattrop = io_stats_fxattrop,
@@ -1586,7 +1517,6 @@ struct xlator_fops fops = {
};
struct xlator_mops mops = {
- .stats = io_stats_stats,
};
struct xlator_cbks cbks = {
diff --git a/xlators/debug/trace/src/trace.c b/xlators/debug/trace/src/trace.c
index a9e580c0e92..5d1d342db88 100644
--- a/xlators/debug/trace/src/trace.c
+++ b/xlators/debug/trace/src/trace.c
@@ -271,21 +271,6 @@ trace_writev_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
-int
-trace_getdents_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, dir_entry_t *entries,
- int32_t count)
-{
- if (trace_fop_names[GF_FOP_GETDENTS].enabled) {
- gf_log (this->name, GF_LOG_NORMAL,
- "%"PRId64": (op_ret=%d, op_errno=%d, count=%d)",
- frame->root->unique, op_ret, op_errno, count);
- }
-
- STACK_UNWIND_STRICT (getdents, frame, op_ret, op_errno, entries, count);
- return 0;
-}
-
int
trace_readdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
@@ -1112,20 +1097,6 @@ trace_lk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
-int
-trace_setdents_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno)
-{
- if (trace_fop_names[GF_FOP_SETDENTS].enabled) {
- gf_log (this->name, GF_LOG_NORMAL,
- "%"PRId64": op_ret=%d, op_errno=%d",
- frame->root->unique, op_ret, op_errno);
- }
-
- STACK_UNWIND_STRICT (setdents, frame, op_ret, op_errno);
- return 0;
-}
-
int
trace_entrylk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
@@ -1801,25 +1772,6 @@ trace_opendir (call_frame_t *frame, xlator_t *this, loc_t *loc, fd_t *fd)
return 0;
}
-
-int
-trace_getdents (call_frame_t *frame, xlator_t *this, fd_t *fd,
- size_t size, off_t offset, int32_t flag)
-{
- if (trace_fop_names[GF_FOP_GETDENTS].enabled) {
- gf_log (this->name, GF_LOG_NORMAL,
- "%"PRId64": (fd=%p, size=%"GF_PRI_SIZET", offset=%"PRId64", flag=0x%x)",
- frame->root->unique, fd, size, offset, flag);
- }
-
- STACK_WIND (frame, trace_getdents_cbk,
- FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->getdents,
- fd, size, offset, flag);
- return 0;
-}
-
-
int
trace_readdirp (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
off_t offset)
@@ -1951,24 +1903,6 @@ trace_lk (call_frame_t *frame, xlator_t *this, fd_t *fd,
int
-trace_setdents (call_frame_t *frame, xlator_t *this, fd_t *fd,
- int32_t flags, dir_entry_t *entries, int32_t count)
-{
- if (trace_fop_names[GF_FOP_SETDENTS].enabled) {
- gf_log (this->name, GF_LOG_NORMAL,
- "%"PRId64": (*fd=%p, flags=%d, count=%d",
- frame->root->unique, fd, flags, count);
- }
-
- STACK_WIND (frame, trace_setdents_cbk,
- FIRST_CHILD(this),
- FIRST_CHILD(this)->fops->setdents,
- fd, flags, entries, count);
- return 0;
-}
-
-
-int
trace_checksum_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno,
uint8_t *fchecksum, uint8_t *dchecksum)
@@ -2000,36 +1934,6 @@ trace_checksum (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flag)
}
-int
-trace_stats_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno,
- struct xlator_stats *stats)
-{
- gf_log (this->name, GF_LOG_NORMAL,
- "%"PRId64": op_ret (%d), op_errno(%d)",
- frame->root->unique, op_ret, op_errno);
-
- STACK_UNWIND (frame, op_ret, op_errno, stats);
- return 0;
-}
-
-
-int
-trace_stats (call_frame_t *frame, xlator_t *this, int32_t flags)
-{
- gf_log (this->name, GF_LOG_NORMAL,
- "%"PRId64": (flags=%d)",
- frame->root->unique, flags);
-
- STACK_WIND (frame, trace_stats_cbk,
- FIRST_CHILD(this),
- FIRST_CHILD(this)->mops->stats,
- flags);
-
- return 0;
-}
-
-
void
enable_all_calls (int enabled)
{
@@ -2185,8 +2089,6 @@ struct xlator_fops fops = {
.finodelk = trace_finodelk,
.entrylk = trace_entrylk,
.lookup = trace_lookup,
- .setdents = trace_setdents,
- .getdents = trace_getdents,
.checksum = trace_checksum,
.xattrop = trace_xattrop,
.fxattrop = trace_fxattrop,
@@ -2195,7 +2097,6 @@ struct xlator_fops fops = {
};
struct xlator_mops mops = {
- .stats = trace_stats,
};
struct xlator_cbks cbks = {