]> git.baikalelectronics.ru Git - kernel.git/commit
dm: don't report "detected capacity change" on device creation
authorMikulas Patocka <mpatocka@redhat.com>
Mon, 22 Mar 2021 14:13:54 +0000 (10:13 -0400)
committerMike Snitzer <snitzer@redhat.com>
Mon, 22 Mar 2021 16:32:32 +0000 (12:32 -0400)
commit706e82e0178b1e2291b26a125f3e61b0316066f3
tree8cf9f00192e905f0d6366378eb67f46039edc2e4
parentff62a0cbb765d39f93e5b0a7f06f4d2dc1c9cdf9
dm: don't report "detected capacity change" on device creation

When a DM device is first created it doesn't yet have an established
capacity, therefore the use of set_capacity_and_notify() should be
conditional given the potential for needless pr_info "detected
capacity change" noise even if capacity is 0.

One could argue that the pr_info() in set_capacity_and_notify() is
misplaced, but that position is not held uniformly.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Fixes: 9b6b309376a5 ("dm: use set_capacity_and_notify")
Cc: stable@vger.kernel.org
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm.c