[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

[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

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

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 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 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 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: [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; /*

[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

[PATCH scsi-misc-2.6] scsi: scsi_send_eh_cmnd() cleanup

2005-04-10 Thread Tejun Heo
Hello, James. This patch makes scsi_send_eh_cmnd() use sdev and shost instead of referencing them through scmd- everytime. Following timer cleanup patchset assumes this patch is applied. Signed-off-by: Tejun Heo [EMAIL PROTECTED] Index: scsi-reqfn-export/drivers/scsi/scsi_error.c

[PATCH scsi-misc-2.6 00/07] scsi: timer updates

2005-04-10 Thread Tejun Heo
Hello, James, Jens and Christoph. This patchset removes misuses of scmd-eh_timeout and unexports SCSI timer interface such that no one can misuse it anymore. #02 assumes that the preceding scsi_send_eh_cmnd() patch is applied. Tested and worked for me. The following bugs are fixed. * Race

Re: [PATCH scsi-misc-2.6 04/07] scsi: remove unnecessary scsi_delete_timer() call in scsi_reset_provider()

2005-04-10 Thread Tejun Heo
04_scsi_timer_remove_delete_timer_from_reset_provider.patch scsi_reset_provider() calls scsi_delete_timer() on exit which isn't necessary. Remove it. Signed-off-by: Tejun Heo [EMAIL PROTECTED] scsi_error.c |1 - 1 files changed, 1 deletion(-) Index: scsi-reqfn-export

Re: [PATCH scsi-misc-2.6 03/07] scsi: remove a timer race in scsi_queue_insert()

2005-04-10 Thread Tejun Heo
() 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. Signed-off-by: Tejun Heo [EMAIL PROTECTED] scsi.c | 10

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

Re: [PATCH scsi-misc-2.6 03/04] scsi: reimplement scsi_request_fn()

2005-04-12 Thread Tejun Heo
that scsi_kill_requests() still terminates requests using blk layer. The path is circular-ref workaround and soon to be replaced, so ignore it for now. Signed-off-by: Tejun Heo [EMAIL PROTECTED] scsi.c | 137 scsi_lib.c | 286

Re: [PATCH scsi-misc-2.6 03/04] scsi: reimplement scsi_request_fn()

2005-04-12 Thread Tejun Heo
Oops, I forgot to mention that reqfn is reformatted mostly as suggested by Chritoph Hellwig. Sorry. On Tue, Apr 12, 2005 at 07:33:03PM +0900, Tejun Heo wrote: 03_scsi_reqfn_reimplementation.patch This patch rewrites scsi_request_fn(). scsi_dispatch_cmd() is merged

Re: [PATCH scsi-misc-2.6 03/07] scsi: replace scsi_queue_insert() usages with scsi_retry_command()

2005-04-12 Thread Tejun Heo
device_blocked on ADD_TO_MLQUEUE case in scsi_softirq(). Open code device_blocked setting and replace scsi_queue_insert() with scsi_retry_command() in both cases. Signed-off-by: Tejun Heo [EMAIL PROTECTED] scsi.c |7 --- scsi_error.c |2 +- 2 files

Re: [PATCH scsi-misc-2.6 05/07] scsi: move scsi_init_cmd_errh() from request_fn to prep_fn.

2005-04-12 Thread Tejun Heo
-by: Tejun Heo [EMAIL PROTECTED] scsi_lib.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) Index: scsi-reqfn-export/drivers/scsi/scsi_lib.c === --- scsi-reqfn-export.orig/drivers/scsi/scsi_lib.c 2005-04-12 21:50

Re: [PATCH scsi-misc-2.6 01/07] scsi: update and make public scsi_requeue_command()

2005-04-12 Thread Tejun Heo
function scsi_requeue_command_reprep() is defined and used for the original users of scsi_requeue_command(). Using a wrapper function for reprep cases is suggested by Christoph Hellwig. Signed-off-by: Tejun Heo [EMAIL PROTECTED] scsi_lib.c | 42

Re: [PATCH scsi-misc-2.6 02/07] scsi: make scsi_retry_command() use scsi_requeue_command()

2005-04-12 Thread Tejun Heo
also makes scsi_retry_command() symmetric with scsi_finish_command() in how it unbusies the command. Also as there's nothing to return, make the function void. Signed-off-by: Tejun Heo [EMAIL PROTECTED] scsi.c |8 ++-- scsi_priv.h |2 +- 2 files changed, 7

Re: [PATCH scsi-misc-2.6 04/07] scsi: remove scsi_queue_insert()

2005-04-12 Thread Tejun Heo
04_scsi_requeue_remove_scsi_queue_insert.patch scsi_queue_insert() now has no user left. Kill it. Signed-off-by: Tejun Heo [EMAIL PROTECTED] scsi_lib.c | 76 scsi_priv.h |1 2 files changed, 77 deletions(-) Index

Re: [PATCH scsi-misc-2.6 06/07] scsi: add cmd-result clearing

2005-04-12 Thread Tejun Heo
06_scsi_requeue_reset_result.patch cmd-result wasn't cleared on requeue or reprep. Clear it. Signed-off-by: Tejun Heo [EMAIL PROTECTED] scsi.c |9 + scsi_lib.c |1 + 2 files changed, 6 insertions(+), 4 deletions(-) Index: scsi-reqfn-export/drivers/scsi/scsi.c

Re: [PATCH scsi-misc-2.6 07/07] scsi: consolidate scsi_cmd_retry() calls

2005-04-12 Thread Tejun Heo
scsi_retry_command() more symmetrical with scsi_finish_command(). Signed-off-by: Tejun Heo [EMAIL PROTECTED] scsi.c |5 - scsi_error.c | 31 +++ 2 files changed, 7 insertions(+), 29 deletions(-) Index: scsi-reqfn-export/drivers/scsi/scsi.c

Re: [PATCH scsi-misc-2.6 00/04] scsi: scsi_request_fn() reimplementation

2005-04-12 Thread Tejun Heo
Tejun Heo wrote: Hello, guys. This patchset reimplements scsi_request_fn(). All prep's are moved into prep_fn and all state checking/issueing are moved into scsi_reqfn. prep_fn() only terminates/defers unpreparable requests and all requests are terminated through scsi midlayer. This patchset

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

2005-04-12 Thread Tejun Heo
Hello, Christoph Hellwig. On Mon, Apr 11, 2005 at 01:44:19PM +0100, Christoph Hellwig wrote: + cmd-request-flags |= REQ_SOFTBARRIER; + + spin_lock_irqsave(q-queue_lock, flags); + blk_requeue_request(q, cmd-request); + spin_unlock_irqrestore(q-queue_lock, flags);

Re: [PATCH scsi-misc-2.6 01/04] scsi: consolidate error handling out of scsi_init_io() into scsi_prep_fn()

2005-04-12 Thread Tejun Heo
. ret value checking was changed to switch() as in James's patch. Also, kill: comment is copied from James's patch. Signed-off-by: Tejun Heo [EMAIL PROTECTED] scsi_lib.c | 46 +++--- 1 files changed, 31 insertions(+), 15 deletions(-) Index

Re: [PATCH scsi-misc-2.6 04/04] scsi: remove unnecessary scsi_wait_req_end_io()

2005-04-12 Thread Tejun Heo
and soon to be replaced, so ignore it for now. Signed-off-by: Tejun Heo [EMAIL PROTECTED] scsi_lib.c | 11 --- 1 files changed, 11 deletions(-) Index: scsi-reqfn-export/drivers/scsi/scsi_lib.c === --- scsi-reqfn

[PATCH scsi-misc-2.6 00/04] scsi: scsi_request_fn() reimplementation

2005-04-12 Thread Tejun Heo
Hello, guys. This patchset reimplements scsi_request_fn(). All prep's are moved into prep_fn and all state checking/issueing are moved into scsi_reqfn. prep_fn() only terminates/defers unpreparable requests and all requests are terminated through scsi midlayer. [ Start of patch descriptions

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-18 Thread Tejun Heo
Hello, James. On Mon, Apr 18, 2005 at 10:33:21AM -0500, James Bottomley wrote: On Mon, 2005-04-11 at 03:45 +0900, Tejun Heo wrote: scmd-eh_timeout is used to resolve the race between command completion and timeout. However, during error handling, scsi_send_eh_cmnd uses scmd

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-18 Thread Tejun Heo
James Bottomley wrote: On Tue, 2005-04-19 at 07:31 +0900, Tejun Heo wrote: The original code also uses timer pending status as a signal that command completed normally in scsi_eh_done() function, and the same race also exists in the original code, no matter what we do, unless we make timer

[PATCH scsi-misc-2.6 00/04] scsi: misc timer fixes (reworked)

2005-04-19 Thread Tejun Heo
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

Re: [PATCH scsi-misc-2.6 03/04] scsi: remove a timer race in scsi_queue_insert()

2005-04-19 Thread Tejun Heo
() 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. Signed-off-by: Tejun Heo [EMAIL PROTECTED] scsi.c | 10

Re: [PATCH scsi-misc-2.6 04/04] scsi: remove unnecessary scsi_delete_timer() call in scsi_reset_provider()

2005-04-19 Thread Tejun Heo
04_scsi_timer_remove_delete_timer_from_reset_provider.patch scsi_reset_provider() calls scsi_delete_timer() on exit which isn't necessary. Remove it. Signed-off-by: Tejun Heo [EMAIL PROTECTED] scsi_error.c |1 - 1 files changed, 1 deletion(-) Index: scsi-reqfn-export

Re: [PATCH scsi-misc-2.6 02/04] scsi: remove spurious if tests from scsi_eh_{times_out|done}

2005-04-19 Thread Tejun Heo
02_scsi_timer_eh_timer_remove_spurious_if.patch If tests which check if eh_action isn't NULL in both functions are always true. Remove the if's. Signed-off-by: Tejun Heo [EMAIL PROTECTED] scsi_error.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) Index: scsi

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

2005-04-19 Thread Tejun Heo
. Reworked such that timeout race window is kept at minimal level as pointed out by James Bottomley. Signed-off-by: Tejun Heo [EMAIL PROTECTED] drivers/scsi/scsi_error.c | 26 -- include/scsi/scsi_host.h |1 + 2 files changed, 21 insertions(+), 6 deletions

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

2005-04-19 Thread Tejun Heo
. This patch makes scsi_queue_insert() use blk_requeue_request(). As REQ_SPECIAL means special requests and REQ_SOFTBARRIER is automatically handled by blk layer now, no flag needs to be set. Signed-off-by: Tejun Heo [EMAIL PROTECTED] scsi_lib.c |7 ++- 1 files changed, 6

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

2005-04-19 Thread Tejun Heo
, and the prototype 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 unnecessarily moving functions. Signed-off-by: Tejun Heo

Re: [PATCH scsi-misc-2.6 01/05] scsi: make blk layer set REQ_SOFTBARRIER when a request is dispatched

2005-04-19 Thread Tejun Heo
affected driver other than SCSI is i2o_block. Signed-off-by: Tejun Heo [EMAIL PROTECTED] elevator.c |8 1 files changed, 4 insertions(+), 4 deletions(-) Index: scsi-reqfn-export/drivers/block/elevator.c

Re: [PATCH scsi-misc-2.6 01/05] scsi: make blk layer set REQ_SOFTBARRIER when a request is dispatched

2005-04-20 Thread Tejun Heo
Jens Axboe wrote: On Wed, Apr 20 2005, Tejun Heo wrote: 01_scsi_blk_make_started_requests_ordered.patch Reordering already started requests is without any real benefit and causes problems if the request has its driver-specific resources allocated (as in SCSI). This patch

Re: [PATCH scsi-misc-2.6 01/05] scsi: make blk layer set REQ_SOFTBARRIER when a request is dispatched

2005-04-20 Thread Tejun Heo
(). Other patches apply cleanly with this patch or the original one and the end result is the same, so take your pick. :-) Signed-off-by: Tejun Heo [EMAIL PROTECTED] Index: scsi-reqfn-export/drivers/block/elevator.c === --- scsi

Re: [PATCH scsi-misc-2.6 01/05] scsi: make blk layer set REQ_SOFTBARRIER when a request is dispatched

2005-04-20 Thread Tejun Heo
Nick Piggin wrote: On Wed, 2005-04-20 at 16:40 +0900, Tejun Heo wrote: Hello, Jens. On Wed, Apr 20, 2005 at 08:30:10AM +0200, Jens Axboe wrote: Do it on requeue, please - not on the initial spotting of the request. This is the reworked version of the patch. It sets REQ_SOFTBARRIER in two

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

2005-04-20 Thread Tejun Heo
Hello, James. James Bottomley wrote: On Wed, 2005-04-20 at 08:15 +0900, Tejun Heo wrote: - * Insert this command at the head of the queue for it's device. - * It will go before all other commands that are already in the queue. - * - * NOTE: there is magic here about the way the queue

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

2005-04-20 Thread Tejun Heo
James Bottomley wrote: On Thu, 2005-04-21 at 09:20 +0900, Tejun Heo wrote: Hello, James. James Bottomley wrote: On Wed, 2005-04-20 at 08:15 +0900, Tejun Heo wrote: -* Insert this command at the head of the queue for it's device. -* It will go before all other commands

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

2005-04-20 Thread Tejun Heo
Hello, James. This is the modified patch with the comment (slightly modified). With this patch, the next patch in this patchset complains about line offset but it's okay. Thanks. Signed-off-by: Tejun Heo [EMAIL PROTECTED] Index: scsi-reqfn-export/drivers/scsi/scsi_lib.c

Re: SCSI layer a stumbling block for true SATA hotplug

2005-07-16 Thread Tejun Heo
Hi, Lukasz. Lukasz Kosewski wrote: Hello all, I'm currently working on a project to get a true disk-hotplug subsystem working in libata, experimenting with Promise SATA150 Tx2 Plus and SATAII150 Tx2 Plus controllers. I am very near a 'beta' release of my patches to this mailing list,

Re: calling scsi_adjust_queue_depth() during I/O...

2005-08-05 Thread Tejun Heo
Hello, Andrew. Hello, Jens. On Fri, Aug 05, 2005 at 09:57:52AM +0200, Jens Axboe wrote: On Thu, Aug 04 2005, Andrew Vasquez wrote: All, While adding support for the new change_queue_depth/type() callbacks, static int qla2x00_change_queue_depth(struct scsi_device *sdev,

Re: calling scsi_adjust_queue_depth() during I/O...

2005-08-05 Thread Tejun Heo
Tejun Heo wrote: Hello, Andrew. Hello, Jens. On Fri, Aug 05, 2005 at 09:57:52AM +0200, Jens Axboe wrote: On Thu, Aug 04 2005, Andrew Vasquez wrote: All, While adding support for the new change_queue_depth/type() callbacks, static int qla2x00_change_queue_depth(struct

Re: calling scsi_adjust_queue_depth() during I/O...

2005-08-05 Thread Tejun Heo
On Fri, Aug 05, 2005 at 11:32:07AM -0500, James Bottomley wrote: On Fri, 2005-08-05 at 21:33 +0900, Tejun Heo wrote: Here's the fix. It basically revives bqt-real_max_depth sans allocation optimization in init_tag_map. I've also added a comment explicitly noting that tag map cannot

Re: calling scsi_adjust_queue_depth() during I/O...

2005-08-05 Thread Tejun Heo
On Fri, Aug 05, 2005 at 05:59:06PM +0200, Jens Axboe wrote: On Fri, Aug 05 2005, Andrew Vasquez wrote: On Fri, 05 Aug 2005, Tejun Heo wrote: Oops, forget about the previous mail. Above patch make it into the tree and it's the source of the problem. My git HEAD was pointing

Re: [PATCH 1/2] sata: fix sata_sx4 dma_prep to not use sg-length

2005-08-06 Thread Tejun Heo
sata_sx4 directly references sg-length to calculate total_len in pdc20621_dma_prep(). This is incorrect as dma_map_sg() could have merged multiple sg's into one and, in such case, sg-length doesn't reflect true size of the entry. This patch makes it use sg_dma_len(sg). Signed-off-by: Tejun

Rd: [PATCH 2/2] sata: implement ATAPI alignment adjustment

2005-08-06 Thread Tejun Heo
drivers is using ata_for_each_sg() to iterate over sg table. This patch also renames qc-sg to qc-__sg to signify that it cannot be iterated directly. This patch is a rewrite of Jeff's implementation. Signed-off-by: Tejun Heo [EMAIL PROTECTED] Index: work/drivers/scsi/ahci.c

Re: [PATCH 3] sata: restore sg on setup failure

2005-08-07 Thread Tejun Heo
I forgot to restore sg-length on setup failure. This patch adds it. Signed-off-by: Tejun Heo [EMAIL PROTECTED] Index: work/drivers/scsi/libata-core.c === --- work.orig/drivers/scsi/libata-core.c2005-08-07 15:13

Re: [PATCH] Hard disk S3 resume time optimization

2013-05-16 Thread Tejun Heo
Hello, First of all, if at all possible, please try to fill the message to 80 columns, preferably a bit narrower than that. Most email clients can do it without you knowing. [The Problem] The vast majority of time spent in S3 resume is consumed by the ATA subsystem as it resumes the

Re: [PATCH] Hard disk S3 resume time optimization

2013-05-16 Thread Tejun Heo
On Thu, May 16, 2013 at 03:44:41PM -0700, Tejun Heo wrote: So, while I agree about the problem and the solution seems to be headed the right way of making SCSI suspend/resume asynchronous, what's going on with patch splitting, submission format and comments? Please read up on patch submission

Re: PING^7 (was Re: [PATCH v2 00/14] Corrections and customization of the SG_IO command whitelist (CVE-2012-4542))

2013-05-22 Thread Tejun Heo
On Wed, May 22, 2013 at 08:35:54AM +0200, Paolo Bonzini wrote: I'm not sure what is more ridiculous, whether the seven pings or the lack of review... So, ummm, I don't know what Jens is thinking but at this point I'm basically waiting for someone else to pick it up as review to return ratio is

Re: PING^7 (was Re: [PATCH v2 00/14] Corrections and customization of the SG_IO command whitelist (CVE-2012-4542))

2013-05-22 Thread Tejun Heo
On Wed, May 22, 2013 at 12:23:56PM +0200, Paolo Bonzini wrote: Yes, because I have no idea what _your_ point is. Isolate the actual fixes and just submit them as it seems impossible for you to provide proper justifications for the things you want to add. -- tejun -- To unsubscribe from this

Re: PING^7 (was Re: [PATCH v2 00/14] Corrections and customization of the SG_IO command whitelist (CVE-2012-4542))

2013-05-22 Thread Tejun Heo
On Wed, May 22, 2013 at 04:12:04PM +0200, Paolo Bonzini wrote: Il 22/05/2013 15:41, Tejun Heo ha scritto: On Wed, May 22, 2013 at 12:23:56PM +0200, Paolo Bonzini wrote: Yes, because I have no idea what _your_ point is. Isolate the actual fixes and just submit them as it seems impossible

Re: PING^7 (was Re: [PATCH v2 00/14] Corrections and customization of the SG_IO command whitelist (CVE-2012-4542))

2013-05-22 Thread Tejun Heo
On Wed, May 22, 2013 at 05:00:52PM +0200, Paolo Bonzini wrote: Il 22/05/2013 16:30, Tejun Heo ha scritto: * Separate fixes from additions. Transform existing code so that the visible behavior doesn't change but the required fix can be implemented on top. Explicitly note what's going

Re: PING^7 (was Re: [PATCH v2 00/14] Corrections and customization of the SG_IO command whitelist (CVE-2012-4542))

2013-05-22 Thread Tejun Heo
Hey, On Wed, May 22, 2013 at 05:53:34PM +0200, Paolo Bonzini wrote: I do listen to review feedback, but I also expect the other side to listen to me, ask me what is not clear, and possess some knowledge of the domain that he's reviewing patches for. All of which, quite frankly, I have not

Re: PING^7 (was Re: [PATCH v2 00/14] Corrections and customization of the SG_IO command whitelist (CVE-2012-4542))

2013-05-22 Thread Tejun Heo
On Wed, May 22, 2013 at 11:18:05PM +0200, Paolo Bonzini wrote: Ok, so I can split it in 10 patches one per command, but at some point I wonder if it is overkill. For example, for disks: - WRITE AND VERIFY(16) is needed to support 2TB disks, and the corresponding 12-byte CDB is whitelisted

Re: PING^7 (was Re: [PATCH v2 00/14] Corrections and customization of the SG_IO command whitelist (CVE-2012-4542))

2013-05-22 Thread Tejun Heo
On Thu, May 23, 2013 at 07:17:37AM +0900, Tejun Heo wrote: No, it doesn't. You can use SCM_RIGHTS, and pass a file descriptor for the device node to an unprivileged program. You can choose the users/groups that are allowed to access the device. In either case, the privileged action

Re: PING^7 (was Re: [PATCH v2 00/14] Corrections and customization of the SG_IO command whitelist (CVE-2012-4542))

2013-05-23 Thread Tejun Heo
On Thu, May 23, 2013 at 09:45:42AM +0200, Paolo Bonzini wrote: Il 23/05/2013 00:17, Tejun Heo ha scritto: Then let's make it fit the use case better. I really can't see much point in crafting the cdb filter when you basically have to entrust the device to the user anyway. Let's either

Re: PING^7 (was Re: [PATCH v2 00/14] Corrections and customization of the SG_IO command whitelist (CVE-2012-4542))

2013-05-23 Thread Tejun Heo
On Thu, May 23, 2013 at 11:47:25AM +0200, Paolo Bonzini wrote: No no, I'm not talking about it not working for the users - it's just passing the commands, it of course works. I'm doubting about it being a worthy security isolation layer. cdb filtering (of any form really) has always been

Re: PING^7 (was Re: [PATCH v2 00/14] Corrections and customization of the SG_IO command whitelist (CVE-2012-4542))

2013-05-24 Thread Tejun Heo
On Fri, May 24, 2013 at 4:13 PM, Paolo Bonzini pbonz...@redhat.com wrote: The same filtering table being applied to different classes of hardware is a software bug, but my point is that the practive essentially entrusts non-insignificant part of security enforcement to the hardware itself.

Re: PING^7 (was Re: [PATCH v2 00/14] Corrections and customization of the SG_IO command whitelist (CVE-2012-4542))

2013-05-24 Thread Tejun Heo
On Fri, May 24, 2013 at 5:31 PM, Paolo Bonzini pbonz...@redhat.com wrote: I agree intuition may not count, and it's perfectly possible that firmware writers forgot a break; or put the wrong location in a jump table, so that unimplemented commands give interesting results. It's not just

Re: PING^7 (was Re: [PATCH v2 00/14] Corrections and customization of the SG_IO command whitelist (CVE-2012-4542))

2013-05-24 Thread Tejun Heo
On Fri, May 24, 2013 at 11:45:33AM +0200, Paolo Bonzini wrote: It's not just unimplemented commands. Exposing any new command exposes its borderline problems together with it. For commands that are used by Linux already, the right way to fix the problems is not obscuring the commands from

Re: PING^7 (was Re: [PATCH v2 00/14] Corrections and customization of the SG_IO command whitelist (CVE-2012-4542))

2013-05-25 Thread Tejun Heo
Hey, James. On Fri, May 24, 2013 at 09:35:02PM -0700, James Bottomley wrote: Well, I'd actually much prefer disabling CDB whitelisting for all !MMC devices if at all possible. I'll go along with this. I'm also wondering what the problem would be Don't think we can. It'd be a behavior

Re: PING^7 (was Re: [PATCH v2 00/14] Corrections and customization of the SG_IO command whitelist (CVE-2012-4542))

2013-05-25 Thread Tejun Heo
On Sat, May 25, 2013 at 01:14:37PM +0200, Paolo Bonzini wrote: Don't think we can. It'd be a behavior change clearly visible to userland at this point. We can (and even for MMC) if it is a build-time configuration knob. It would satisfy those people who want the CVE fixed, as long as

Re: [PATCH] ipr: qc_fill_rtf() method should not store alternate status register

2013-06-02 Thread Tejun Heo
On Sat, Jun 01, 2013 at 02:37:00AM +0400, Sergei Shtylyov wrote: Hello. On 05/31/2013 04:46 PM, Brian King wrote: The 'ctl' field of the 'struct ata_taskfile' is not really dual purpose, i.e. it is not intended for storing the alternate status register (which is mapped at the same

Re: [PATCH 1/3] lib/scatterlist: introduce sg_pcopy_from_buffer() and sg_pcopy_to_buffer()

2013-06-06 Thread Tejun Heo
Hello, On Thu, Jun 06, 2013 at 09:52:56PM +0900, Akinobu Mita wrote: +static bool sg_miter_get_next_page(struct sg_mapping_iter *miter) +{ + if (!miter-__remaining) { + struct scatterlist *sg; + unsigned long pgoffset; + + if

Re: [PATCH v2 1/4] lib/scatterlist: factor out sg_miter_get_next_page() from sg_miter_next()

2013-06-18 Thread Tejun Heo
On Tue, Jun 18, 2013 at 10:31:31PM +0900, Akinobu Mita wrote: This function is used to proceed page iterator to the next page if necessary, and will be used to implement the variants of sg_copy_{from,to}_buffer() later. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Tejun Heo t

Re: [PATCH v2 2/4] lib/scatterlist: introduce sg_pcopy_from_buffer() and sg_pcopy_to_buffer()

2013-06-18 Thread Tejun Heo
On Tue, Jun 18, 2013 at 10:31:32PM +0900, Akinobu Mita wrote: /** + * sg_miter_seek - reposition mapping iterator + * @miter: sg mapping iter to be seeked + * @offset: number of bytes to plus the current location + * + * Description: + * Sets the offset of @miter to its current location

Re: [PATCH v3 2/4] lib/scatterlist: introduce sg_pcopy_from_buffer() and sg_pcopy_to_buffer()

2013-06-24 Thread Tejun Heo
...@gmail.com Cc: Tejun Heo t...@kernel.org Cc: Imre Deak imre.d...@intel.com Cc: Herbert Xu herb...@gondor.apana.org.au Cc: David S. Miller da...@davemloft.net Cc: linux-cry...@vger.kernel.org Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Douglas Gilbert dgilb...@interlog.com Cc: linux-scsi

  1   2   3   4   5   6   7   >