<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p>Thanks Mike. I was looking at the request based crypt, and saw the following code;</p>
<p><br>
</p>
<pre style="word-wrap:break-word; white-space:pre-wrap">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 {
                ....</pre>
<pre style="word-wrap:break-word; white-space:pre-wrap">                }
        } else {</pre>
<pre style="word-wrap:break-word; white-space:pre-wrap">                ....
        }

        atomic_dec(&io->pending);

        if (error < 0)
                dm_kill_unmapped_request(clone, error);
        else
                dm_dispatch_request(clone);    <----
}</pre>
<pre style="word-wrap:break-word; white-space:pre-wrap"><br></pre>
<pre style="word-wrap:break-word; white-space:pre-wrap">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)<span style="font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">. Now with "dm_dispatch_request()" deprecated, how would this be done now?</span></pre>
<pre style="word-wrap:break-word; white-space:pre-wrap"><span style="font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt"><br></span></pre>
<pre style="word-wrap:break-word; white-space:pre-wrap"><span style="font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">Additional question:</span></pre>
<pre style="word-wrap:break-word; white-space:pre-wrap"><span style="font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">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).</span></pre>
<pre style="word-wrap:break-word; white-space:pre-wrap"><span style="font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt"><br></span></pre>
<pre style="word-wrap:break-word; white-space:pre-wrap"><span style="font-family:Calibri,Helvetica,sans-serif,Helvetica,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:12pt">Thank you!</span></pre>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Mike Snitzer <snitzer@redhat.com><br>
<b>Sent:</b> Wednesday, November 1, 2017 9:08:57 AM<br>
<b>To:</b> Tariq Mustafa<br>
<b>Cc:</b> dm-devel@redhat.com<br>
<b>Subject:</b> Re: Replacement for dm_dispatch_request for older request based targets</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">On Wed, Nov 01 2017 at  2:23am -0400,<br>
Tariq Mustafa <tmustafa@hotmail.com> wrote:<br>
<br>
>    Hello,<br>
> <br>
>    I am trying to figure out what would be the appropriate replacement for<br>
>    "dm_dispatch_request()" on the newer kernel? This export has been removed<br>
>    (by commit - [1][dbf978]), what would be an equivalent call to submit the<br>
>    request.<br>
<br>
dm_dispatch_request was renamed to dm_dispatch_clone_request (IIRC).<br>
<br>
But are you asking what is the new export?  There isn't one.  There<br>
should be no need for anything other than DM core (dm-rq.c) to call<br>
these interfaces that are no longer exported.<br>
<br>
Please explain what you're trying to do if you need more help.<br>
<br>
Thanks,<br>
Mike<br>
</div>
</span></font>
</body>
</html>