From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tariq Mustafa Subject: Replacement for dm_dispatch_request for older request based targets Date: Wed, 1 Nov 2017 06:23:25 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2882594280827124160==" Return-path: Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: "dm-devel@redhat.com" List-Id: dm-devel.ids --===============2882594280827124160== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_BY2PR18MB03446D72103BA92941E3CF46C25F0BY2PR18MB0344namp_" --_000_BY2PR18MB03446D72103BA92941E3CF46C25F0BY2PR18MB0344namp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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]), what would be an equivalent call to sub= mit the request. Thanks in advance. Regards, Tariq --_000_BY2PR18MB03446D72103BA92941E3CF46C25F0BY2PR18MB0344namp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

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= ]), what would be an equivalent call to submit the request.


Thanks in advance.


Regards,

Tariq

--_000_BY2PR18MB03446D72103BA92941E3CF46C25F0BY2PR18MB0344namp_-- --===============2882594280827124160== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============2882594280827124160==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Snitzer Subject: Re: Replacement for dm_dispatch_request for older request based targets Date: Wed, 1 Nov 2017 12:08:57 -0400 Message-ID: <20171101160857.GA25886@redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: Tariq Mustafa Cc: "dm-devel@redhat.com" List-Id: dm-devel.ids On Wed, Nov 01 2017 at 2:23am -0400, Tariq Mustafa 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tariq Mustafa Subject: Re: Replacement for dm_dispatch_request for older request based targets Date: Wed, 1 Nov 2017 18:10:58 +0000 Message-ID: References: , <20171101160857.GA25886@redhat.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0733891375843044665==" Return-path: In-Reply-To: <20171101160857.GA25886@redhat.com> Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: Mike Snitzer Cc: "dm-devel@redhat.com" List-Id: dm-devel.ids --===============0733891375843044665== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_BY2PR18MB03442D771B14B459A7319095C25F0BY2PR18MB0344namp_" --_000_BY2PR18MB03442D771B14B459A7319095C25F0BY2PR18MB0344namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Thanks Mike. I was looking at the request based crypt, and saw the followin= g code; static void req_crypt_dec_pending_encrypt(struct req_dm_crypt_io *io) { int error =3D 0; struct request *clone =3D NULL; if (io) { error =3D io->error; if (io->cloned_request) { clone =3D 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 t= arget (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 s= ome space using the "per_bio_data_size", and then use that in the "map" cal= lback 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 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 ta= rgets On Wed, Nov 01 2017 at 2:23am -0400, Tariq Mustafa wrote: > Hello, > > I am trying to figure out what would be the appropriate replacement fo= r > "dm_dispatch_request()" on the newer kernel? This export has been remo= ved > (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 --_000_BY2PR18MB03442D771B14B459A7319095C25F0BY2PR18MB0344namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Thanks Mike. I was looking at the request based crypt, and saw the follo= wing code;


static void req_c=
rypt_dec_pending_encrypt(struct req_dm_crypt_io *io)=0A=
{=0A=
	int error =3D 0;=0A=
	struct request *clone =3D NULL;=0A=
=0A=
	if (io) {=0A=
		error =3D io->error;=0A=
		if (io->cloned_request) {=0A=
			clone =3D io->cloned_request;=0A=
		} else {=0A=
                ....
        	}=0A=
	} else {
                .=
...=0A=
	}=0A=
=0A=
	atomic_dec(&io->pending);=0A=
=0A=
	if (error < 0)=0A=
		dm_kill_unmapped_request(clone, error);=0A=
	else=0A=
		dm_dispatch_request(clone);    <----=0A=
}

Here I think the =
request is being sent to the underlying device below the target (I think th=
e .map_rq would be returning DM_MAPIO_REMAPPED for this IO). Now wit=
h "dm_dispatch_request()" deprecated, how would this be done now?=

Additional=
 question:
Also for b=
io 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 equi=
valent mechanism for request based targets. I saw some patch where there ar=
e 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 <sn= itzer@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 b= ased 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 appropri= ate replacement for
>    "dm_dispatch_request()" on the newer kerne= l? This export has been removed
>    (by commit - [1][dbf978]), what would be an equivale= nt 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.  The= re
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
--_000_BY2PR18MB03442D771B14B459A7319095C25F0BY2PR18MB0344namp_-- --===============0733891375843044665== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============0733891375843044665==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tariq Mustafa Subject: Re: Replacement for dm_dispatch_request for older request based targets Date: Wed, 1 Nov 2017 18:54:20 +0000 Message-ID: References: , <20171101160857.GA25886@redhat.com>, Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4688717293992642863==" Return-path: In-Reply-To: Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: Mike Snitzer Cc: "dm-devel@redhat.com" List-Id: dm-devel.ids --===============4688717293992642863== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_BY2PR18MB0344A93463B7C7A3EDEAA878C25F0BY2PR18MB0344namp_" --_000_BY2PR18MB0344A93463B7C7A3EDEAA878C25F0BY2PR18MB0344namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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 on behalf o= f Tariq Mustafa 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 reque= st based targets Thanks Mike. I was looking at the request based crypt, and saw the followin= g code; static void req_crypt_dec_pending_encrypt(struct req_dm_crypt_io *io) { int error =3D 0; struct request *clone =3D NULL; if (io) { error =3D io->error; if (io->cloned_request) { clone =3D 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 t= arget (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 s= ome space using the "per_bio_data_size", and then use that in the "map" cal= lback 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 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 ta= rgets On Wed, Nov 01 2017 at 2:23am -0400, Tariq Mustafa wrote: > Hello, > > I am trying to figure out what would be the appropriate replacement fo= r > "dm_dispatch_request()" on the newer kernel? This export has been remo= ved > (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 --_000_BY2PR18MB0344A93463B7C7A3EDEAA878C25F0BY2PR18MB0344namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Sorry, here is a correction to my last comment;


From: dm-devel-bounces@redh= at.com <dm-devel-bounces@redhat.com> on behalf of Tariq Mustafa <t= mustafa@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 olde= r request based targets
 

Thanks Mike. I was looking at the request based crypt, and saw the follo= wing code;


static void req_c=
rypt_dec_pending_encrypt(struct req_dm_crypt_io *io)=0A=
{=0A=
	int error =3D 0;=0A=
	struct request *clone =3D NULL;=0A=
=0A=
	if (io) {=0A=
		error =3D io->error;=0A=
		if (io->cloned_request) {=0A=
			clone =3D io->cloned_request;=0A=
		} else {=0A=
                ....
        	}=0A=
	} else {
                .=
...=0A=
	}=0A=
=0A=
	atomic_dec(&io->pending);=0A=
=0A=
	if (error < 0)=0A=
		dm_kill_unmapped_request(clone, error);=0A=
	else=0A=
		dm_dispatch_request(clone);    <----=0A=
}

Here I think the =
request is being sent to the underlying device below the target (I think th=
e .map_rq would be returning DM_MAPIO_REMAPPED for this IO). Now wit=
h "dm_dispatch_request()" deprecated, how would this be done now?=

Additional=
 question:
Also for b=
io 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 equi=
valent mechanism for request based targets. I saw some patch where there ar=
e 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 <sn= itzer@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 b= ased 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 appropri= ate replacement for
>    "dm_dispatch_request()" on the newer kerne= l? This export has been removed
>    (by commit - [1][dbf978]), what would be an equivale= nt 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.  The= re
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
--_000_BY2PR18MB0344A93463B7C7A3EDEAA878C25F0BY2PR18MB0344namp_-- --===============4688717293992642863== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============4688717293992642863==--