diff --git a/lib/bitlk/bitlk.c b/lib/bitlk/bitlk.c index aa8fa0ce..a21283c2 100644 --- a/lib/bitlk/bitlk.c +++ b/lib/bitlk/bitlk.c @@ -1003,7 +1003,7 @@ int BITLK_activate(struct crypt_device *cd, } r = device_block_adjust(cd, crypt_data_device(cd), DEV_EXCL, - crypt_get_data_offset(cd), &dmd.size, &dmd.flags); + 0, &dmd.size, &dmd.flags); if (r) { crypt_free_volume_key(open_fvek_key); return r; diff --git a/lib/setup.c b/lib/setup.c index 018b62a4..7aaf5de0 100644 --- a/lib/setup.c +++ b/lib/setup.c @@ -5266,6 +5266,9 @@ uint64_t crypt_get_data_offset(struct crypt_device *cd) if (isTCRYPT(cd->type)) return TCRYPT_get_data_offset(cd, &cd->u.tcrypt.hdr, &cd->u.tcrypt.params); + if (isBITLK(cd->type)) + return cd->u.bitlk.params.volume_header_size / SECTOR_SIZE; + return cd->data_offset; }