lkml.org 
[lkml]   [2017]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] iscsi-target: Convert timers to use timer_setup()
On Wed, Oct 25, 2017 at 12:01 PM, Kees Cook <keescook@chromium.org> wrote:
> sess->time2retain_timer.expires =
> (get_jiffies_64() + sess->sess_ops->DefaultTime2Retain * HZ);
> add_timer(&sess->time2retain_timer);
> cmd->dataout_timer.expires = (get_jiffies_64() + na->dataout_timeout * HZ);
> add_timer(&cmd->dataout_timer);
> np->np_login_timer.expires = (get_jiffies_64() + TA_LOGIN_TIMEOUT * HZ);
> add_timer(&np->np_login_timer);
> + timeout.timer.expires = (get_jiffies_64() + TA_LOGIN_TIMEOUT * HZ);
> + add_timer(&timeout.timer);
> conn->nopin_response_timer.expires =
> (get_jiffies_64() + na->nopin_response_timeout * HZ);
> add_timer(&conn->nopin_response_timer);
> conn->nopin_timer.expires = (get_jiffies_64() + na->nopin_timeout * HZ);
> add_timer(&conn->nopin_timer);
> conn->nopin_timer.expires = (get_jiffies_64() + na->nopin_timeout * HZ);
> add_timer(&conn->nopin_timer);

I assume you're trying to keep these diffs as small as possible, but I
imagine at some point the above can also be combined into a single
mod_timer.

Also, all the goofiness with the flags stuff seems like an antique
replacement for timer_pending:

> conn->nopin_response_timer_flags &= ~ISCSI_TF_STOP;
> conn->nopin_response_timer_flags |= ISCSI_TF_RUNNING;

\
 
 \ /
  Last update: 2017-10-25 14:42    [W:0.058 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site