diff options
author | Logan Gunthorpe <logang@deltatee.com> | 2022-06-16 13:19:44 -0600 |
---|---|---|
committer | Song Liu <song@kernel.org> | 2022-07-03 07:55:43 -0700 |
commit | a3906874f1f5fbfbc02a18bc653070d5056b9b44 (patch) | |
tree | 5056c1dd8700cec38c4d81015ae72c49d25506be | |
parent | a5b9c6a653fb608220f68069635a265132172400 (diff) |
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 <logang@deltatee.com>
Signed-off-by: Song Liu <song@kernel.org>
-rw-r--r-- | drivers/md/raid5.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index ca7dbd281ad2..e01f6211c947 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -3520,8 +3520,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, @@ -6093,6 +6094,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) && |