[sheepdog] [PATCH] sheep: recovery needs to update the objlist cache

Christoph Hellwig hch at infradead.org
Fri May 25 16:41:47 CEST 2012


recover_object_from_replica can write objects to disk without going
through store_create_and_write_obj, and thus currently fails to update
the object list cache.  This can lead to incorrect GET_OBJ_LIST output
and thus missing replicas for objects that need to be recovered again
after they moved onto a new node.

Signed-off-by: Christoph Hellwig <hch at lst.de>

diff --git a/sheep/recovery.c b/sheep/recovery.c
index 72a9797..5cd00aa 100644
--- a/sheep/recovery.c
+++ b/sheep/recovery.c
@@ -174,6 +174,8 @@ static int recover_object_from_replica(uint64_t oid,
 done:
 	dprintf("recovered oid %"PRIx64" from %d to epoch %d\n", oid, tgt_epoch, epoch);
 out:
+	if (ret == SD_RES_SUCCESS)
+		check_and_insert_objlist_cache(oid);
 	free(buf);
 	return ret;
 }



More information about the sheepdog mailing list