[Pvfs2-cvs] commit by bligon in pvfs2/src/io/trove/trove-dbpf: dbpf-open-cache.c

CVS commit program cvs at parl.clemson.edu
Wed Mar 9 13:17:01 EST 2011


Update of /projects/cvsroot/pvfs2/src/io/trove/trove-dbpf
In directory parlweb1:/tmp/cvs-serv6360

Modified Files:
      Tag: Orange-Branch
	dbpf-open-cache.c 
Log Message:
Modified gossip_err statements to limit the amount of output, while debugging the open_cache_remove
problem.


Index: dbpf-open-cache.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/trove/trove-dbpf/dbpf-open-cache.c,v
diff -p -u -r1.27.10.6 -r1.27.10.7
--- dbpf-open-cache.c	1 Mar 2011 22:19:25 -0000	1.27.10.6
+++ dbpf-open-cache.c	9 Mar 2011 18:17:01 -0000	1.27.10.7
@@ -256,10 +256,13 @@ int dbpf_open_cache_get(
 	found = 1;
 	gossip_debug(GOSSIP_DBPF_OPEN_CACHE_DEBUG,
 	    "dbpf_open_cache_get: resetting entry from free list.\n");
-        gossip_err("DBPF_OPEN_CACHE_GET:  pulled FIRST entry from the free-list with the "
-                      "remove flag set to %d. handle:%llu\n",tmp_entry->remove_flag,llu(handle));
-        gossip_err("\t\t\tSetting remove-flag to zero.\n");
-        tmp_entry->remove_flag=0;
+        if (tmp_entry->remove_flag)
+        {
+           gossip_err("DBPF_OPEN_CACHE_GET:  pulled FIRST entry from the free-list with the "
+                      "remove flag turned on.\n");
+           gossip_err("\t\t\tSetting remove-flag to zero.\n");
+           tmp_entry->remove_flag=0;
+        }
     }
 
     /* anything in unused list (still open, but ref_ct == 0)? */
@@ -273,10 +276,13 @@ int dbpf_open_cache_get(
 	gossip_debug(GOSSIP_DBPF_OPEN_CACHE_DEBUG,
 	    "dbpf_open_cache_get: resetting entry from unused list.\n");
 
-        gossip_err("DBPF_OPEN_CACHE_GET:  pulled FIRST entry from the UNused-list with the "
-                      "remove flag set to %d. handle:%llu\n",tmp_entry->remove_flag,llu(handle));
-        gossip_err("\t\t\tSetting remove-flag to zero.\n");
-        tmp_entry->remove_flag=0;
+        if (tmp_entry->remove_flag)
+        {
+           gossip_err("DBPF_OPEN_CACHE_GET:  pulled FIRST entry from the UNused-list with the "
+                      "remove flag turned on.\n");
+           gossip_err("\t\t\tSetting remove-flag to zero.\n");
+           tmp_entry->remove_flag=0;
+        }
 	if (tmp_entry->fd > -1)
 	{
             close_fd(tmp_entry->fd, tmp_entry->type);
@@ -309,8 +315,6 @@ int dbpf_open_cache_get(
 	out_ref->internal = tmp_entry;
 	gossip_debug(GOSSIP_DBPF_OPEN_CACHE_DEBUG,
 	    "dbpf_open_cache_get: moving to used list.\n");
-        gossip_err("DBPF_OPEN_CACHE_GET: putting entry on the USED list.\n");
-        gossip_err("/t/thandle:%llu  /tremove-flag:%d\n",llu(tmp_entry->handle),tmp_entry->remove_flag);
 	qlist_add(&tmp_entry->queue_link, &used_list);
 	gen_mutex_unlock(&cache_mutex);
 	return 0;
@@ -360,9 +364,6 @@ void dbpf_open_cache_put(
 	gossip_debug(GOSSIP_DBPF_OPEN_CACHE_DEBUG,
 	    "dbpf_open_cache_put: cached entry.\n");
 
-        gossip_err("DBPF_OPEN_CACHE_PUT: decremented ref_ct to %d for handle:%llu\n",tmp_entry->ref_ct
-                                                                                    ,llu(tmp_entry->handle));
-
 	if(tmp_entry->ref_ct == 0)
 	{
 	    /* put this in unused list since ref ct hit zero */
@@ -374,7 +375,6 @@ void dbpf_open_cache_put(
 	{
 	    gossip_debug(GOSSIP_DBPF_OPEN_CACHE_DEBUG,
 		"dbpf_open_cache_put: move to unused list.\n");
-            gossip_err("DBPF_OPEN_CACHE_PUT: moving handle:%llu to the UNused list.\n",llu(tmp_entry->handle));
 	    qlist_add_tail(&tmp_entry->queue_link, &unused_list);
 	}
     }
@@ -424,8 +424,8 @@ int dbpf_open_cache_remove(
 	if ((tmp_entry->handle == handle) &&
             (tmp_entry->coll_id == coll_id))
 	{
-            gossip_err("DBPF_OPEN_CACHE_REMOVE:  BINGO! Entry found in the used_list when trying to "
-                        "remove from the unused_list.\n");
+            gossip_err("DBPF_OPEN_CACHE_REMOVE:  BINGO! Entry found in the USED_list when trying to "
+                        "remove from the UNused_list.\n");
             gossip_err("\t\tused_list entry:\n");
             gossip_err("\t\t\t     handle:%llu\n",llu(tmp_entry->handle));
             gossip_err("\t\t\t     ref-ct:%d \tfd:%d\n",tmp_entry->ref_ct,tmp_entry->fd);
@@ -485,9 +485,11 @@ int dbpf_open_cache_remove(
     {
 	gossip_debug(GOSSIP_DBPF_OPEN_CACHE_DEBUG,
 	    "dbpf_open_cache_remove: unused entry.\n");
-        gossip_err("DBPF_OPEN_CACHE_REMOVE: handle:%llu found in the UNused list with"
-                   " remove-flag:%d.\n",llu(tmp_entry->handle),tmp_entry->remove_flag);
-        gossip_err("\t\tSetting remove-flag to zero.\n");
+        if (tmp_entry->remove_flag)
+        {
+           gossip_err("DBPF_OPEN_CACHE_REMOVE: handle:%llu found in the UNused list with"
+                      " remove-flag turned on\n",llu(tmp_entry->handle));
+        }
         tmp_entry->remove_flag = 0;
 	if (tmp_entry->fd > -1)
 	{



More information about the Pvfs2-cvs mailing list