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

@@ -1033,6 +1033,8 @@ int crypt_keyslot_destroy(struct crypt_device *cd, int keyslot);
#define CRYPT_ACTIVATE_ALLOW_UNBOUND_KEY (1 << 16)
/** dm-integrity: activate automatic recalculation */
#define CRYPT_ACTIVATE_RECALCULATE (1 << 17)
/** reactivate existing and update flags, input only */
#define CRYPT_ACTIVATE_REFRESH (1 << 18)
/**
* Active device runtime attributes