summaryrefslogtreecommitdiff
path: root/drivers/md
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2022-03-04 20:55:56 +0300
committerJens Axboe <axboe@kernel.dk>2022-03-07 22:45:57 +0300
commitc75e707fe1aab32f1dc8e09845533b6542d9aaa9 (patch)
tree9677a5c6208862bfa95b0b5b9d7a635b0d3b3e2f /drivers/md
parent85e6c775762aa4067d2c2b8121e59a06564d0dc4 (diff)
downloadlinux-c75e707fe1aab32f1dc8e09845533b6542d9aaa9.tar.xz
block: remove the per-bio/request write hint
With the NVMe support for this gone, there are no consumers of these hints left, so remove them. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20220304175556.407719-2-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/raid1.c2
-rw-r--r--drivers/md/raid5-ppl.c28
-rw-r--r--drivers/md/raid5.c6
3 files changed, 3 insertions, 33 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 03477e971699..370ab3218534 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -1137,8 +1137,6 @@ static void alloc_behind_master_bio(struct r1bio *r1_bio,
goto skip_copy;
}
- behind_bio->bi_write_hint = bio->bi_write_hint;
-
while (i < vcnt && size) {
struct page *page;
int len = min_t(int, PAGE_SIZE, size);
diff --git a/drivers/md/raid5-ppl.c b/drivers/md/raid5-ppl.c
index bbb5673104ec..388ab41d1a11 100644
--- a/drivers/md/raid5-ppl.c
+++ b/drivers/md/raid5-ppl.c
@@ -467,7 +467,6 @@ static void ppl_submit_iounit(struct ppl_io_unit *io)
bio_set_dev(bio, log->rdev->bdev);
bio->bi_iter.bi_sector = log->next_io_sector;
bio_add_page(bio, io->header_page, PAGE_SIZE, 0);
- bio->bi_write_hint = ppl_conf->write_hint;
pr_debug("%s: log->current_io_sector: %llu\n", __func__,
(unsigned long long)log->next_io_sector);
@@ -497,7 +496,6 @@ static void ppl_submit_iounit(struct ppl_io_unit *io)
bio = bio_alloc_bioset(prev->bi_bdev, BIO_MAX_VECS,
prev->bi_opf, GFP_NOIO,
&ppl_conf->bs);
- bio->bi_write_hint = prev->bi_write_hint;
bio->bi_iter.bi_sector = bio_end_sector(prev);
bio_add_page(bio, sh->ppl_page, PAGE_SIZE, 0);
@@ -1397,7 +1395,6 @@ int ppl_init_log(struct r5conf *conf)
atomic64_set(&ppl_conf->seq, 0);
INIT_LIST_HEAD(&ppl_conf->no_mem_stripes);
spin_lock_init(&ppl_conf->no_mem_stripes_lock);
- ppl_conf->write_hint = RWH_WRITE_LIFE_NOT_SET;
if (!mddev->external) {
ppl_conf->signature = ~crc32c_le(~0, mddev->uuid, sizeof(mddev->uuid));
@@ -1496,25 +1493,13 @@ int ppl_modify_log(struct r5conf *conf, struct md_rdev *rdev, bool add)
static ssize_t
ppl_write_hint_show(struct mddev *mddev, char *buf)
{
- size_t ret = 0;
- struct r5conf *conf;
- struct ppl_conf *ppl_conf = NULL;
-
- spin_lock(&mddev->lock);
- conf = mddev->private;
- if (conf && raid5_has_ppl(conf))
- ppl_conf = conf->log_private;
- ret = sprintf(buf, "%d\n", ppl_conf ? ppl_conf->write_hint : 0);
- spin_unlock(&mddev->lock);
-
- return ret;
+ return sprintf(buf, "%d\n", 0);
}
static ssize_t
ppl_write_hint_store(struct mddev *mddev, const char *page, size_t len)
{
struct r5conf *conf;
- struct ppl_conf *ppl_conf;
int err = 0;
unsigned short new;
@@ -1528,17 +1513,10 @@ ppl_write_hint_store(struct mddev *mddev, const char *page, size_t len)
return err;
conf = mddev->private;
- if (!conf) {
+ if (!conf)
err = -ENODEV;
- } else if (raid5_has_ppl(conf)) {
- ppl_conf = conf->log_private;
- if (!ppl_conf)
- err = -EINVAL;
- else
- ppl_conf->write_hint = new;
- } else {
+ else if (!raid5_has_ppl(conf) || !conf->log_private)
err = -EINVAL;
- }
mddev_unlock(mddev);
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 8891aaba6596..78503db55ca4 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -1210,9 +1210,6 @@ again:
bi->bi_io_vec[0].bv_len = RAID5_STRIPE_SIZE(conf);
bi->bi_io_vec[0].bv_offset = sh->dev[i].offset;
bi->bi_iter.bi_size = RAID5_STRIPE_SIZE(conf);
- bi->bi_write_hint = sh->dev[i].write_hint;
- if (!rrdev)
- sh->dev[i].write_hint = RWH_WRITE_LIFE_NOT_SET;
/*
* If this is discard request, set bi_vcnt 0. We don't
* want to confuse SCSI because SCSI will replace payload
@@ -1264,8 +1261,6 @@ again:
rbi->bi_io_vec[0].bv_len = RAID5_STRIPE_SIZE(conf);
rbi->bi_io_vec[0].bv_offset = sh->dev[i].offset;
rbi->bi_iter.bi_size = RAID5_STRIPE_SIZE(conf);
- rbi->bi_write_hint = sh->dev[i].write_hint;
- sh->dev[i].write_hint = RWH_WRITE_LIFE_NOT_SET;
/*
* If this is discard request, set bi_vcnt 0. We don't
* want to confuse SCSI because SCSI will replace payload
@@ -3416,7 +3411,6 @@ static int add_stripe_bio(struct stripe_head *sh, struct bio *bi, int dd_idx,
(unsigned long long)sh->sector);
spin_lock_irq(&sh->stripe_lock);
- sh->dev[dd_idx].write_hint = bi->bi_write_hint;
/* Don't allow new IO added to stripes in batch list */
if (sh->batch_head)
goto overlap;