File tree 5 files changed +16
-0
lines changed
5 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -400,6 +400,7 @@ impl From<&dyn PoolOps> for Pool {
400
400
page_size : value. page_size ( ) ,
401
401
disk_capacity : value. disk_capacity ( ) ,
402
402
md_info : value. md_props ( ) . map ( |md| md. into ( ) ) ,
403
+ encrypted : Some ( value. encrypted ( ) ) ,
403
404
}
404
405
}
405
406
}
Original file line number Diff line number Diff line change @@ -321,6 +321,10 @@ impl IPoolProps for VolumeGroup {
321
321
fn md_props ( & self ) -> Option < PoolMetadataInfo > {
322
322
None
323
323
}
324
+
325
+ fn encrypted ( & self ) -> bool {
326
+ false
327
+ }
324
328
}
325
329
326
330
/// A factory instance which implements LVM specific `PoolFactory`.
Original file line number Diff line number Diff line change @@ -178,6 +178,12 @@ impl Lvs {
178
178
Bdev :: checked_from_ptr ( p) . unwrap ( )
179
179
}
180
180
181
+ /// Is the Lvs/pool encrypted.
182
+ pub fn encrypted ( & self ) -> bool {
183
+ let b = self . base_bdev ( ) ;
184
+ b. driver ( ) == "crypto"
185
+ }
186
+
181
187
/// Returns blobstore cluster size.
182
188
pub fn blob_cluster_size ( & self ) -> u64 {
183
189
let blobs = self . blob_store ( ) ;
Original file line number Diff line number Diff line change @@ -220,6 +220,10 @@ impl IPoolProps for Lvs {
220
220
md_used_pages : self . md_used_pages ( ) ,
221
221
} )
222
222
}
223
+
224
+ fn encrypted ( & self ) -> bool {
225
+ self . encrypted ( )
226
+ }
223
227
}
224
228
225
229
/// A factory instance which implements LVS specific `PoolFactory`.
Original file line number Diff line number Diff line change @@ -222,6 +222,7 @@ pub trait IPoolProps {
222
222
fn used ( & self ) -> u64 ;
223
223
fn committed ( & self ) -> u64 ;
224
224
fn md_props ( & self ) -> Option < PoolMetadataInfo > ;
225
+ fn encrypted ( & self ) -> bool ;
225
226
}
226
227
227
228
/// A pool factory helper.
You can’t perform that action at this time.
0 commit comments