[sheepdog] [PATCH] farm: add two more debug info

Liu Yuan namei.unix at gmail.com
Wed Jun 13 05:05:54 CEST 2012


From: Liu Yuan <tailai.ly at taobao.com>

We still meet the problem and seems that the last patch overlook these
two places.

Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
---
 sheep/farm/trunk.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/sheep/farm/trunk.c b/sheep/farm/trunk.c
index c9d11f2..b45427d 100644
--- a/sheep/farm/trunk.c
+++ b/sheep/farm/trunk.c
@@ -142,10 +142,12 @@ static int fill_entry_new_sha1(struct trunk_entry_incore *entry)
 	strbuf_reset(&buf);
 
 	if (fd < 0) {
+		dprintf("%m\n");
 		ret = -1;
 		goto out;
 	}
 	if (!strbuf_read(&buf, fd, SD_DATA_OBJ_SIZE) == SD_DATA_OBJ_SIZE) {
+		dprintf("strbuf_read fail to read full\n");
 		ret = -1;
 		goto out_close;
 	}
-- 
1.7.10.2




More information about the sheepdog mailing list