@@ -33,8 +33,8 @@ use crate::{
33
33
writing:: wipe_sectors,
34
34
} ,
35
35
types:: {
36
- ActionAvailability , BlockDevTier , DevUuid , EncryptionInfo , IntegrityTagSpec ,
37
- KeyDescription , PoolUuid , SizedKeyMemory , UnlockMethod ,
36
+ ActionAvailability , BlockDevTier , DevUuid , EncryptionInfo , KeyDescription , PoolUuid ,
37
+ SizedKeyMemory , UnlockMethod , ValidatedIntegritySpec ,
38
38
} ,
39
39
} ,
40
40
stratis:: { StratisError , StratisResult } ,
@@ -437,13 +437,11 @@ impl Backstore {
437
437
devices : UnownedDevices ,
438
438
mda_data_size : MDADataSize ,
439
439
encryption_info : Option < & EncryptionInfo > ,
440
- integrity_journal_size : Option < Sectors > ,
441
- integrity_tag_spec : Option < IntegrityTagSpec > ,
440
+ integrity_spec : ValidatedIntegritySpec ,
442
441
) -> StratisResult < Backstore > {
443
442
let data_tier = DataTier :: < StratBlockDev > :: new (
444
443
BlockDevMgr :: < StratBlockDev > :: initialize ( pool_uuid, devices, mda_data_size) ?,
445
- integrity_journal_size,
446
- integrity_tag_spec,
444
+ integrity_spec,
447
445
) ;
448
446
449
447
let mut backstore = Backstore {
@@ -1172,13 +1170,16 @@ mod tests {
1172
1170
1173
1171
use devicemapper:: { CacheDevStatus , DataBlocks , DmOptions , IEC } ;
1174
1172
1175
- use crate :: engine:: strat_engine:: {
1176
- backstore:: devices:: { ProcessedPathInfos , UnownedDevices } ,
1177
- cmd,
1178
- crypt:: crypt_metadata_size,
1179
- metadata:: device_identifiers,
1180
- ns:: { unshare_mount_namespace, MemoryFilesystem } ,
1181
- tests:: { crypt, loopbacked, real} ,
1173
+ use crate :: engine:: {
1174
+ strat_engine:: {
1175
+ backstore:: devices:: { ProcessedPathInfos , UnownedDevices } ,
1176
+ cmd,
1177
+ crypt:: crypt_metadata_size,
1178
+ metadata:: device_identifiers,
1179
+ ns:: { unshare_mount_namespace, MemoryFilesystem } ,
1180
+ tests:: { crypt, loopbacked, real} ,
1181
+ } ,
1182
+ types:: ValidatedIntegritySpec ,
1182
1183
} ;
1183
1184
1184
1185
use super :: * ;
@@ -1255,8 +1256,7 @@ mod tests {
1255
1256
initdatadevs,
1256
1257
MDADataSize :: default ( ) ,
1257
1258
None ,
1258
- None ,
1259
- None ,
1259
+ ValidatedIntegritySpec :: default ( ) ,
1260
1260
)
1261
1261
. unwrap ( ) ;
1262
1262
@@ -1354,8 +1354,7 @@ mod tests {
1354
1354
devices1,
1355
1355
MDADataSize :: default ( ) ,
1356
1356
None ,
1357
- None ,
1358
- None ,
1357
+ ValidatedIntegritySpec :: default ( ) ,
1359
1358
)
1360
1359
. unwrap ( ) ;
1361
1360
@@ -1420,8 +1419,7 @@ mod tests {
1420
1419
"tang" . to_string ( ) ,
1421
1420
json ! ( { "url" : env:: var( "TANG_URL" ) . expect( "TANG_URL env var required" ) , "stratis:tang:trust_url" : true } ) ,
1422
1421
) ) ) ,
1423
- None ,
1424
- None ,
1422
+ ValidatedIntegritySpec :: default ( ) ,
1425
1423
)
1426
1424
. unwrap ( ) ;
1427
1425
backstore. alloc ( pool_uuid, & [ Sectors ( 512 ) ] ) . unwrap ( ) ;
@@ -1496,8 +1494,7 @@ mod tests {
1496
1494
json ! ( { "url" : env:: var( "TANG_URL" ) . expect( "TANG_URL env var required" ) , "stratis:tang:trust_url" : true } ) ,
1497
1495
) ,
1498
1496
) ) ,
1499
- None ,
1500
- None ,
1497
+ ValidatedIntegritySpec :: default ( ) ,
1501
1498
) . unwrap ( ) ;
1502
1499
cmd:: udev_settle ( ) . unwrap ( ) ;
1503
1500
0 commit comments