Skip to content

Commit

Permalink
Revert "Diagnostics for stuck IOPS"
Browse files Browse the repository at this point in the history
This reverts commit f44be5234c7b9172d8a95f6a2ab4334b54be4919.
  • Loading branch information
ctheune committed Nov 4, 2024
1 parent 45a2ca6 commit 6ef5604
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
16 changes: 3 additions & 13 deletions drivers/md/raid5.c
Original file line number Diff line number Diff line change
Expand Up @@ -2369,7 +2369,6 @@ static struct stripe_head *alloc_stripe(struct kmem_cache *sc, gfp_t gfp,
atomic_set(&sh->count, 1);
sh->raid_conf = conf;
sh->log_start = MaxSector;
atomic_set(&sh->bitmap_counts, 0);

if (raid5_has_ppl(conf)) {
sh->ppl_page = alloc_page(gfp);
Expand Down Expand Up @@ -3566,7 +3565,6 @@ static void __add_stripe_bio(struct stripe_head *sh, struct bio *bi,
spin_unlock_irq(&sh->stripe_lock);
md_bitmap_startwrite(conf->mddev->bitmap, sh->sector,
RAID5_STRIPE_SECTORS(conf), 0);
printk("%s: %s: start %px(%llu+%lu) %u\n", __func__, mdname(conf->mddev), sh, sh->sector, RAID5_STRIPE_SECTORS(conf), atomic_inc_return(&sh->bitmap_counts));
spin_lock_irq(&sh->stripe_lock);
clear_bit(STRIPE_BITMAP_PENDING, &sh->state);
if (!sh->batch_head) {
Expand Down Expand Up @@ -3664,12 +3662,9 @@ handle_failed_stripe(struct r5conf *conf, struct stripe_head *sh,
bio_io_error(bi);
bi = nextbi;
}
if (bitmap_end) {
if (bitmap_end)
md_bitmap_endwrite(conf->mddev->bitmap, sh->sector,
RAID5_STRIPE_SECTORS(conf), 0, 0);
printk("%s: %s: end %px(%llu+%lu) %u\n", __func__, mdname(conf->mddev), sh, sh->sector, RAID5_STRIPE_SECTORS(conf), atomic_dec_return(&sh->bitmap_counts));
}

bitmap_end = 0;
/* and fail all 'written' */
bi = sh->dev[i].written;
Expand Down Expand Up @@ -3713,11 +3708,9 @@ handle_failed_stripe(struct r5conf *conf, struct stripe_head *sh,
bi = nextbi;
}
}
if (bitmap_end) {
if (bitmap_end)
md_bitmap_endwrite(conf->mddev->bitmap, sh->sector,
RAID5_STRIPE_SECTORS(conf), 0, 0);
printk("%s: %s: end %px(%llu+%lu) %u\n", __func__, mdname(conf->mddev), sh, sh->sector, RAID5_STRIPE_SECTORS(conf), atomic_dec_return(&sh->bitmap_counts));
}
/* If we were in the middle of a write the parity block might
* still be locked - so just clear all R5_LOCKED flags
*/
Expand Down Expand Up @@ -4066,7 +4059,6 @@ static void handle_stripe_clean_event(struct r5conf *conf,
bio_endio(wbi);
wbi = wbi2;
}
printk("%s: %s: end %px(%llu+%lu) %u\n", __func__, mdname(conf->mddev), sh, sh->sector, RAID5_STRIPE_SECTORS(conf), atomic_dec_return(&sh->bitmap_counts));
md_bitmap_endwrite(conf->mddev->bitmap, sh->sector,
RAID5_STRIPE_SECTORS(conf),
!test_bit(STRIPE_DEGRADED, &sh->state),
Expand Down Expand Up @@ -5798,13 +5790,11 @@ static void make_discard_request(struct mddev *mddev, struct bio *bi)
if (conf->mddev->bitmap) {
for (d = 0;
d < conf->raid_disks - conf->max_degraded;
d++) {
d++)
md_bitmap_startwrite(mddev->bitmap,
sh->sector,
RAID5_STRIPE_SECTORS(conf),
0);
printk("%s: %s: start %px(%llu+%lu) %u\n", __func__, mdname(conf->mddev), sh, sh->sector, RAID5_STRIPE_SECTORS(conf), atomic_inc_return(&sh->bitmap_counts));
}
sh->bm_seq = conf->seq_flush + 1;
set_bit(STRIPE_BIT_DELAY, &sh->state);
}
Expand Down
1 change: 0 additions & 1 deletion drivers/md/raid5.h
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ struct stripe_head {
int nr_pages; /* page array size */
int stripes_per_page;
#endif
atomic_t bitmap_counts;
struct r5dev {
/* rreq and rvec are used for the replacement device when
* writing data to both devices.
Expand Down

0 comments on commit 6ef5604

Please sign in to comment.