repart: Do online encryption when loop devices are available
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 5 Jun 2023 11:15:04 +0000 (13:15 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 6 Jun 2023 13:04:17 +0000 (15:04 +0200)
commita09ae91538218db6ae17d719ec5f53c7d453b17d
treea5a5ff8f2927b58f92ff9ff2c69f66eb447e9652
parent6aea5ce814c0723474e0741df45dbf2c202ba739
repart: Do online encryption when loop devices are available

Online encryption is much faster then offline encryption when using
cryptsetup. To take advantage of this, when loop devices are available,
let's use online encryption instead off offline encryption to encrypt
partitions.

The online encryption logic is the same logic as was removed in
48a09a8fff480aab9a68e95e95cc37f6b1438751, except that it's now
integrated with PartitionTarget to ensure that logic outside of
partition_target_encrypt() has to minimally change regardless of
whether we're doing online or offline encryption.
src/partition/repart.c