Re: [PATCH scsi-misc-2.6 02/07] scsi: make scsi_send_eh_cmnd use its own timer instead of scmd-eh_timeout

2005-04-10 Thread Tejun Heo
scsi_send_eh_cmnd() use its own timer. Signed-off-by: Tejun Heo [EMAIL PROTECTED] scsi_error.c | 64 ++- scsi_priv.h |1 2 files changed, 20 insertions(+), 45 deletions(-) Index: scsi-reqfn-export/drivers/scsi/scsi_error.c

Re: [PATCH scsi-misc-2.6 05/07] scsi: unexport scsi_{add|delete}_timer()

2005-04-10 Thread Tejun Heo
() routines and also removes @complete argument from scsi_add_timer(). The change makes the use of scsi_times_out() confined in scsi_error.c, so move it upward such that no prototype is needed and make it static. Signed-off-by: Tejun Heo [EMAIL PROTECTED] drivers/scsi

Re: [PATCH scsi-misc-2.6 01/04] scsi: replace REQ_SPECIAL with REQ_SOFTBARRIER in scsi_init_io()

2005-04-10 Thread Tejun Heo
for half-prepp'ed requests. So, replace REQ_SPECIAL with REQ_SOFTBARRIER. Signed-off-by: Tejun Heo [EMAIL PROTECTED] scsi_lib.c |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: scsi-reqfn-export/drivers/scsi/scsi_lib.c

Re: [PATCH scsi-misc-2.6 03/04] scsi: make scsi_requeue_request() use blk_requeue_request()

2005-04-10 Thread Tejun Heo
. This patch makes scsi_requeue_request() use blk_requeue_request() and explicitly set REQ_SOFTBARRIER. As REQ_SPECIAL now means special requests, the flag is not set on requeue. Signed-off-by: Tejun Heo [EMAIL PROTECTED] scsi_lib.c |8 +++- 1 files changed, 7

Re: [PATCH scsi-misc-2.6 04/04] scsi: remove requeue feature from blk_insert_request()

2005-04-10 Thread Tejun Heo
blk_insert_request(). Only special requests should be queued with blk_insert_request(). All requeueing should go through blk_requeue_request(). Signed-off-by: Tejun Heo [EMAIL PROTECTED] drivers/block/ll_rw_blk.c | 20 ++-- drivers/block/paride/pd.c |2 +- drivers/block

Re: [PATCH scsi-misc-2.6 02/04] scsi: make scsi_queue_insert() use blk_requeue_request()

2005-04-10 Thread Tejun Heo
of the function is added right above scsi_queue_insert(). This is temporary, as later requeue path consolidation patchset removes scsi_queue_insert(). By adding temporary prototype, we can do away with unnecessary changes. Signed-off-by: Tejun Heo [EMAIL PROTECTED

[PATCH linux-misc-2.6] scsi: remove volatile from scsi data structures

2005-04-09 Thread Tejun Heo
. Signed-off-by: Tejun Heo [EMAIL PROTECTED] Index: scsi-reqfn-export/include/scsi/scsi_device.h === --- scsi-reqfn-export.orig/include/scsi/scsi_device.h 2005-04-10 13:03:14.0 +0900 +++ scsi-reqfn-export/include/scsi

Re: [OOPS] 2.6.11 - NMI lockup with CFQ scheduler

2005-04-06 Thread Tejun Heo
Jens Axboe wrote: On Wed, Apr 06 2005, Arjan van de Ven wrote: @@ -324,6 +334,7 @@ issue_flush_fn *issue_flush_fn; prepare_flush_fn*prepare_flush_fn; end_flush_fn*end_flush_fn; + release_queue_data_fn *release_queue_data_fn; /*

Re: [PATCH scsi-misc-2.6 01/13] scsi: don't use blk_insert_request() for requeueing

2005-04-01 Thread Tejun Heo
Greetings, James. On Fri, Apr 01, 2005 at 12:09:48PM -0600, James Bottomley wrote: On Fri, 2005-04-01 at 14:01 +0900, Tejun Heo wrote: Well, REQ_SPECIAL is the signal to the mid-layer that we've allocated the resources necessary to process the command, so in practice it will be turned

Question about scsi_device_online() usage in mptscsih

2005-04-01 Thread Tejun Heo
Hello, Eric. Hello, James. I've been working on new SCSI state model and was checking on scsi_device_online() users. As the state model is going to change, I need to audit device state usages in lldd's and I'm having difficult time understanding why scsi_device_online() is used in mptscsih.

Re: [PATCH scsi-misc-2.6 01/13] scsi: don't use blk_insert_request() for requeueing

2005-03-31 Thread Tejun Heo
unchanged. Signed-off-by: Tejun Heo [EMAIL PROTECTED] drivers/block/ll_rw_blk.c | 20 +-- drivers/block/paride/pd.c |2 drivers/block/sx8.c |4 drivers/scsi/scsi_lib.c | 238 +++--- include/linux/blkdev.h|2 5 files changed, 133

Re: [PATCH scsi-misc-2.6 04/13] scsi: remove meaningless volatile qualifiers from structure definitions

2005-03-31 Thread Tejun Heo
. Signed-off-by: Tejun Heo [EMAIL PROTECTED] scsi_device.h |3 ++- scsi_host.h | 10 -- 2 files changed, 10 insertions(+), 3 deletions(-) Index: scsi-export/include/scsi/scsi_device.h === --- scsi-export.orig/include/scsi

Re: [PATCH scsi-misc-2.6 11/13] scsi: add reprep arg to scsi_requeue_command() and make it public

2005-03-31 Thread Tejun Heo
11_scsi_make_requeue_command_public.patch Add reprep argument to scsi_requeue_command(), remove redundant q argument, add code to set cmd-state/owner, and make the function public. This patch is preparation for consolidating requeue paths. Signed-off-by: Tejun

Re: [PATCH scsi-misc-2.6 12/13] scsi: replace scsi_queue_insert() with scsi_requeue_command()

2005-03-31 Thread Tejun Heo
), and make scsi_eh_flush_done_q() use scsi_retry_command(). While at it, remove leading and tailing empty comment lines from trivial comments. As scsi_queue_insert() has no users now, kill it. Signed-off-by: Tejun Heo [EMAIL PROTECTED] scsi.c | 25

Re: [PATCH scsi-misc-2.6 01/13] scsi: don't use blk_insert_request() for requeueing

2005-03-31 Thread Tejun Heo
Hello, James. On Thu, Mar 31, 2005 at 11:53:20AM -0600, James Bottomley wrote: On Thu, 2005-03-31 at 18:07 +0900, Tejun Heo wrote: 01_scsi_no_REQ_SPECIAL_on_requeue.patch blk_insert_request() has 'reinsert' argument, which, when set, turns on REQ_SPECIAL and REQ_SOFTBARRIER

Re: [PATCH scsi-misc-2.6 02/13] scsi: don't turn on REQ_SPECIAL on sgtable allocation failure.

2005-03-31 Thread Tejun Heo
Hello, James. On Thu, Mar 31, 2005 at 11:53:45AM -0600, James Bottomley wrote: On Thu, 2005-03-31 at 18:08 +0900, Tejun Heo wrote: Don't turn on REQ_SPECIAL on sgtable allocation failure. This was the last place where REQ_SPECIAL is turned on for normal requests. If you do

Re: [PATCH scsi-misc-2.6 04/13] scsi: remove meaningless volatile qualifiers from structure definitions

2005-03-31 Thread Tejun Heo
Hello, Chritoph. On Thu, Mar 31, 2005 at 11:11:45AM +0100, Christoph Hellwig wrote: On Thu, Mar 31, 2005 at 06:08:10PM +0900, Tejun Heo wrote: struct list_headsiblings; /* list of all devices on this host */ struct list_headsame_target_siblings; /* just the devices sharing

Re: [PATCH scsi-misc-2.6 05/13] scsi: remove a timer race from scsi_queue_insert() and cleanup timer

2005-03-31 Thread Tejun Heo
Hello, Chritoph. On Thu, Mar 31, 2005 at 11:13:53AM +0100, Christoph Hellwig wrote: /* Queue the command and wait for it to complete */ /* Abuse eh_timeout in the scsi_cmnd struct for our purposes */ init_timer(cmd-eh_timeout); +

Re: [PATCH scsi-misc-2.6 08/13] scsi: move request preps in other places into prep_fn()

2005-03-31 Thread Tejun Heo
Hello, Christoph. On Thu, Mar 31, 2005 at 11:20:40AM +0100, Christoph Hellwig wrote: +/* + * Macro to determine the size of SCSI command. This macro takes vendor + * unique commands into account. SCSI commands in groups 6 and 7 are + * vendor unique and we will depend upon the command

Re: [PATCH scsi-misc-2.6 09/13] scsi: in scsi_prep_fn(), remove bogus comments clean up

2005-03-31 Thread Tejun Heo
Hello, James. On Thu, Mar 31, 2005 at 12:02:20PM -0600, James Bottomley wrote: On Thu, 2005-03-31 at 18:08 +0900, Tejun Heo wrote: -* come up when there is a medium error. We have to treat -* these two cases differently. We differentiate by looking -* at request-cmd

Re: [PATCH scsi-misc-2.6 11/13] scsi: add reprep arg to scsi_requeue_command() and make it public

2005-03-31 Thread Tejun Heo
Hello, Christoph. On Thu, Mar 31, 2005 at 11:32:03AM +0100, Christoph Hellwig wrote: - * Arguments: q - queue to operate on - * cmd - command that may need to be requeued. + * Arguments: cmd - command that may need to be requeued. + * reprep -

Re: [PATCH scsi-misc-2.6 10/13] scsi: rewrite scsi_request_fn()

2005-03-31 Thread Tejun Heo
Hello, Christoph. On Thu, Mar 31, 2005 at 12:14:16PM +0100, Christoph Hellwig wrote: the changes look good to me (although I haven't tested any of your patches yet), but the code flow is rather confusing. What do you think about the not even compile version of scsi_request_fn() below that

Re: [PATCH scsi-misc-2.6 08/08] scsi: fix hot unplug sequence

2005-03-25 Thread Tejun Heo
Hello, James. James Bottomley wrote: On Fri, 2005-03-25 at 14:38 +0900, Tejun Heo wrote: We have users of scsi_do_req() other than scsi_wait_req() and they use different done() functions to do different things. I've checked other done functions and none uses contents inside the passed

Re: [PATCH scsi-misc-2.6 08/08] scsi: fix hot unplug sequence

2005-03-24 Thread Tejun Heo
Hi, On Thu, Mar 24, 2005 at 11:02:45PM -0600, James Bottomley wrote: On Fri, 2005-03-25 at 12:15 +0900, Tejun Heo wrote: I think I found the cause. Special requests submitted using scsi_do_req() never initializes -end_io(). Normally, SCSI midlayer terminates special requests inside

Re: [PATCH scsi-misc-2.6 07/08] scsi: remove bogus {get|put}_device() calls

2005-03-23 Thread Tejun Heo
Hi, James Bottomley wrote: On Wed, 2005-03-23 at 11:14 +0900, Tejun Heo wrote: So, basically, SCSI high-level object (scsi_disk) and mid-level object (scsi_device) are reference counted by users, not the requests they submit. Reference count cannot go zero

[PATCH scsi-misc-2.6 00/08] scsi: small fixes cleanups

2005-03-22 Thread Tejun Heo
Hello, James. Hello, Jens. These are series of small fixes cleanups. The last two patches deal with reference counting and hot unplugging oops. Patches are against scsi-misc-2.6 tree (this is the devel tree, right?). Jens, please try #08 and tell me if you still get oops. AFAICT,

Re: [PATCH scsi-misc-2.6 01/08] scsi: remove unused bounce-buffer release path

2005-03-22 Thread Tejun Heo
01_scsi_remove_scsi_release_buffers.patch Buffer bouncing hasn't been done inside the scsi midlayer for quite sometime now, but bounce-buffer release paths are still around. This patch removes these unused paths. Signed-off-by: Tejun Heo [EMAIL PROTECTED] scsi_lib.c

Re: [PATCH scsi-misc-2.6 08/08] scsi: fix hot unplug sequence

2005-03-22 Thread Tejun Heo
scsi_remove_host() call scsi_host_cancel() first such that the host is first transited into cancel state and all requests of all devices are killed, and then, the devices are removed. This patch fixes the oops in eh after hot-unplugging bug. Signed-off-by: Tejun Heo [EMAIL

Re: [PATCH scsi-misc-2.6 06/08] scsi: remove meaningless scsi_cmnd-serial_number_at_timeout field

2005-03-22 Thread Tejun Heo
and -serial_number doesn't have any special meaning anymore, update comments above -serial_number accordingly. Once we remove all uses of this field from all lldd's, this field should go. Signed-off-by: Tejun Heo [EMAIL PROTECTED] drivers/scsi/BusLogic.c

Re: [PATCH scsi-misc-2.6 04/08] scsi: remove meaningless volatile qualifiers from structure definitions

2005-03-22 Thread Tejun Heo
. Signed-off-by: Tejun Heo [EMAIL PROTECTED] drivers/scsi/scsi_error.c |6 +- include/scsi/scsi_device.h |2 +- include/scsi/scsi_host.h |4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) Index: scsi-export/drivers/scsi/scsi_error.c

Re: [PATCH scsi-misc-2.6 05/08] scsi: remove a timer race from scsi_queue_insert() and cleanup timer

2005-03-22 Thread Tejun Heo
is always true and the test is somewhat misleading. Signed-off-by: Tejun Heo [EMAIL PROTECTED] aic7xxx/aic79xx_osm.c |1 + aic7xxx/aic7xxx_osm.c |1 + scsi.c|7 --- scsi_error.c | 24 +++- scsi_lib.c|6

Re: [PATCH scsi-misc-2.6 07/08] scsi: remove bogus {get|put}_device() calls

2005-03-22 Thread Tejun Heo
and misleading. In addition, get_device() cannot synchronize 1-0 and 0-1 transitions and always returns the device pointer given as the argument. The == NULL tests are just misleading. Signed-off-by: Tejun Heo [EMAIL PROTECTED] scsi.c |9 + scsi_lib.c

Re: [PATCH scsi-misc-2.6 02/08] scsi: don't use blk_insert_request() for requeueing

2005-03-22 Thread Tejun Heo
. Signed-off-by: Tejun Heo [EMAIL PROTECTED] drivers/block/ll_rw_blk.c | 20 +-- drivers/block/paride/pd.c |2 drivers/block/sx8.c |4 drivers/scsi/scsi_lib.c | 238 +++--- include/linux/blkdev.h|2 5 files changed, 133

Re: [PATCH scsi-misc-2.6 04/08] scsi: remove meaningless volatile qualifiers from structure definitions

2005-03-22 Thread Tejun Heo
Hello, guys. On Tue, Mar 22, 2005 at 11:22:23PM -0500, Jeff Garzik wrote: James Bottomley wrote: On Wed, 2005-03-23 at 11:14 +0900, Tejun Heo wrote: scsi_device-device_busy, Scsi_Host-host_busy and -host_failed have volatile qualifiers, but the qualifiers don't serve any

Re: [PATCH scsi-misc-2.6 01/08] scsi: remove unused bounce-buffer release path

2005-03-22 Thread Tejun Heo
Hello, James. James Bottomley wrote: On Wed, 2005-03-23 at 11:14 +0900, Tejun Heo wrote: 01_scsi_remove_scsi_release_buffers.patch Buffer bouncing hasn't been done inside the scsi midlayer for quite sometime now, but bounce-buffer release paths are still around

[PATCH] driver model/scsi: synchronize pm calls with probe/remove

2005-03-21 Thread Tejun Heo
each bus's subsys rwsem inside. Signed-off-by: Tejun Heo [EMAIL PROTECTED] # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2005/03/21 17:22:41+09:00 [EMAIL PROTECTED] # device_pm_down_read_bus() implemented. # # drivers/scsi/sd.c # 2005/03/21 17:22:33+09:00 [EMAIL

Re: [PATCH] driver model/scsi: synchronize pm calls with probe/remove

2005-03-21 Thread Tejun Heo
Hi, Dmitry. Dmitry Torokhov wrote: On Mon, 21 Mar 2005 18:18:46 +0900, Tejun Heo [EMAIL PROTECTED] wrote: Hello, Dmitry, Mochel and James. I've been looking at sd code and found seemingly bogus 'if (!sdkp)' tests with /* this can happen */ comment. I've digged changelog and found out

<    2   3   4   5   6   7