[sheepdog] [PATCH 1/5] sheep: teach journal file to be md friendly

Liu Yuan namei.unix at gmail.com
Tue Apr 2 11:34:22 CEST 2013


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

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

diff --git a/sheep/journal_file.c b/sheep/journal_file.c
index d37b4d1..4ae0e4b 100644
--- a/sheep/journal_file.c
+++ b/sheep/journal_file.c
@@ -141,7 +141,8 @@ static int replay_journal_entry(struct journal_descriptor *jd)
 
 	if (jd->create)
 		flags |= O_CREAT;
-	snprintf(path, sizeof(path), "%s%016" PRIx64, obj_path, jd->oid);
+	snprintf(path, sizeof(path), "%s/%016" PRIx64, get_object_path(jd->oid),
+		 jd->oid);
 	fd = open(path, flags, def_fmode);
 	if (fd < 0) {
 		sd_eprintf("open %m");
-- 
1.7.9.5




More information about the sheepdog mailing list