History

dm-stats: fix merge accounting

There were wrong parentheses when setting stats_aux->merged, so that merging was never properly accounted. This commit fixes it.

Mikulas Patocka committed 4 months ago

Commit 1917eb21 parent 422f1d41 file · +2 −4Browse files

Unified · Split

drivers/md/dm-stats.c+2−4
@@ -692,10 +692,8 @@ void dm_stats_account_io(struct dm_stats *stats, unsigned long bi_rw, · 691 unmodified lines
692 */692 */
693 last = raw_cpu_ptr(stats->last);693 last = raw_cpu_ptr(stats->last);
694 stats_aux->merged =694 stats_aux->merged =
695 (bi_sector == (READ_ONCE(last->last_sector) &&695 bi_sector == READ_ONCE(last->last_sector) &&
696 ((bi_rw == WRITE) ==696 (bi_rw == WRITE) == (READ_ONCE(last->last_rw) == WRITE);
697 (READ_ONCE(last->last_rw) == WRITE))
698 ));
699 WRITE_ONCE(last->last_sector, end_sector);697 WRITE_ONCE(last->last_sector, end_sector);
700 WRITE_ONCE(last->last_rw, bi_rw);698 WRITE_ONCE(last->last_rw, bi_rw);
701 } else699 } else