On 10/19/2016 06:41 AM, Maxim Patlasov wrote:
> Previos patch adding support for dm-crypt ploops naively suggested
> that every time we build dm-crypt device, crypt_ctr() is called, and
> vice versa - every time we dismantle it, crypt_dtr() is called. But
> in practice, crypt_ctr/dtr is called more than once because md->map
> is RCU-protected. For example, during resize, new dm target is
> constructed and registetred in md->map, then the former md->map is
> released.
> 
> Only dm-crypt knows how to find underlaying ploop device. That's why
> the patch implements ploop_modify methods of dm-crypt target. And
> only general dm code (dm.c, dm-table.c, dm-ioctl.c and friends) knows
> which instance of dm-target is actual and which is obsoleted. That's
> why the patch orchestrates calling this new method from general code,
> close to __bind/__unbind managing md->map pointer.
> 
> https://jira.sw.ru/browse/PSBM-53386
> 
> Signed-off-by: Maxim Patlasov <mpatla...@virtuozzo.com>

Reviewed-by: Andrey Ryabinin <aryabi...@virtuozzo.com>
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to