On Wed, Jul 31, 2013 at 05:09:52PM +0900, Akira Hayakawa wrote: > What if registering lc_mgr_target failed > after registering lc_target succeeded? > I think we should unregister the lc_target in this case. > Am I wrong? You are correct. I'll make the changes. > Looking for some code samples, > dm-snap.c and dm-thin.c have more than two targets to register > like dm-lc does. > > Below is a code fragment from dm-snap.c . > It treats each failure in registering targets > independently with different labels. > > // dm-snap.c > bad_exception_cache: > exit_origin_hash(); > bad_origin_hash: > dm_unregister_target(&merge_target); > bad_register_merge_target: > dm_unregister_target(&origin_target); > bad_register_origin_target: > dm_unregister_target(&snapshot_target); > bad_register_snapshot_target: > dm_exception_store_exit(); > > return r; Thank you for your feedback and the pointers, I'll resend the patch. !!amit -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel