<div dir="ltr"><div>I have known more request_timer_fn(). Thanks</div><div><br></div><div><div>I think helper function <b style="color:rgb(0,0,0);font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;font-size:14px;line-height:20px;white-space:nowrap">time_min_in_future() </b>function will return the nearest future time, right?</div><div>And, next_trigger_time is initialize now value, so always is same.</div><div><div id="main-content" class="" style="margin:0px;padding:0px;font-size:12px;color:rgb(51,51,51);font-family:Helvetica,&#39;\00b9d1\00c740  \00ace0\00b515&#39;,Verdana,serif;line-height:17.1429px"><div class="" style="margin:10px 0px;padding:0px;border:1px solid rgb(204,204,204);overflow:auto;border-radius:3px"><div class="" style="margin:0px;padding:0px;font-size:14px;line-height:20px;overflow:hidden;border-bottom-left-radius:3px;border-bottom-right-radius:3px;background-image:initial;background-repeat:initial"><div style="margin:0px;padding:0px"><div id="highlighter_381323" class="" style="margin:0px;padding:0px;width:1387px;overflow:auto;font-size:1em"><table border="0" cellpadding="0" cellspacing="0" style="border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:1387px;font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;min-height:inherit;background:0px 50%"><tbody style="border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;background:0px 50%"><tr style="border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;background:0px 50%"><td class="" style="border:0px;overflow:visible;border-radius:0px;float:none;height:auto;outline:0px;padding:0px 0px 0px 15px;vertical-align:baseline;width:1372px;font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;min-height:inherit;background:0px 50%"><div class="" title="Hint: double-click to select code" style="margin:15px 0px 0px;padding:0px 0px 15px;border-radius:0px;border:0px;float:none;height:auto;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:inherit;white-space:pre-wrap;background:0px 50%"><div class="" style="margin:0px;padding:0px 1em 0px 0px;border-radius:0px;border:0px;float:none;height:auto;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:inherit;white-space:nowrap;background-image:initial;background-repeat:initial"><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;font-weight:bold!important;color:rgb(0,102,153)!important;background:0px 50%">void</code> <code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;color:black!important;background:0px 50%">request_timer_fn(unsigned </code><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;font-weight:bold!important;color:rgb(0,102,153)!important;background:0px 50%">long</code> <code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;color:black!important;background:0px 50%">data)</code></div><div class="" style="margin:0px;padding:0px 1em 0px 0px;border-radius:0px;border:0px;float:none;height:auto;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:inherit;white-space:nowrap;background-image:initial;background-repeat:initial"><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;color:black!important;background:0px 50%">{</code></div><div class="" style="margin:0px;padding:0px 1em 0px 0px;border-radius:0px;border:0px;float:none;height:auto;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:inherit;white-space:nowrap;background-image:initial;background-repeat:initial"><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;background:0px 50%">    </code><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;font-weight:bold!important;color:rgb(0,102,153)!important;background:0px 50%">if</code> <code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;color:black!important;background:0px 50%">(dt) {</code></div><div class="" style="margin:0px;padding:0px 1em 0px 0px;border-radius:0px;border:0px;float:none;height:auto;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:inherit;white-space:nowrap;background-image:initial;background-repeat:initial"><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;color:black!important;background:0px 50%">...</code></div><div class="" style="margin:0px;padding:0px 1em 0px 0px;border-radius:0px;border:0px;float:none;height:auto;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:inherit;white-space:nowrap;background-image:initial;background-repeat:initial"><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;background:0px 50%">        </code><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;font-weight:bold!important;color:rgb(0,102,153)!important;background:0px 50%">if</code> <code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;color:black!important;background:0px 50%">(device-&gt;disk_state[NOW] &gt; D_FAILED) {</code></div><div class="" style="margin:0px;padding:0px 1em 0px 0px;border-radius:0px;border:0px;float:none;height:auto;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:inherit;white-space:nowrap;background-image:initial;background-repeat:initial"><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;background:0px 50%">            </code><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;color:black!important;background:0px 50%">next_trigger_time = <b>time_min_in_future</b>(now,</code></div><div class="" style="margin:0px;padding:0px 1em 0px 0px;border-radius:0px;border:0px;float:none;height:auto;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:inherit;white-space:nowrap;background-image:initial;background-repeat:initial"><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;background:0px 50%">                    </code><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;color:black!important;background:0px 50%">next_trigger_time, oldest_submit_jif + dt);         </code><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;color:rgb(0,130,0)!important;background:0px 50%">// 1st assign</code></div><div class="" style="margin:0px;padding:0px 1em 0px 0px;border-radius:0px;border:0px;float:none;height:auto;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:inherit;white-space:nowrap;background-image:initial;background-repeat:initial"><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;background:0px 50%">            </code><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;color:black!important;background:0px 50%">restart_timer = </code><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;font-weight:bold!important;color:rgb(0,102,153)!important;background:0px 50%">true</code><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;color:black!important;background:0px 50%">;</code></div><div class="" style="margin:0px;padding:0px 1em 0px 0px;border-radius:0px;border:0px;float:none;height:auto;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:inherit;white-space:nowrap;background-image:initial;background-repeat:initial"><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;background:0px 50%">        </code><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;color:black!important;background:0px 50%">}</code></div><div class="" style="margin:0px;padding:0px 1em 0px 0px;border-radius:0px;border:0px;float:none;height:auto;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:inherit;white-space:nowrap;background-image:initial;background-repeat:initial"><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;color:black!important;background:0px 50%">...</code></div><div class="" style="margin:0px;padding:0px 1em 0px 0px;border-radius:0px;border:0px;float:none;height:auto;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:inherit;white-space:nowrap;background-image:initial;background-repeat:initial"><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;background:0px 50%">    </code><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;color:black!important;background:0px 50%">}</code></div><div class="" style="margin:0px;padding:0px 1em 0px 0px;border-radius:0px;border:0px;float:none;height:auto;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:inherit;white-space:nowrap;background-image:initial;background-repeat:initial"><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;background:0px 50%">    </code><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;color:black!important;background:0px 50%">for_each_connection(connection, device-&gt;resource) {</code></div><div class="" style="margin:0px;padding:0px 1em 0px 0px;border-radius:0px;border:0px;float:none;height:auto;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:inherit;white-space:nowrap;background-image:initial;background-repeat:initial"><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;color:black!important;background:0px 50%">...</code></div><div class="" style="margin:0px;padding:0px 1em 0px 0px;border-radius:0px;border:0px;float:none;height:auto;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:inherit;white-space:nowrap;background-image:initial;background-repeat:initial"><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;background:0px 50%">        </code><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;color:black!important;background:0px 50%">next_trigger_time = <b>time_min_in_future</b>(now,</code></div><div class="" style="margin:0px;padding:0px 1em 0px 0px;border-radius:0px;border:0px;float:none;height:auto;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:inherit;white-space:nowrap;background-image:initial;background-repeat:initial"><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;background:0px 50%">                </code><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;color:black!important;background:0px 50%">next_trigger_time, pre_send_jif + ent);                 </code><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;color:rgb(0,130,0)!important;background:0px 50%">// 2nd assign</code></div><div class="" style="margin:0px;padding:0px 1em 0px 0px;border-radius:0px;border:0px;float:none;height:auto;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:inherit;white-space:nowrap;background-image:initial;background-repeat:initial"><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;color:black!important;background:0px 50%">...</code></div><div class="" style="margin:0px;padding:0px 1em 0px 0px;border-radius:0px;border:0px;float:none;height:auto;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:inherit;white-space:nowrap;background-image:initial;background-repeat:initial"><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;background:0px 50%">    </code><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;color:black!important;background:0px 50%">}</code></div><div class="" style="margin:0px;padding:0px 1em 0px 0px;border-radius:0px;border:0px;float:none;height:auto;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:inherit;white-space:nowrap;background-image:initial;background-repeat:initial"><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;color:black!important;background:0px 50%">...</code></div><div class="" style="margin:0px;padding:0px 1em 0px 0px;border-radius:0px;border:0px;float:none;height:auto;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:inherit;white-space:nowrap;background-image:initial;background-repeat:initial"><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;background:0px 50%">    </code><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;font-weight:bold!important;color:rgb(0,102,153)!important;background:0px 50%">if</code> <code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;color:black!important;background:0px 50%">(restart_timer) {</code></div><div class="" style="margin:0px;padding:0px 1em 0px 0px;border-radius:0px;border:0px;float:none;height:auto;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:inherit;white-space:nowrap;background-image:initial;background-repeat:initial"><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;background:0px 50%">        </code><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;color:black!important;background:0px 50%">next_trigger_time = <b>time_min_in_future</b>(now, next_trigger_time, now + et);       </code><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;color:rgb(0,130,0)!important;background:0px 50%">// 3rd assign</code></div><div class="" style="margin:0px;padding:0px 1em 0px 0px;border-radius:0px;border:0px;float:none;height:auto;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:inherit;white-space:nowrap;background-image:initial;background-repeat:initial"><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;color:black!important;background:0px 50%">...</code></div><div class="" style="margin:0px;padding:0px 1em 0px 0px;border-radius:0px;border:0px;float:none;height:auto;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:inherit;white-space:nowrap;background-image:initial;background-repeat:initial"><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;background:0px 50%">    </code><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;color:black!important;background:0px 50%">}</code></div><div class="" style="margin:0px;padding:0px 1em 0px 0px;border-radius:0px;border:0px;float:none;height:auto;outline:0px;overflow:visible;vertical-align:baseline;width:auto;min-height:inherit;white-space:nowrap;background-image:initial;background-repeat:initial"><code class="" style="font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;border-radius:0px;border:0px;float:none;height:auto;margin:0px;outline:0px;overflow:visible;padding:0px;vertical-align:baseline;width:auto;min-height:inherit;color:black!important;background:0px 50%">}</code></div></div></td></tr></tbody></table></div></div></div></div></div><div id="likes-and-labels-container" style="margin:10px 0px;padding:10px 0px;overflow:hidden;clear:both;color:rgb(51,51,51);font-family:Helvetica,&#39;\00b9d1\00c740  \00ace0\00b515&#39;,Verdana,serif;font-size:12px;line-height:17.1429px">Maybe, 3 assignments are always same, because now == next_trigger_time, which is the nearest. <br>So, if <span style="color:rgb(0,0,0);font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace;font-size:14px;line-height:20px;white-space:nowrap">restart_timer</span> &#39;s value is true, then loop continuously even dt or ent exists.</div></div></div><div id="likes-and-labels-container" style="margin:10px 0px;padding:10px 0px;overflow:hidden;clear:both;color:rgb(51,51,51);font-family:Helvetica,&#39;\00b9d1\00c740  \00ace0\00b515&#39;,Verdana,serif;font-size:12px;line-height:17.1429px">I don&#39;t know how to put the different thing.<br><br>Thanks.</div><div id="likes-and-labels-container" style="margin:10px 0px;padding:10px 0px;overflow:hidden;clear:both;color:rgb(51,51,51);font-family:Helvetica,&#39;\00b9d1\00c740  \00ace0\00b515&#39;,Verdana,serif;font-size:12px;line-height:17.1429px"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-03-11 20:00 GMT+09:00  <span dir="ltr">&lt;<a href="mailto:drbd-dev-request@lists.linbit.com" target="_blank">drbd-dev-request@lists.linbit.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send drbd-dev mailing list submissions to<br>
        <a href="mailto:drbd-dev@lists.linbit.com">drbd-dev@lists.linbit.com</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://lists.linbit.com/mailman/listinfo/drbd-dev" rel="noreferrer" target="_blank">http://lists.linbit.com/mailman/listinfo/drbd-dev</a><br>
or, via email, send a message with subject or body &#39;help&#39; to<br>
        <a href="mailto:drbd-dev-request@lists.linbit.com">drbd-dev-request@lists.linbit.com</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:drbd-dev-owner@lists.linbit.com">drbd-dev-owner@lists.linbit.com</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than &quot;Re: Contents of drbd-dev digest...&quot;<br>
<br>
<br>
Today&#39;s Topics:<br>
<br>
   1. Re: request_timer continuous loop if there is     disk-timeout<br>
      (Lars Ellenberg)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Fri, 11 Mar 2016 11:02:35 +0100<br>
From: Lars Ellenberg &lt;<a href="mailto:lars.ellenberg@linbit.com">lars.ellenberg@linbit.com</a>&gt;<br>
Subject: Re: [Drbd-dev] request_timer continuous loop if there is<br>
        disk-timeout<br>
To: <a href="mailto:drbd-dev@lists.linbit.com">drbd-dev@lists.linbit.com</a><br>
Message-ID: &lt;20160311100235.GD17669@soda.linbit&gt;<br>
Content-Type: text/plain; charset=utf-8<br>
<br>
On Fri, Mar 11, 2016 at 04:30:27PM +0900, ??? wrote:<br>
&gt; Hello.<br>
&gt; I&#39;m a software engineer in Mantech.<br>
&gt;<br>
&gt; In testing about disk-timeout property,<br>
&gt; if not default value, which will lead into a continuous loop.<br>
&gt;<br>
&gt; in request_timer_fn()<br>
&gt; ...<br>
&gt; if (device-&gt;disk_state[NOW] &gt; D_FAILED) {<br>
&gt; et = min_not_zero(et, dt);<br>
&gt; next_trigger_time = time_min_in_future(now,<br>
&gt; next_trigger_time, oldest_submit_jif + dt);<br>
&gt; restart_timer = true;<br>
&gt; }<br>
&gt; ...<br>
&gt; I think, if there is no request, next_trigger_time should be calculated<br>
&gt; below<br>
&gt; next_trigger_time = time_min_in_future(now,<br>
&gt; next_trigger_time + *dt*, oldest_submit_jif + dt);<br>
&gt;<br>
&gt; However, I can&#39;t be sure.<br>
<br>
&quot;dt&quot; : disk timeout<br>
&quot;et&quot; : effective timeout<br>
&quot;ent&quot; : effective network timeout<br>
&quot;now&quot; : well, now.<br>
&quot;next_trigger_time&quot; : when to trigger the next timer<br>
<br>
next_trigger_time is initialized to &quot;now&quot;.<br>
<br>
it gets adjusted using &quot;time_min_in_future()&quot;,<br>
which is this helper:<br>
static unsigned long time_min_in_future(unsigned long now,<br>
                unsigned long t1, unsigned long t2)<br>
{<br>
        t1 = time_after(now, t1) ? now : t1;<br>
        t2 = time_after(now, t2) ? now : t2;<br>
        return time_after(t1, t2) ? t2 : t1;<br>
}<br>
<br>
time_after is ((long)((b) - (a)) &lt; 0)), NOT &lt;=.<br>
<br>
next_trigger_time will become larger than now,<br>
or stay at its initial value, which is now.<br>
<br>
function ends with<br>
<br>
        if (restart_timer) {<br>
                next_trigger_time = time_min_in_future(now, next_trigger_time, now + et);<br>
                mod_timer(&amp;device-&gt;request_timer, next_trigger_time);<br>
        }<br>
<br>
so in case next_trigger_time will still be equal to now at the end of the<br>
function, it will be set to &quot;now + et&quot; before it is passed to mod_timer.<br>
<br>
et can only be zero if both network and disk timeout where zero,<br>
in which case the whole thing would not even be used,<br>
because that would mean timeouts are disabled.<br>
<br>
<br>
Besides that,<br>
I would be surprised if disk timeout in 9 worked properly yet.<br>
<br>
Also, disk timeout is evil in any case, and NOT TO BE USED<br>
(not even in 8.4, where it *does* work properly (&quot;as designed&quot;), afaik)<br>
<br>
Why? Because if it triggers, and the IO subsystem (&quot;disk&quot;) decides to<br>
still process the submitted request some time later,<br>
you&#39;d get stuff RDMA&#39;d to some random memory page which may well be meanwhile<br>
re-used for unrelated things. In which case we intentionally panic().<br>
<br>
But you knew that already.<br>
<br>
--<br>
: Lars Ellenberg<br>
: LINBIT | Keeping the Digital World Running<br>
: DRBD -- Heartbeat -- Corosync -- Pacemaker<br>
: R&amp;D, Integration, Ops, Consulting, Support<br>
<br>
DRBD? and LINBIT? are registered trademarks of LINBIT<br>
<br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
drbd-dev mailing list<br>
<a href="mailto:drbd-dev@lists.linbit.com">drbd-dev@lists.linbit.com</a><br>
<a href="http://lists.linbit.com/mailman/listinfo/drbd-dev" rel="noreferrer" target="_blank">http://lists.linbit.com/mailman/listinfo/drbd-dev</a><br>
<br>
<br>
End of drbd-dev Digest, Vol 133, Issue 7<br>
****************************************<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><img src="cid:image001.png@01D0F522.B2A586F0"><br><div><p style="margin:0cm 0cm 0.0001pt;background-image:initial;background-repeat:initial"><font face="verdana, sans-serif"><span style="font-size:10pt;color:black"><span lang="EN-US">기술연구소 </span><span lang="EN-US">                 Mobile : 010-4762-0519</span></span><span lang="EN-US" style="font-size:10.5pt;color:rgb(136,136,136)"></span></font></p><p style="margin:0cm 0cm 0pt"></p><p style="margin:0cm 0cm 0.0001pt;background-image:initial;background-repeat:initial"><font face="verdana, sans-serif"><b><span style="font-size:10.5pt;color:black">박 경 민<span lang="EN-US"> 차장</span></span></b><span style="font-size:10pt;color:black"><span lang="EN-US">              kmpak</span></span><span lang="EN-US" style="font-size:10pt;color:black">@<a href="http://mantech.co.kr/" style="color:rgb(17,85,204)" target="_blank">mantech.co.kr</a></span><span lang="EN-US" style="font-size:10.5pt;color:rgb(136,136,136)"></span></font></p><p style="margin:0cm 0cm 0.0001pt;line-height:21px"><font color="#000000" face="verdana, sans-serif"><span style="font-size:8pt;line-height:16px">서울특별시 성동구 성수일로<span lang="EN-US">4</span>길<span lang="EN-US"> 25 </span>서울숲코오롱디지털타워<span lang="EN-US"> 12</span>층<span lang="EN-US"> </span></span><span lang="EN-US" style="font-size:8pt;line-height:16px">      </span></font></p><p style="margin:0cm 0cm 0.0001pt;line-height:21px"><font color="#000000" face="verdana, sans-serif"><span lang="EN-US" style="font-size:8pt;line-height:16px">Fax : 02-575-4858 / Tel : (02) 2136-6978 (978)</span></font></p><p style="margin:0cm 0cm 0.0001pt;line-height:21px"><font color="#000000" face="verdana, sans-serif"><span lang="EN-US" style="font-size:8pt;line-height:16px"><span></span><span></span><img src="cid:image002.png@01D126A1.B8986400"><br></span></font></p></div></div></div></div></div></div></div></div></div></div></div>
</div>