block: print error via printk_ratelimited in blk_partition_remap()
PATCH 1/1 block: print error via printk_ratelimited in blk_partition_remap()
If there are IOs running on one partition during remove disk, blk_partition_remap() complains the partition is missed because it is removed by del_gendisk(), and causes flood of this error messge, so this patch uses printk_ratelimited() to avoid the issue.
Cc Christoph Hellwig <[email protected]>
Signed-off-by Ming Lei <[email protected]>
--- block/blk-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
block/blk-core.c +1 -1
@@ -2074,7 +2074,7 @@ static inline int blk_partition_remap(struct bio *bio)trace_block_bio_remap (bio->bi_disk->queue, bio,part_devt (p), bio->bi_iter.bi_sector - p->start_sect); }else { -printk ("%s: fail for partition %d\n" , __func__, bio->bi_partno); +printk_ratelimited ("%s: fail for partition %d\n" , __func__, bio->bi_partno); ret = -EIO ; }rcu_read_unlock ();
Signature · 1 line
2.9.5