diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/md/dm-crypt.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index 692cddf3fe2a..3b1a786d65c2 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c | |||
| @@ -949,6 +949,7 @@ static int crypt_integrity_ctr(struct crypt_config *cc, struct dm_target *ti) | |||
| 949 | { | 949 | { |
| 950 | #ifdef CONFIG_BLK_DEV_INTEGRITY | 950 | #ifdef CONFIG_BLK_DEV_INTEGRITY |
| 951 | struct blk_integrity *bi = blk_get_integrity(cc->dev->bdev->bd_disk); | 951 | struct blk_integrity *bi = blk_get_integrity(cc->dev->bdev->bd_disk); |
| 952 | struct mapped_device *md = dm_table_get_md(ti->table); | ||
| 952 | 953 | ||
| 953 | /* From now we require underlying device with our integrity profile */ | 954 | /* From now we require underlying device with our integrity profile */ |
| 954 | if (!bi || strcasecmp(bi->profile->name, "DM-DIF-EXT-TAG")) { | 955 | if (!bi || strcasecmp(bi->profile->name, "DM-DIF-EXT-TAG")) { |
| @@ -968,7 +969,7 @@ static int crypt_integrity_ctr(struct crypt_config *cc, struct dm_target *ti) | |||
| 968 | 969 | ||
| 969 | if (crypt_integrity_aead(cc)) { | 970 | if (crypt_integrity_aead(cc)) { |
| 970 | cc->integrity_tag_size = cc->on_disk_tag_size - cc->integrity_iv_size; | 971 | cc->integrity_tag_size = cc->on_disk_tag_size - cc->integrity_iv_size; |
| 971 | DMINFO("Integrity AEAD, tag size %u, IV size %u.", | 972 | DMDEBUG("%s: Integrity AEAD, tag size %u, IV size %u.", dm_device_name(md), |
| 972 | cc->integrity_tag_size, cc->integrity_iv_size); | 973 | cc->integrity_tag_size, cc->integrity_iv_size); |
| 973 | 974 | ||
| 974 | if (crypto_aead_setauthsize(any_tfm_aead(cc), cc->integrity_tag_size)) { | 975 | if (crypto_aead_setauthsize(any_tfm_aead(cc), cc->integrity_tag_size)) { |
| @@ -976,7 +977,7 @@ static int crypt_integrity_ctr(struct crypt_config *cc, struct dm_target *ti) | |||
| 976 | return -EINVAL; | 977 | return -EINVAL; |
| 977 | } | 978 | } |
| 978 | } else if (cc->integrity_iv_size) | 979 | } else if (cc->integrity_iv_size) |
| 979 | DMINFO("Additional per-sector space %u bytes for IV.", | 980 | DMDEBUG("%s: Additional per-sector space %u bytes for IV.", dm_device_name(md), |
| 980 | cc->integrity_iv_size); | 981 | cc->integrity_iv_size); |
| 981 | 982 | ||
| 982 | if ((cc->integrity_tag_size + cc->integrity_iv_size) != bi->tag_size) { | 983 | if ((cc->integrity_tag_size + cc->integrity_iv_size) != bi->tag_size) { |
| @@ -1891,7 +1892,7 @@ static int crypt_alloc_tfms_skcipher(struct crypt_config *cc, char *ciphermode) | |||
| 1891 | * algorithm implementation is used. Help people debug performance | 1892 | * algorithm implementation is used. Help people debug performance |
| 1892 | * problems by logging the ->cra_driver_name. | 1893 | * problems by logging the ->cra_driver_name. |
| 1893 | */ | 1894 | */ |
| 1894 | DMINFO("%s using implementation \"%s\"", ciphermode, | 1895 | DMDEBUG_LIMIT("%s using implementation \"%s\"", ciphermode, |
| 1895 | crypto_skcipher_alg(any_tfm(cc))->base.cra_driver_name); | 1896 | crypto_skcipher_alg(any_tfm(cc))->base.cra_driver_name); |
| 1896 | return 0; | 1897 | return 0; |
| 1897 | } | 1898 | } |
| @@ -1911,7 +1912,7 @@ static int crypt_alloc_tfms_aead(struct crypt_config *cc, char *ciphermode) | |||
| 1911 | return err; | 1912 | return err; |
| 1912 | } | 1913 | } |
| 1913 | 1914 | ||
| 1914 | DMINFO("%s using implementation \"%s\"", ciphermode, | 1915 | DMDEBUG_LIMIT("%s using implementation \"%s\"", ciphermode, |
| 1915 | crypto_aead_alg(any_tfm_aead(cc))->base.cra_driver_name); | 1916 | crypto_aead_alg(any_tfm_aead(cc))->base.cra_driver_name); |
| 1916 | return 0; | 1917 | return 0; |
| 1917 | } | 1918 | } |
