* [Kernel-janitors] [PATCH] s390/zfcp_erp: replace schedule_timeout()
@ 2004-07-27 22:17 Nishanth Aravamudan
0 siblings, 0 replies; only message in thread
From: Nishanth Aravamudan @ 2004-07-27 22:17 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 1832 bytes --]
I would appreciate any comments from the janitors list. This is one (of
many) cases where I made a decision about replacing
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(some_time);
with
msleep(jiffies_to_msecs(some_time));
msleep() is not exactly the same as the previous code, but I only did
this replacement where I thought long delays were *desired*. If this is
not the case here, then just disregard this patch.
Thanks,
Nish
Applys-to: 2.6.7
Description: Replace schedule_timeout() with msleep() to guarantee the task
delays as desired.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
--- linux-vanilla/drivers/s390/scsi/zfcp_erp.c 2004-06-15 22:19:01.000000000 -0700
+++ linux-dev/drivers/s390/scsi/zfcp_erp.c 2004-07-27 15:16:39.000000000 -0700
@@ -2158,7 +2158,6 @@ static int
zfcp_erp_adapter_strategy(struct zfcp_erp_action *erp_action)
{
int retval;
- unsigned long timeout;
struct zfcp_adapter *adapter = erp_action->adapter;
retval = zfcp_erp_adapter_strategy_close(erp_action);
@@ -2180,9 +2179,7 @@ zfcp_erp_adapter_strategy(struct zfcp_er
* timeout = ZFCP_TYPE2_RECOVERY_TIME;
* __ZFCP_WAIT_EVENT_TIMEOUT(timeout, 0);
*/
- timeout = ZFCP_TYPE2_RECOVERY_TIME;
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(timeout);
+ msleep(jiffies_to_msecs(ZFCP_TYPE2_RECOVERY_TIME));
}
return retval;
@@ -2548,8 +2545,7 @@ zfcp_erp_adapter_strategy_open_fsf_xconf
ZFCP_LOG_DEBUG("host connection still initialising... "
"waiting and retrying...\n");
/* sleep a little bit before retry */
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(ZFCP_EXCHANGE_CONFIG_DATA_SLEEP);
+ msleep(jiffies_to_msecs(ZFCP_EXCHANGE_CONFIG_DATA_SLEEP));
}
} while ((retries--) &&
atomic_test_mask(ZFCP_STATUS_ADAPTER_HOST_CON_INIT,
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-07-27 22:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-27 22:17 [Kernel-janitors] [PATCH] s390/zfcp_erp: replace schedule_timeout() Nishanth Aravamudan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).