diff options
author | Hongyu Jin <hongyu.jin@unisoc.com> | 2024-01-24 13:35:53 +0800 |
---|---|---|
committer | Mike Snitzer <snitzer@kernel.org> | 2024-02-20 14:22:51 -0500 |
commit | 6e5f0f6383b4896c7e9b943d84b136149d0f45e9 (patch) | |
tree | ee5c1e1e85fc629ee12a66128feb702621471b1b /drivers/md/dm-snap-persistent.c | |
parent | b9d3ac48a855ed295ce660f73d3b6ba6f91fae42 (diff) | |
download | lwn-6e5f0f6383b4896c7e9b943d84b136149d0f45e9.tar.gz lwn-6e5f0f6383b4896c7e9b943d84b136149d0f45e9.zip |
dm io: Support IO priority
Some IO will dispatch from kworker with different io_context settings
than the submitting task, we may need to specify a priority to avoid
losing priority.
Add IO priority parameter to dm_io() and update all callers.
Co-developed-by: Yibin Ding <yibin.ding@unisoc.com>
Signed-off-by: Yibin Ding <yibin.ding@unisoc.com>
Signed-off-by: Hongyu Jin <hongyu.jin@unisoc.com>
Reviewed-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'drivers/md/dm-snap-persistent.c')
-rw-r--r-- | drivers/md/dm-snap-persistent.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/dm-snap-persistent.c b/drivers/md/dm-snap-persistent.c index 15649921f2a9..568d10842b1f 100644 --- a/drivers/md/dm-snap-persistent.c +++ b/drivers/md/dm-snap-persistent.c @@ -223,7 +223,7 @@ static void do_metadata(struct work_struct *work) { struct mdata_req *req = container_of(work, struct mdata_req, work); - req->result = dm_io(req->io_req, 1, req->where, NULL); + req->result = dm_io(req->io_req, 1, req->where, NULL, IOPRIO_DEFAULT); } /* @@ -247,7 +247,7 @@ static int chunk_io(struct pstore *ps, void *area, chunk_t chunk, blk_opf_t opf, struct mdata_req req; if (!metadata) - return dm_io(&io_req, 1, &where, NULL); + return dm_io(&io_req, 1, &where, NULL, IOPRIO_DEFAULT); req.where = &where; req.io_req = &io_req; |