Commit 0a806cfd authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

dm-integrity: stop using bio_devname

Use the %pg format specifier to save on stack consuption and code size.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarChaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Link: https://lore.kernel.org/r/20220304180105.409765-6-hch@lst.deSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 66671719
...@@ -1788,12 +1788,11 @@ static void integrity_metadata(struct work_struct *w) ...@@ -1788,12 +1788,11 @@ static void integrity_metadata(struct work_struct *w)
checksums_ptr - checksums, dio->op == REQ_OP_READ ? TAG_CMP : TAG_WRITE); checksums_ptr - checksums, dio->op == REQ_OP_READ ? TAG_CMP : TAG_WRITE);
if (unlikely(r)) { if (unlikely(r)) {
if (r > 0) { if (r > 0) {
char b[BDEVNAME_SIZE];
sector_t s; sector_t s;
s = sector - ((r + ic->tag_size - 1) / ic->tag_size); s = sector - ((r + ic->tag_size - 1) / ic->tag_size);
DMERR_LIMIT("%s: Checksum failed at sector 0x%llx", DMERR_LIMIT("%pg: Checksum failed at sector 0x%llx",
bio_devname(bio, b), s); bio->bi_bdev, s);
r = -EILSEQ; r = -EILSEQ;
atomic64_inc(&ic->number_of_mismatches); atomic64_inc(&ic->number_of_mismatches);
dm_audit_log_bio(DM_MSG_PREFIX, "integrity-checksum", dm_audit_log_bio(DM_MSG_PREFIX, "integrity-checksum",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment