]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
md: skip redundant raid_disks update when value is unchanged
authorAbd-Alrhman Masalkhi <abd.masalkhi@gmail.com>
Tue, 28 Apr 2026 13:05:24 +0000 (15:05 +0200)
committerYu Kuai <yukuai@fygo.io>
Sun, 31 May 2026 11:09:17 +0000 (19:09 +0800)
commitabaf4783822851678632e5cea98aa5aead99852f
treea93f46cbe7133c97bdbf5c470eef8c5f369c55d6
parent1d24d4c1ea1d9d3211c1d178e0c8d95be0348975
md: skip redundant raid_disks update when value is unchanged

Calling update_raid_disks() with the same value as the current one
can trigger unnecessary work. For example, RAID1 will reallocate
resources such as the mempool for r1bio.

Signed-off-by: Abd-Alrhman Masalkhi <abd.masalkhi@gmail.com>
Link: https://patch.msgid.link/20260428130524.448063-1-abd.masalkhi@gmail.com
Signed-off-by: Yu Kuai <yukuai@fygo.io>
drivers/md/md.c