There were wrong parentheses when setting stats_aux->merged, so that merging was never properly accounted. This commit fixes it.
Unified · Split
| @@ -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 | } else | 699 | } else |