summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/iobuf.c
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2012-03-10 19:59:07 +0530
committerVijay Bellur <vijay@gluster.com>2012-03-12 05:32:06 -0700
commit58776c0800ab146b1dd9a8461a98ca719afff6ef (patch)
tree25a773f8a6fb0c73b638a79e1b481de227c08ad0 /libglusterfs/src/iobuf.c
parent08cc17a5528d0194bdb835e05e3950d5516274c3 (diff)
iobuf: add a counter to keep track of request misses
requests can be denied if the size of the request is higher than the available sizes. Change-Id: Id1bf2a56de799ccb94f3791899f2e33f68cd1e2b Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 802047 Reviewed-on: http://review.gluster.com/2913 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'libglusterfs/src/iobuf.c')
-rw-r--r--libglusterfs/src/iobuf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libglusterfs/src/iobuf.c b/libglusterfs/src/iobuf.c
index 93bc7732e57..e1cf334ba01 100644
--- a/libglusterfs/src/iobuf.c
+++ b/libglusterfs/src/iobuf.c
@@ -524,6 +524,7 @@ iobuf_get2 (struct iobuf_pool *iobuf_pool, size_t page_size)
gf_log ("iobuf", GF_LOG_ERROR, "page_size (%zu) of "
"iobufs in arena being requested is greater than max "
"available", page_size);
+ iobuf_pool->request_misses++;
return NULL;
}
@@ -967,6 +968,8 @@ iobuf_stats_dump (struct iobuf_pool *iobuf_pool)
iobuf_pool->arena_size);
gf_proc_dump_write("iobuf_pool.arena_cnt", "%d",
iobuf_pool->arena_cnt);
+ gf_proc_dump_write("iobuf_pool.request_misses", "%"PRId64,
+ iobuf_pool->request_misses);
for (j = 0; j < IOBUF_ARENA_MAX_INDEX; j++) {
list_for_each_entry (trav, &iobuf_pool->arenas[j], list) {