From: Logan Gunthorpe Date: Thu, 16 Jun 2022 19:19:44 +0000 (-0600) Subject: md/raid5: Improve debug prints X-Git-Tag: baikal/aarch64/sdk6.1~3362^2~108 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=d0227e29fb6400198651716b3c2262b113fab92e;p=kernel.git md/raid5: Improve debug prints Add a debug print for raid5_make_request() so that each request is printed and add the logical sector number to the debug print in __add_stripe_bio(). Signed-off-by: Logan Gunthorpe Signed-off-by: Song Liu Signed-off-by: Jens Axboe --- diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index c81a1a635ff73..651a84bf1a132 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -3521,8 +3521,9 @@ static void __add_stripe_bio(struct stripe_head *sh, struct bio *bi, sh->overwrite_disks++; } - pr_debug("added bi b#%llu to stripe s#%llu, disk %d.\n", - (*bip)->bi_iter.bi_sector, sh->sector, dd_idx); + pr_debug("added bi b#%llu to stripe s#%llu, disk %d, logical %llu\n", + (*bip)->bi_iter.bi_sector, sh->sector, dd_idx, + sh->dev[dd_idx].sector); if (conf->mddev->bitmap && firstwrite) { /* Cannot hold spinlock over bitmap_startwrite, @@ -6094,6 +6095,9 @@ static bool raid5_make_request(struct mddev *mddev, struct bio * bi) DIV_ROUND_UP_SECTOR_T(ctx.last_sector - logical_sector, RAID5_STRIPE_SECTORS(conf))); + pr_debug("raid456: %s, logical %llu to %llu\n", __func__, + bi->bi_iter.bi_sector, ctx.last_sector); + /* Bail out if conflicts with reshape and REQ_NOWAIT is set */ if ((bi->bi_opf & REQ_NOWAIT) && (conf->reshape_progress != MaxSector) &&