public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH scsi-misc-2.6 00/04] scsi: misc timer fixes (reworked)
@ 2005-04-19 14:31 Tejun Heo
  2005-04-19 14:31 ` [PATCH scsi-misc-2.6 01/04] scsi: make scsi_send_eh_cmnd use its own timer instead of scmd->eh_timeout Tejun Heo
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Tejun Heo @ 2005-04-19 14:31 UTC (permalink / raw)
  To: James.Bottomley; +Cc: linux-scsi, linux-kernel

 Hello, James.

 This patchset contains the following patches from the previous timer
update patchset.

 02_scsi_timer_eh_timer_fix.patch
 03_scsi_timer_dispatch_race_fix.patch
 04_scsi_timer_remove_delete_timer_from_reset_provider.patch

 eh_timer_fix is reworked as you suggested and split into two
patches. (#01 and #02)

 In the current bk repository, aic7xxx_osm.c has been updated to not
use scsi_add_timer() but aic79xx_osm.c hasn't been yet.  I guess it's
gonna be updated sometime soon, so I've dropped the aic7xxx update
patch.

 As aic79xx_osm.c still uses scsi_add_timer(), timer API update
patches are omitted.  I'll repost them once aic79xx_osm.c is
converted.

 dispatch_race_fix and remove_delete_timer_from_reset_provider patches
are the same as in the previous posting.  If you've already applied
them, just ignore those two (#03 and #04).

 The following bugs are fixed.

 * Race condition between eh and normal completion path for eh_timer
 * scsi_delete_timer() race in scsi_queue_insert()

[ Start of patch descriptions ]

01_scsi_timer_eh_timer_fix.patch
	: make scsi_send_eh_cmnd use its own timer instead of scmd->eh_timeout

	scmd->eh_timeout is used to resolve the race between command
	completion and timeout.  However, during error handling,
	scsi_send_eh_cmnd uses scmd->eh_timeout.  This creates a race
	condition between eh and normal completion for a request which
	has timed out and in the process of error handling.  If the
	request completes while scmd->eh_timeout is being used by eh,
	eh timeout is lost and the command will be handled by both eh
	and completion path.  This patch fixes the race by making
	scsi_send_eh_cmnd() use its own timer.

	This patch adds shost->eh_timeout field.  The name of the
	field equals scmd->eh_timeout which is used for normal command
	timeout.  As this can be confusing, renaming scmd->eh_timeout
	to something like scmd->cmd_timeout would be good.

	Reworked such that timeout race window is kept at minimal
	level as pointed out by James Bottomley.

02_scsi_timer_eh_timer_remove_spurious_if.patch
	: remove spurious if tests from scsi_eh_{times_out|done}

	If tests which check if eh_action isn't NULL in both functions
	are always true.  Remove the if's.

03_scsi_timer_dispatch_race_fix.patch
	: remove a timer race in scsi_queue_insert()

	scsi_queue_insert() has four callers.  Three callers call with
	timer disabled and one (the second invocation in
	scsi_dispatch_cmd()) calls with timer activated.
	scsi_queue_insert() used to always call scsi_delete_timer()
	and ignore the return value.  This results in race with timer
	expiration.  Remove scsi_delete_timer() call from
	scsi_queue_insert() and make the caller delete timer and check
	the return value.

04_scsi_timer_remove_delete_timer_from_reset_provider.patch
	: remove unnecessary scsi_delete_timer() call in scsi_reset_provider()

	scsi_reset_provider() calls scsi_delete_timer() on exit which
	isn't necessary.  Remove it.

[ End of patch descriptions ]

 Thanks.


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2005-04-27 11:50 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-19 14:31 [PATCH scsi-misc-2.6 00/04] scsi: misc timer fixes (reworked) Tejun Heo
2005-04-19 14:31 ` [PATCH scsi-misc-2.6 01/04] scsi: make scsi_send_eh_cmnd use its own timer instead of scmd->eh_timeout Tejun Heo
2005-04-24 22:22   ` James Bottomley
2005-04-24 23:46     ` Tejun Heo
2005-04-25 18:09       ` James Bottomley
2005-04-27  2:22         ` Tejun Heo
2005-04-27  5:34           ` James Bottomley
2005-04-27 11:50             ` Tejun Heo
2005-04-19 14:31 ` [PATCH scsi-misc-2.6 02/04] scsi: remove spurious if tests from scsi_eh_{times_out|done} Tejun Heo
2005-04-19 14:31 ` [PATCH scsi-misc-2.6 03/04] scsi: remove a timer race in scsi_queue_insert() Tejun Heo
2005-04-19 14:31 ` [PATCH scsi-misc-2.6 04/04] scsi: remove unnecessary scsi_delete_timer() call in scsi_reset_provider() Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox