[sheepdog] [PATCH] cache: add more debug info to push_cache_object()

Liu Yuan namei.unix at gmail.com
Thu Jul 18 07:15:43 CEST 2013


Signed-off-by: Liu Yuan <namei.unix at gmail.com>
---
 sheep/object_cache.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sheep/object_cache.c b/sheep/object_cache.c
index 1212dc2..7ce4806 100644
--- a/sheep/object_cache.c
+++ b/sheep/object_cache.c
@@ -513,7 +513,8 @@ static int push_cache_object(uint32_t vid, uint32_t idx, uint64_t bmap,
 
 	ret = exec_local_req(&hdr, buf);
 	if (ret != SD_RES_SUCCESS)
-		sd_eprintf("failed to push object %s", sd_strerror(ret));
+		sd_eprintf("failed to push object %"PRIx64", %s",
+			   oid, sd_strerror(ret));
 out:
 	free(buf);
 	return ret;
@@ -1058,8 +1059,6 @@ static int object_cache_flush_and_delete(struct object_cache *oc)
 			continue;
 		if (push_cache_object(vid, idx, all, true) !=
 		    SD_RES_SUCCESS) {
-			sd_dprintf("failed to push %"PRIx64,
-				   idx_to_oid(vid, idx));
 			ret = -1;
 			goto out_close_dir;
 		}
-- 
1.7.9.5




More information about the sheepdog mailing list