[sheepdog] [PATCH v2] make recovery not to retry when recover_object_from_replica() fail

Christoph Hellwig hch at infradead.org
Tue May 29 06:50:32 CEST 2012


Looks good, but the error handling in recover_object_from_replica
could be further simplified.  Given that the caller already checks
the return value I'd say simply return rsp->result instead of special
casing SD_RES_OLD_NODE_VER inside recover_object_from_replica.

that'd give you a much more regular tail of the function ala:

done:
	dprintf("recovered oid %"PRIx64" from %d to epoch %d\n", oid,
		tgt_epoch, epoch);
	objlist_cache_insert(oid);
	ret = 0;
out:
	free(buf);
	return ret;

too.




More information about the sheepdog mailing list