}
bs->encrypted = 1;
-
- /* Encryption works on a sector granularity */
- bs->request_alignment = BDRV_SECTOR_SIZE;
}
s->l2_bits = s->cluster_bits - 3; /* L2 is always one cluster */
{
BDRVQcow2State *s = bs->opaque;
+ if (bs->encrypted) {
+ /* Encryption works on a sector granularity */
+ bs->bl.request_alignment = BDRV_SECTOR_SIZE;
+ }
bs->bl.pwrite_zeroes_alignment = s->cluster_size;
}