Skip to content

Commit de3c913

Browse files
committed
Merge tag 'for-5.7/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
Pull device mapper fixes from Mike Snitzer: - Fix excessive bio splitting that caused performance regressions - Fix logic bug in DM integrity discard support's integrity tag testing - Fix DM integrity warning on ppc64le due to missing cast * tag 'for-5.7/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm integrity: fix logic bug in integrity tag testing Revert "dm: always call blk_queue_split() in dm_process_bio()" dm integrity: fix ppc64le warning
2 parents 86f26a7 + 8267d8f commit de3c913

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

‎drivers/md/dm-integrity.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1333,7 +1333,7 @@ static int dm_integrity_rw_tag(struct dm_integrity_c *ic, unsigned char *tag, se
13331333
if (likely(is_power_of_2(ic->tag_size))) {
13341334
if (unlikely(memcmp(dp, tag, to_copy)))
13351335
if (unlikely(!ic->discard) ||
1336-
unlikely(!memchr_inv(dp, DISCARD_FILLER, to_copy))) {
1336+
unlikely(memchr_inv(dp, DISCARD_FILLER, to_copy) != NULL)) {
13371337
goto thorough_test;
13381338
}
13391339
} else {
@@ -3069,7 +3069,7 @@ static void dm_integrity_status(struct dm_target *ti, status_type_t type,
30693069
switch (type) {
30703070
case STATUSTYPE_INFO:
30713071
DMEMIT("%llu %llu",
3072-
atomic64_read(&ic->number_of_mismatches),
3072+
(unsigned long long)atomic64_read(&ic->number_of_mismatches),
30733073
ic->provided_data_sectors);
30743074
if (ic->sb->flags & cpu_to_le32(SB_FLAG_RECALCULATING))
30753075
DMEMIT(" %llu", le64_to_cpu(ic->sb->recalc_sector));

‎drivers/md/dm.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1740,8 +1740,9 @@ static blk_qc_t dm_process_bio(struct mapped_device *md,
17401740
* won't be imposed.
17411741
*/
17421742
if (current->bio_list) {
1743-
blk_queue_split(md->queue, &bio);
1744-
if (!is_abnormal_io(bio))
1743+
if (is_abnormal_io(bio))
1744+
blk_queue_split(md->queue, &bio);
1745+
else
17451746
dm_queue_split(md, ti, &bio);
17461747
}
17471748

0 commit comments

Comments
 (0)