summaryrefslogtreecommitdiff
path: root/drivers/md/raid5-ppl.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-03-26 21:51:46 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2022-03-26 21:51:46 +0300
commit561593a048d7d6915889706f4b503a65435c033a (patch)
tree5b802be4953a1dae421b528d32082e297a17a7cc /drivers/md/raid5-ppl.c
parent9bf3fc5007856d5ca76d6e7a4652e3b67b683241 (diff)
parent7b12e49669c99f63bc12351c57e581f1f14d4adf (diff)
downloadlinux-561593a048d7d6915889706f4b503a65435c033a.tar.xz
Merge tag 'for-5.18/write-streams-2022-03-18' of git://git.kernel.dk/linux-block
Pull NVMe write streams removal from Jens Axboe: "This removes the write streams support in NVMe. No vendor ever really shipped working support for this, and they are not interested in supporting it. With the NVMe support gone, we have nothing in the tree that supports this. Remove passing around of the hints. The only discussion point in this patchset imho is the fact that the file specific write hint setting/getting fcntl helpers will now return -1/EINVAL like they did before we supported write hints. No known applications use these functions, I only know of one prototype that I help do for RocksDB, and that's not used. That said, with a change like this, it's always a bit controversial. Alternatively, we could just make them return 0 and pretend it worked. It's placement based hints after all" * tag 'for-5.18/write-streams-2022-03-18' of git://git.kernel.dk/linux-block: fs: remove fs.f_write_hint fs: remove kiocb.ki_hint block: remove the per-bio/request write hint nvme: remove support or stream based temperature hint
Diffstat (limited to 'drivers/md/raid5-ppl.c')
-rw-r--r--drivers/md/raid5-ppl.c28
1 files changed, 3 insertions, 25 deletions
diff --git a/drivers/md/raid5-ppl.c b/drivers/md/raid5-ppl.c
index ea4cd8dd4dc3..d3962d92df18 100644
--- a/drivers/md/raid5-ppl.c
+++ b/drivers/md/raid5-ppl.c
@@ -466,7 +466,6 @@ static void ppl_submit_iounit(struct ppl_io_unit *io)
bio->bi_end_io = ppl_log_endio;
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);
@@ -496,7 +495,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);
@@ -1396,7 +1394,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));
@@ -1495,25 +1492,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;
@@ -1527,17 +1512,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);