[Devel] [PATCH rh7] md: add support for dm-crypted ploops

Andrey Ryabinin aryabinin at virtuozzo.com
Mon Oct 24 05:18:34 PDT 2016


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 <mpatlasov at virtuozzo.com>

Reviewed-by: Andrey Ryabinin <aryabinin at virtuozzo.com>


More information about the Devel mailing list