mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-16 17:57:38 -04:00
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.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Assisted-by: Claude:claude-opus-4-6
Fixes: fd2ed4d252 ("dm: add statistics support")
Cc: stable@vger.kernel.org
This commit is contained in:
@@ -692,10 +692,8 @@ void dm_stats_account_io(struct dm_stats *stats, unsigned long bi_rw,
|
||||
*/
|
||||
last = raw_cpu_ptr(stats->last);
|
||||
stats_aux->merged =
|
||||
(bi_sector == (READ_ONCE(last->last_sector) &&
|
||||
((bi_rw == WRITE) ==
|
||||
(READ_ONCE(last->last_rw) == WRITE))
|
||||
));
|
||||
bi_sector == READ_ONCE(last->last_sector) &&
|
||||
(bi_rw == WRITE) == (READ_ONCE(last->last_rw) == WRITE);
|
||||
WRITE_ONCE(last->last_sector, end_sector);
|
||||
WRITE_ONCE(last->last_rw, bi_rw);
|
||||
} else
|
||||
|
||||
Reference in New Issue
Block a user