From af798cc63b569024c6890337875adccc4862100e Mon Sep 17 00:00:00 2001 From: paul-1 <6473457+paul-1@users.noreply.github.com> Date: Sat, 26 Feb 2022 13:28:26 -0500 Subject: [PATCH 4/6] block: Prevent size changes of loop device creation from making excess noise in demsg. --- block/genhd.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/block/genhd.c b/block/genhd.c index 99344f53c789..0625dbcff78a 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -83,8 +83,11 @@ bool set_capacity_and_notify(struct gendisk *disk, sector_t size) (disk->flags & GENHD_FL_HIDDEN)) return false; - pr_info("%s: detected capacity change from %lld to %lld\n", - disk->disk_name, capacity, size); + //Prevent loop device creation noise in dmesg. + if (disk->major != 7 || + capacity != 0) + pr_info("%s: detected capacity change from %lld to %lld\n", + disk->disk_name, capacity, size); /* * Historically we did not send a uevent for changes to/from an empty -- 2.48.1