[vhffs-dev] [945] add monitoring of quota values

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 945
Author:   gradator
Date:     2007-09-21 17:02:20 +0000 (Fri, 21 Sep 2007)

Log Message:
-----------
add monitoring of quota values

Modified Paths:
--------------
    trunk/vhffs-fs/vhffsfs.c


Modified: trunk/vhffs-fs/vhffsfs.c
===================================================================
--- trunk/vhffs-fs/vhffsfs.c	2007-09-21 16:55:15 UTC (rev 944)
+++ trunk/vhffs-fs/vhffsfs.c	2007-09-21 17:02:20 UTC (rev 945)
@@ -788,7 +788,8 @@
 		return vcq->dq;
 	}
 #ifdef WITH_CHECKQUOTA_CACHE_DEBUG
-	printf("QUOTACACHE: ADDING: %s [ %d , %s ]\n", key, gid, path);
+	fprintf(stdout, "QUOTACACHE: ADDING: %s [ %d , %s ]\n", key, gid, path);
+	fprintf(stdout, "QUOTACACHE: VALUES:  blocks hard: %lld  soft: %lld  cur: %lld   files hard: %lld  soft: %lld  cur: %lld\n", dq->dqb_bhardlimit, dq->dqb_bsoftlimit, dq->dqb_curspace, dq->dqb_ihardlimit, dq->dqb_isoftlimit, dq->dqb_curinodes);
 #endif
 	vcq = malloc(sizeof(vhffsfs_cache_quota));
 	vcq->gid = gid;
@@ -839,6 +840,7 @@
 		// cache hit
 #ifdef WITH_CHECKQUOTA_CACHE_DEBUG
 		fprintf(stdout, "QUOTACACHE: HIT: %s\n", key);
+		fprintf(stdout, "QUOTACACHE: VALUES:  blocks hard: %lld  soft: %lld  cur: %lld   files hard: %lld  soft: %lld  cur: %lld\n", vcq->dq->dqb_bhardlimit, vcq->dq->dqb_bsoftlimit, vcq->dq->dqb_curspace, vcq->dq->dqb_ihardlimit, vcq->dq->dqb_isoftlimit, vcq->dq->dqb_curinodes);
 #endif
 		vcq->ref++;
 		vhffsfs_checkquota_cache_unlock();


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/