Message ID | 20210201051019.1174983-6-satyat@google.com (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Mike Snitzer |
Headers | show |
Series | add support for inline encryption to device mapper | expand |
On Mon, Feb 01, 2021 at 05:10:19AM +0000, Satya Tangirala wrote: > dm-linear and dm-flakey obviously can pass through inline crypto support. > > Co-developed-by: Eric Biggers <ebiggers@google.com> > Signed-off-by: Eric Biggers <ebiggers@google.com> > Signed-off-by: Satya Tangirala <satyat@google.com> > --- > drivers/md/dm-flakey.c | 4 +++- > drivers/md/dm-linear.c | 5 +++-- > 2 files changed, 6 insertions(+), 3 deletions(-) > > diff --git a/drivers/md/dm-flakey.c b/drivers/md/dm-flakey.c > index a2cc9e45cbba..30c6bc151213 100644 > --- a/drivers/md/dm-flakey.c > +++ b/drivers/md/dm-flakey.c > @@ -482,8 +482,10 @@ static struct target_type flakey_target = { > .name = "flakey", > .version = {1, 5, 0}, > #ifdef CONFIG_BLK_DEV_ZONED > - .features = DM_TARGET_ZONED_HM, > + .features = DM_TARGET_ZONED_HM | DM_TARGET_PASSES_CRYPTO, > .report_zones = flakey_report_zones, > +#else > + .features = DM_TARGET_PASSES_CRYPTO, > #endif > .module = THIS_MODULE, > .ctr = flakey_ctr, > diff --git a/drivers/md/dm-linear.c b/drivers/md/dm-linear.c > index 00774b5d7668..fc9c4272c10d 100644 > --- a/drivers/md/dm-linear.c > +++ b/drivers/md/dm-linear.c > @@ -229,10 +229,11 @@ static struct target_type linear_target = { > .version = {1, 4, 0}, > #ifdef CONFIG_BLK_DEV_ZONED > .features = DM_TARGET_PASSES_INTEGRITY | DM_TARGET_NOWAIT | > - DM_TARGET_ZONED_HM, > + DM_TARGET_ZONED_HM | DM_TARGET_PASSES_CRYPTO, > .report_zones = linear_report_zones, > #else > - .features = DM_TARGET_PASSES_INTEGRITY | DM_TARGET_NOWAIT, > + .features = DM_TARGET_PASSES_INTEGRITY | DM_TARGET_NOWAIT | > + DM_TARGET_PASSES_CRYPTO, > #endif > .module = THIS_MODULE, > .ctr = linear_ctr, > -- This latest version looks good to me. If it's needed despite my Co-developed-by, feel free to add: Reviewed-by: Eric Biggers <ebiggers@google.com> BTW, the #ifdef for CONFIG_BLK_DEV_ZONED is error-prone (though it's a pre-existing issue). I wonder if DM_TARGET_ZONED_HM should be defined to 0 when !CONFIG_BLK_DEV_ZONED, which would avoid the need for the #ifdef on .features. - Eric -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel
diff --git a/drivers/md/dm-flakey.c b/drivers/md/dm-flakey.c index a2cc9e45cbba..30c6bc151213 100644 --- a/drivers/md/dm-flakey.c +++ b/drivers/md/dm-flakey.c @@ -482,8 +482,10 @@ static struct target_type flakey_target = { .name = "flakey", .version = {1, 5, 0}, #ifdef CONFIG_BLK_DEV_ZONED - .features = DM_TARGET_ZONED_HM, + .features = DM_TARGET_ZONED_HM | DM_TARGET_PASSES_CRYPTO, .report_zones = flakey_report_zones, +#else + .features = DM_TARGET_PASSES_CRYPTO, #endif .module = THIS_MODULE, .ctr = flakey_ctr, diff --git a/drivers/md/dm-linear.c b/drivers/md/dm-linear.c index 00774b5d7668..fc9c4272c10d 100644 --- a/drivers/md/dm-linear.c +++ b/drivers/md/dm-linear.c @@ -229,10 +229,11 @@ static struct target_type linear_target = { .version = {1, 4, 0}, #ifdef CONFIG_BLK_DEV_ZONED .features = DM_TARGET_PASSES_INTEGRITY | DM_TARGET_NOWAIT | - DM_TARGET_ZONED_HM, + DM_TARGET_ZONED_HM | DM_TARGET_PASSES_CRYPTO, .report_zones = linear_report_zones, #else - .features = DM_TARGET_PASSES_INTEGRITY | DM_TARGET_NOWAIT, + .features = DM_TARGET_PASSES_INTEGRITY | DM_TARGET_NOWAIT | + DM_TARGET_PASSES_CRYPTO, #endif .module = THIS_MODULE, .ctr = linear_ctr,