* Replacement for dm_dispatch_request for older request based targets
@ 2017-11-01 6:23 Tariq Mustafa
2017-11-01 16:08 ` Mike Snitzer
0 siblings, 1 reply; 4+ messages in thread
From: Tariq Mustafa @ 2017-11-01 6:23 UTC (permalink / raw)
To: dm-devel
[-- Attachment #1.1: Type: text/plain, Size: 377 bytes --]
Hello,
I am trying to figure out what would be the appropriate replacement for "dm_dispatch_request()" on the newer kernel? This export has been removed (by commit - [dbf978]<https://sourceforge.net/p/android-x86/kernel/ci/dbf9782c1078c537831201c73ac60c9623ae9370/>), what would be an equivalent call to submit the request.
Thanks in advance.
Regards,
Tariq
[-- Attachment #1.2: Type: text/html, Size: 1108 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Replacement for dm_dispatch_request for older request based targets
2017-11-01 6:23 Replacement for dm_dispatch_request for older request based targets Tariq Mustafa
@ 2017-11-01 16:08 ` Mike Snitzer
2017-11-01 18:10 ` Tariq Mustafa
0 siblings, 1 reply; 4+ messages in thread
From: Mike Snitzer @ 2017-11-01 16:08 UTC (permalink / raw)
To: Tariq Mustafa; +Cc: dm-devel
On Wed, Nov 01 2017 at 2:23am -0400,
Tariq Mustafa <tmustafa@hotmail.com> wrote:
> Hello,
>
> I am trying to figure out what would be the appropriate replacement for
> "dm_dispatch_request()" on the newer kernel? This export has been removed
> (by commit - [1][dbf978]), what would be an equivalent call to submit the
> request.
dm_dispatch_request was renamed to dm_dispatch_clone_request (IIRC).
But are you asking what is the new export? There isn't one. There
should be no need for anything other than DM core (dm-rq.c) to call
these interfaces that are no longer exported.
Please explain what you're trying to do if you need more help.
Thanks,
Mike
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Replacement for dm_dispatch_request for older request based targets
2017-11-01 16:08 ` Mike Snitzer
@ 2017-11-01 18:10 ` Tariq Mustafa
2017-11-01 18:54 ` Tariq Mustafa
0 siblings, 1 reply; 4+ messages in thread
From: Tariq Mustafa @ 2017-11-01 18:10 UTC (permalink / raw)
To: Mike Snitzer; +Cc: dm-devel
[-- Attachment #1.1: Type: text/plain, Size: 2374 bytes --]
Thanks Mike. I was looking at the request based crypt, and saw the following code;
static void req_crypt_dec_pending_encrypt(struct req_dm_crypt_io *io)
{
int error = 0;
struct request *clone = NULL;
if (io) {
error = io->error;
if (io->cloned_request) {
clone = io->cloned_request;
} else {
....
}
} else {
....
}
atomic_dec(&io->pending);
if (error < 0)
dm_kill_unmapped_request(clone, error);
else
dm_dispatch_request(clone); <----
}
Here I think the request is being sent to the underlying device below the target (I think the .map_rq would be returning DM_MAPIO_REMAPPED for this IO). Now with "dm_dispatch_request()" deprecated, how would this be done now?
Additional question:
Also for bio based targets, there is a facility within target to allocate some space using the "per_bio_data_size", and then use that in the "map" callback using the "dm_per_bio_data()", do we have an equivalent mechanism for request based targets. I saw some patch where there are there is something about letting request based targets to use this ("per_io_data_size"), but I did not see anything the version of kernel that I have - Ubuntu 16.04 (4.4.0-92).
Thank you!
________________________________
From: Mike Snitzer <snitzer@redhat.com>
Sent: Wednesday, November 1, 2017 9:08:57 AM
To: Tariq Mustafa
Cc: dm-devel@redhat.com
Subject: Re: Replacement for dm_dispatch_request for older request based targets
On Wed, Nov 01 2017 at 2:23am -0400,
Tariq Mustafa <tmustafa@hotmail.com> wrote:
> Hello,
>
> I am trying to figure out what would be the appropriate replacement for
> "dm_dispatch_request()" on the newer kernel? This export has been removed
> (by commit - [1][dbf978]), what would be an equivalent call to submit the
> request.
dm_dispatch_request was renamed to dm_dispatch_clone_request (IIRC).
But are you asking what is the new export? There isn't one. There
should be no need for anything other than DM core (dm-rq.c) to call
these interfaces that are no longer exported.
Please explain what you're trying to do if you need more help.
Thanks,
Mike
[-- Attachment #1.2: Type: text/html, Size: 5489 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Replacement for dm_dispatch_request for older request based targets
2017-11-01 18:10 ` Tariq Mustafa
@ 2017-11-01 18:54 ` Tariq Mustafa
0 siblings, 0 replies; 4+ messages in thread
From: Tariq Mustafa @ 2017-11-01 18:54 UTC (permalink / raw)
To: Mike Snitzer; +Cc: dm-devel
[-- Attachment #1.1: Type: text/plain, Size: 2824 bytes --]
Sorry, here is a correction to my last comment;
.map_rq would be returning DM_MAPIO_SUBMITTED for this IO
________________________________
From: dm-devel-bounces@redhat.com <dm-devel-bounces@redhat.com> on behalf of Tariq Mustafa <tmustafa@hotmail.com>
Sent: Wednesday, November 1, 2017 11:10:58 AM
To: Mike Snitzer
Cc: dm-devel@redhat.com
Subject: Re: [dm-devel] Replacement for dm_dispatch_request for older request based targets
Thanks Mike. I was looking at the request based crypt, and saw the following code;
static void req_crypt_dec_pending_encrypt(struct req_dm_crypt_io *io)
{
int error = 0;
struct request *clone = NULL;
if (io) {
error = io->error;
if (io->cloned_request) {
clone = io->cloned_request;
} else {
....
}
} else {
....
}
atomic_dec(&io->pending);
if (error < 0)
dm_kill_unmapped_request(clone, error);
else
dm_dispatch_request(clone); <----
}
Here I think the request is being sent to the underlying device below the target (I think the .map_rq would be returning DM_MAPIO_REMAPPED for this IO). Now with "dm_dispatch_request()" deprecated, how would this be done now?
Additional question:
Also for bio based targets, there is a facility within target to allocate some space using the "per_bio_data_size", and then use that in the "map" callback using the "dm_per_bio_data()", do we have an equivalent mechanism for request based targets. I saw some patch where there are there is something about letting request based targets to use this ("per_io_data_size"), but I did not see anything the version of kernel that I have - Ubuntu 16.04 (4.4.0-92).
Thank you!
________________________________
From: Mike Snitzer <snitzer@redhat.com>
Sent: Wednesday, November 1, 2017 9:08:57 AM
To: Tariq Mustafa
Cc: dm-devel@redhat.com
Subject: Re: Replacement for dm_dispatch_request for older request based targets
On Wed, Nov 01 2017 at 2:23am -0400,
Tariq Mustafa <tmustafa@hotmail.com> wrote:
> Hello,
>
> I am trying to figure out what would be the appropriate replacement for
> "dm_dispatch_request()" on the newer kernel? This export has been removed
> (by commit - [1][dbf978]), what would be an equivalent call to submit the
> request.
dm_dispatch_request was renamed to dm_dispatch_clone_request (IIRC).
But are you asking what is the new export? There isn't one. There
should be no need for anything other than DM core (dm-rq.c) to call
these interfaces that are no longer exported.
Please explain what you're trying to do if you need more help.
Thanks,
Mike
[-- Attachment #1.2: Type: text/html, Size: 6500 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-11-01 18:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-01 6:23 Replacement for dm_dispatch_request for older request based targets Tariq Mustafa
2017-11-01 16:08 ` Mike Snitzer
2017-11-01 18:10 ` Tariq Mustafa
2017-11-01 18:54 ` Tariq Mustafa
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.