Skip to content

Commit 88d48c0

Browse files
committed
chore: expose diskpool encryption feature for Mayastor
Signed-off-by: Diwakar Sharma <diwakar.sharma@datacore.com>
1 parent daa1ab2 commit 88d48c0

File tree

5 files changed

+13
-1
lines changed

5 files changed

+13
-1
lines changed

io-engine/src/bin/io-engine.rs

+7
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,13 @@ fn start_tokio_runtime(args: &MayastorCliArgs) {
9797
warn!("RDMA is requested to be enabled for Mayastor NVMEoF target");
9898
}
9999

100+
// Use as-is basis for diskpool encryption since the spdk build is enabled
101+
// --with-crypto.
102+
// TODO: Once dpdk crypto modules are supported, we'll provide a switch
103+
// later on to control the behaviour of choosing to use accel_sw based
104+
// encryption if dpdk module(fips) isn't usable on platform.
105+
env::set_var("ENABLE_DISKPOOL_ENCRYPTION", "true");
106+
100107
unsafe {
101108
spdk_rs::libspdk::spdk_blob_enable_cluster_unmap(args.bs_cluster_unmap);
102109
}

io-engine/src/core/env.rs

+2
Original file line numberDiff line numberDiff line change
@@ -270,11 +270,13 @@ impl MayastorFeatures {
270270
let lvm = env::var("ENABLE_LVM").as_deref() == Ok("true");
271271
let snapshot_rebuild = env::var("ENABLE_SNAPSHOT_REBUILD").as_deref() == Ok("true");
272272
let rdma_capable_io_engine = env::var("ENABLE_RDMA").as_deref() == Ok("true");
273+
let diskpool_encryption = env::var("ENABLE_DISKPOOL_ENCRYPTION").as_deref() == Ok("true");
273274
MayastorFeatures {
274275
asymmetric_namespace_access: ana,
275276
logical_volume_manager: lvm,
276277
snapshot_rebuild,
277278
rdma_capable_io_engine,
279+
diskpool_encryption,
278280
}
279281
}
280282
/// Get all the supported and enabled features.

io-engine/src/core/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,8 @@ pub struct MayastorFeatures {
394394
pub snapshot_rebuild: bool,
395395
/// When set to true, the io-engine instance supports RDMA transport.
396396
pub rdma_capable_io_engine: bool,
397+
/// Diskpool encryption capability.
398+
pub diskpool_encryption: bool,
397399
}
398400
impl MayastorFeatures {
399401
/// Check if LVM feature is enabled.

io-engine/src/grpc/v1/host.rs

+1
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ impl From<MayastorFeatures> for host_rpc::MayastorFeatures {
9898
logical_volume_manager: Some(f.logical_volume_manager),
9999
snapshot_rebuild: Some(f.snapshot_rebuild),
100100
rdma_capable_io_engine: Some(f.rdma_capable_io_engine),
101+
diskpool_encryption: Some(f.diskpool_encryption),
101102
}
102103
}
103104
}

0 commit comments

Comments
 (0)