[Sheepdog] [PATCH] fix a bug in get_store_dir() which gives a bad directory for simple store
Li Wenpeng
levin108 at gmail.com
Tue May 1 15:26:22 CEST 2012
From: levin li <xingke.lwp at taobao.com>
For simple store, it gives a directory for the object
such as
/home/levin/disk/store/2/obj/00000001007c2b2500000002
but in fact it should be
/home/levin/disk/store/2/obj/00000001/007c2b2500000002
This bug may cause sheep fail to remove data objects
Signed-off-by: levin li <xingke.lwp at taobao.com>
---
sheep/ops.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sheep/ops.c b/sheep/ops.c
index 8d1ac03..27351af 100644
--- a/sheep/ops.c
+++ b/sheep/ops.c
@@ -68,7 +68,7 @@ struct flush_work {
static void get_store_dir(struct strbuf *buf, int epoch)
{
if (!strcmp(sd_store->name, "simple"))
- strbuf_addf(buf, "%s%08u", obj_path, epoch);
+ strbuf_addf(buf, "%s%08u/", obj_path, epoch);
else /* XXX assume other store doesn't need epoch/obj pattern */
strbuf_addf(buf, "%s", obj_path);
}
--
1.7.10
More information about the sheepdog
mailing list