summaryrefslogtreecommitdiffstats
path: root/xlators/debug
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2010-05-04 00:37:01 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-05-03 23:40:10 -0700
commit7840d9de272ef2f24c4c755a857ad8ae06703b55 (patch)
tree6d212b7d72f00605b80503508c146b205280208c /xlators/debug
parentf75b76350747f5f58a4bbe704915c74979cc5ac3 (diff)
frame's 'op', 'type' restructured
Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 875 (Implement a new protocol to provide proper backward/forward compatibility) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=875
Diffstat (limited to 'xlators/debug')
-rw-r--r--xlators/debug/error-gen/src/error-gen.c7
-rw-r--r--xlators/debug/io-stats/src/io-stats.c32
-rw-r--r--xlators/debug/trace/src/trace.c2
3 files changed, 8 insertions, 33 deletions
diff --git a/xlators/debug/error-gen/src/error-gen.c b/xlators/debug/error-gen/src/error-gen.c
index 434965b5c1a..3ac2e22d3a5 100644
--- a/xlators/debug/error-gen/src/error-gen.c
+++ b/xlators/debug/error-gen/src/error-gen.c
@@ -1756,7 +1756,7 @@ error_gen_getspec (call_frame_t *frame, xlator_t *this, const char *key,
STACK_WIND (frame, error_gen_getspec_cbk,
FIRST_CHILD(this),
- FIRST_CHILD(this)->mops->getspec,
+ FIRST_CHILD(this)->fops->getspec,
key, flags);
return 0;
}
@@ -2041,10 +2041,7 @@ struct xlator_fops fops = {
.fentrylk = error_gen_fentrylk,
.setattr = error_gen_setattr,
.fsetattr = error_gen_fsetattr,
-};
-
-struct xlator_mops mops = {
- .getspec = error_gen_getspec,
+ .getspec = error_gen_getspec,
};
struct xlator_cbks cbks = {
diff --git a/xlators/debug/io-stats/src/io-stats.c b/xlators/debug/io-stats/src/io-stats.c
index 09ee86751f2..d7024447202 100644
--- a/xlators/debug/io-stats/src/io-stats.c
+++ b/xlators/debug/io-stats/src/io-stats.c
@@ -50,7 +50,6 @@ struct ios_global_stats {
uint64_t block_count_write[32];
uint64_t block_count_read[32];
uint64_t fop_hits[GF_FOP_MAXVALUE];
- uint64_t cbk_hits[GF_CBK_MAXVALUE];
struct timeval started_at;
};
@@ -94,20 +93,6 @@ struct ios_local {
} while (0)
-#define BUMP_CBK(op) \
- do { \
- struct ios_conf *conf = NULL; \
- \
- conf = this->private; \
- LOCK (&conf->lock); \
- { \
- conf->cumulative.cbk_hits[GF_CBK_##op]++; \
- conf->incremental.cbk_hits[GF_CBK_##op]++; \
- } \
- UNLOCK (&conf->lock); \
- } while (0)
-
-
#define BUMP_READ(fd, len) \
do { \
struct ios_conf *conf = NULL; \
@@ -235,10 +220,7 @@ io_stats_dump_global (xlator_t *this, struct ios_global_stats *stats,
ios_log (this, logfp, "%14s : %"PRId64,
gf_fop_list[i], stats->fop_hits[i]);
- for (i = 0; i < GF_CBK_MAXVALUE; i++)
- if (stats->cbk_hits[i])
- ios_log (this, logfp, "%14s : %"PRId64,
- gf_fop_list[i], stats->cbk_hits[i]);
+
return 0;
}
@@ -1376,7 +1358,7 @@ io_stats_release (xlator_t *this, fd_t *fd)
{
struct ios_fd *iosfd = NULL;
- BUMP_CBK (RELEASE);
+ BUMP_FOP (RELEASE);
ios_fd_ctx_get (fd, this, &iosfd);
if (iosfd) {
@@ -1394,16 +1376,16 @@ io_stats_release (xlator_t *this, fd_t *fd)
int
io_stats_releasedir (xlator_t *this, fd_t *fd)
{
- BUMP_CBK (RELEASEDIR);
+ BUMP_FOP (RELEASEDIR);
return 0;
}
int
-io_stats_forget (xlator_t *this, fd_t *fd)
+io_stats_forget (xlator_t *this, inode_t *inode)
{
- BUMP_CBK (FORGET);
+ BUMP_FOP (FORGET);
return 0;
}
@@ -1535,12 +1517,10 @@ struct xlator_fops fops = {
.fsetattr = io_stats_fsetattr,
};
-struct xlator_mops mops = {
-};
-
struct xlator_cbks cbks = {
.release = io_stats_release,
.releasedir = io_stats_releasedir,
+ .forget = io_stats_forget,
};
struct volume_options options[] = {
diff --git a/xlators/debug/trace/src/trace.c b/xlators/debug/trace/src/trace.c
index 7d619aadbc4..aa9d33f3ea2 100644
--- a/xlators/debug/trace/src/trace.c
+++ b/xlators/debug/trace/src/trace.c
@@ -2096,8 +2096,6 @@ struct xlator_fops fops = {
.fsetattr = trace_fsetattr,
};
-struct xlator_mops mops = {
-};
struct xlator_cbks cbks = {
};