From: Kirill Tkhai <kirill.tkhai@openvz.org>
To: agk@redhat.com, snitzer@redhat.com, dm-devel@redhat.com,
song@kernel.org, linux-kernel@vger.kernel.org,
khorenko@virtuozzo.com, kirill.tkhai@openvz.org
Subject: [PATCH 2/4] dm: Process .io_hints for drivers not having underlying devices
Date: Mon, 28 Mar 2022 14:18:29 +0300 [thread overview]
Message-ID: <164846630905.251310.11706161266244591219.stgit@pro> (raw)
In-Reply-To: <164846619932.251310.3668540533992131988.stgit@pro>
This makes dm_calculate_queue_limits() sets the hints also for drivers,
which do not have underlying devices.
This is useful for dm-qcow2 driver, that wants to have incomming requests
are likely splitted by QCOW2 cluster size alignment.
Signed-off-by: Kirill Tkhai <kirill.tkhai@openvz.org>
---
drivers/md/dm-table.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index e43096cfe9e2..aa2e85bef6e7 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -1660,8 +1660,11 @@ int dm_calculate_queue_limits(struct dm_table *table,
ti = dm_table_get_target(table, i);
- if (!ti->type->iterate_devices)
+ if (!ti->type->iterate_devices) {
+ if (ti->type->io_hints)
+ ti->type->io_hints(ti, &ti_limits);
goto combine_limits;
+ }
/*
* Combine queue limits of all the devices this target uses.
next prev parent reply other threads:[~2022-03-28 11:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-28 11:18 [PATCH 0/4] dm: Introduce dm-qcow2 driver to attach QCOW2 files as block device Kirill Tkhai
2022-03-28 11:18 ` [PATCH 1/4] dm: Export dm_complete_request() Kirill Tkhai
2022-03-28 11:18 ` Kirill Tkhai [this message]
2022-03-28 11:18 ` [PATCH 3/4] dm-qcow2: Introduce driver to create block devices over QCOW2 files Kirill Tkhai
2022-03-28 20:03 ` kernel test robot
2022-03-28 23:42 ` kernel test robot
2022-03-29 10:42 ` [PATCH 3/4 v1.5] " Kirill Tkhai
2022-03-29 13:34 ` [dm-devel] [PATCH 3/4] " Christoph Hellwig
2022-03-29 15:24 ` Kirill Tkhai
2022-03-29 22:30 ` Kirill Tkhai
2022-03-28 11:18 ` [PATCH 4/4] dm-qcow2: Add helper for working with dm-qcow2 devices Kirill Tkhai
2022-03-29 13:08 ` [dm-devel] [PATCH 0/4] dm: Introduce dm-qcow2 driver to attach QCOW2 files as block device Christoph Hellwig
2022-03-29 15:14 ` Kirill Tkhai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=164846630905.251310.11706161266244591219.stgit@pro \
--to=kirill.tkhai@openvz.org \
--cc=agk@redhat.com \
--cc=dm-devel@redhat.com \
--cc=khorenko@virtuozzo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=snitzer@redhat.com \
--cc=song@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox