Add CRYPT_ACTIVATE_REFRESH flag to activation calls.

The new flag is supposed to refresh (reload) active dm-crypt
mapping with new set of activation flags. CRYPT_ACTIVATE_READONLY
can not be switched for already active device.

The flag is silently ignored for tcrypt, verity and integrity
devices. LUKS2 with authenticated encryption support is added in
later commit.
This commit is contained in:
Ondrej Kozina
2018-11-15 14:01:37 +01:00
committed by Milan Broz
parent 957b329e94
commit 5c67ca015b
6 changed files with 214 additions and 10 deletions

View File

@@ -1336,6 +1336,9 @@ int dm_reload_device(struct crypt_device *cd, const char *name,
else
return r;
if (!table_params)
return -EINVAL;
r = _dm_reload_device(cd, name, dmd->data_device, dmd->flags, dmd->size,
dmd->target, table_params);