[dm-crypt] an official way to know if the underlying device is gone for all supported volume formats

Milan Broz gmazyland at gmail.com
Tue Mar 19 07:22:27 CET 2013


On 19.3.2013 3:24, .. ink .. wrote:
> and what about truecrypt volume? The point is that when the
> underlying device is gone,the API becomes contradicting and
> unpredictable as it start to exhibit undocumented behaviors.

No, crypt_get_type() should return NULL in this case ("unknown").
This is documented value.

...
> There is another API i do not remember at the moment than return
> undocumented NULL in this situation.

For unknown type the query operations are not defined (resp. you get NULL)
because itnerenaly it is is nor (yet) recognised.

But yes, it should be probably unified and documented better (NULL
seems to missing in doc in some query commands).
(In fact, underlying device cannot disapper if in use - there is still
(in kernel) some reference used in maping table but userspace behaves
diferently seems.)

Milan



More information about the dm-crypt mailing list