[PATCH 0/1] Option for scsi_debug to fake removable devices

2012-09-06 Thread Martin Pitt
Hello all, I already re-sent this 1.5 months ago, but did not get any answer back then; I guess it got lost in the noise by now. So, patiently retrying again. For the purposes of automatically testing udisks and gvfs automounting I would like to add a parameter to scsi_debug to control the "remov

[PATCH 1/1] [SCSI] scsi_debug: Add "removable" parameter

2012-09-06 Thread Martin Pitt
Add "removable" module parameter to set the "removable" attribute of any subsequently created debug block device. It is a writable driver option, so that you can switch between removable and "fixed" media block devices in between the add_host calls. This is useful for being able to test the differ

[Bug 43164] FC card not detected/mounted via external multicard reader

2012-09-06 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=43164 Alan changed: What|Removed |Added CC||a...@lxorguk.ukuu.org.uk Component|SCSI

Re: [Ping^3] Re: [PATCH] sg_io: allow UNMAP and WRITE SAME without CAP_SYS_RAWIO

2012-09-06 Thread Ric Wheeler
On 09/06/2012 02:31 AM, Paolo Bonzini wrote: Il 05/09/2012 22:18, Ric Wheeler ha scritto: Hi Paolo, Both of these commands are destructive. WRITE_SAME (if done without the discard bits set) can also take a very long time to be destructive and tie up the storage. FORMAT_UNIT has the same charac

[Bug 43234] kernel crashes whenever the thumbdrive or USB devices are remove

2012-09-06 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=43234 Alan changed: What|Removed |Added Status|NEW |RESOLVED CC|

Re: [Ping^3] Re: [PATCH] sg_io: allow UNMAP and WRITE SAME without CAP_SYS_RAWIO

2012-09-06 Thread Paolo Bonzini
Il 06/09/2012 13:31, Ric Wheeler ha scritto: >>> Both of these commands are destructive. WRITE_SAME (if done without the >>> discard bits set) can also take a very long time to be destructive and >>> tie up the storage. >> >> FORMAT_UNIT has the same characteristics and yet it is allowed (btw, I >>

Re: [Ping^3] Re: [PATCH] sg_io: allow UNMAP and WRITE SAME without CAP_SYS_RAWIO

2012-09-06 Thread Ric Wheeler
On 09/06/2012 07:49 AM, Paolo Bonzini wrote: Il 06/09/2012 13:31, Ric Wheeler ha scritto: Both of these commands are destructive. WRITE_SAME (if done without the discard bits set) can also take a very long time to be destructive and tie up the storage. FORMAT_UNIT has the same characteristics a

Re: [Ping^3] Re: [PATCH] sg_io: allow UNMAP and WRITE SAME without CAP_SYS_RAWIO

2012-09-06 Thread Paolo Bonzini
Il 06/09/2012 14:08, Ric Wheeler ha scritto: >> According to the standard, the translation layer can write a >> user-provided pattern to every sector in the disk. It's an optional >> feature and libata doesn't do that, but it is still possible. > > It is not possible today with our stack though,

Re: [Ping^3] Re: [PATCH] sg_io: allow UNMAP and WRITE SAME without CAP_SYS_RAWIO

2012-09-06 Thread Lukáš Czerner
On Thu, 6 Sep 2012, Paolo Bonzini wrote: > Date: Thu, 06 Sep 2012 14:36:53 +0200 > From: Paolo Bonzini > To: Ric Wheeler > Cc: ax...@kernel.dk, Mike Snitzer , > Alan Cox , > Martin K. Petersen , > linux-ker...@vger.kernel.org, linux-scsi@vger.kernel.org > Subject: Re: [Ping^3] Re: [P

Re: [PATCH 1/1] [SCSI] scsi_debug: Add "removable" parameter

2012-09-06 Thread Douglas Gilbert
On 12-09-06 06:04 AM, Martin Pitt wrote: Add "removable" module parameter to set the "removable" attribute of any subsequently created debug block device. It is a writable driver option, so that you can switch between removable and "fixed" media block devices in between the add_host calls. This

Re: [PATCH v6 1/7] scsi: sr: support runtime pm for ODD

2012-09-06 Thread Alan Stern
On Thu, 6 Sep 2012, Aaron Lu wrote: > > That's why we have an autosuspend delay. Although for some reason the > > SCSI subsystem doesn't use it currently... We need to add a call to > > pm_runtime_use_autosuspend() in scsi_sysfs_add_sdev(). Likewise, the > > pm_schedule_suspend() call in scs

Re: [PATCH v6 1/7] scsi: sr: support runtime pm for ODD

2012-09-06 Thread Oliver Neukum
On Thursday 06 September 2012 11:06:49 Alan Stern wrote: > On Thu, 6 Sep 2012, Aaron Lu wrote: > > > > That's why we have an autosuspend delay. Although for some reason the > > > SCSI subsystem doesn't use it currently... We need to add a call to > > > pm_runtime_use_autosuspend() in scsi_sysf

Re: [PATCH] [SCSI] libfcoe: use list_move instead of list_del/list_add

2012-09-06 Thread Love, Robert W
On 9/5/2012 9:36 PM, Wei Yongjun wrote: > From: Wei Yongjun > > Using list_move() instead of list_del() + list_add(). > > spatch with a semantic match is used to found this problem. > (http://coccinelle.lip6.fr/) > > Signed-off-by: Wei Yongjun Acked-by: Robert Love -- To unsubscribe from this l

Re: [PATCH 0/12] qla4xxx: Updates for scsi "misc" branch.

2012-09-06 Thread Michael Christie
On Aug 22, 2012, at 6:54 AM, vikas.chaudh...@qlogic.com wrote: > Vikas Chaudhary (12): > qla4xxx: Update function name from 8xxx to 82xx > qla4xxx: Update structure and variable names > qla4xxx: Update func name from ql4_ to qla4_ > qla4xxx: Rename macros from 82XX to 8XXX >

[PATCH 2/10] drivers/scsi/sym53c8xx_2/sym_fw.c: removes unnecessary semicolon

2012-09-06 Thread Peter Senna Tschudin
From: Peter Senna Tschudin removes unnecessary semicolon Found by Coccinelle: http://coccinelle.lip6.fr/ Signed-off-by: Peter Senna Tschudin --- drivers/scsi/sym53c8xx_2/sym_fw.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff -u -p a/drivers/scsi/sym53c8xx_2/sym_fw.c b

Re: [PATCH] Fix a use-after-free triggered by device removal

2012-09-06 Thread Michael Christie
On Sep 3, 2012, at 9:12 AM, Bart Van Assche wrote: > If the put_device() call in scsi_request_fn() drops the sdev refcount > to zero then the spin_lock() call after the put_device() call triggers > a use-after-free. Avoid that by making sure that blk_cleanup_queue() > can only finish after all a

Re: [PATCH v6 1/7] scsi: sr: support runtime pm for ODD

2012-09-06 Thread Alan Stern
On Thu, 6 Sep 2012, Oliver Neukum wrote: > On Thursday 06 September 2012 11:06:49 Alan Stern wrote: > > On Thu, 6 Sep 2012, Aaron Lu wrote: > > > > > > That's why we have an autosuspend delay. Although for some reason the > > > > SCSI subsystem doesn't use it currently... We need to add a call

[PATCH] isci: Allow SSP tasks into the task management path.

2012-09-06 Thread Jeff Skirvin
This commit fixes a driver bug for SSP tasks that require task management in the target after they complete in the SCU hardware. The problem was manifested in the function "isci_task_abort_task", which tests to see if the sas_task.lldd_task is non-NULL before allowing task management; this bug wou

Re: [PATCH] Fix a use-after-free triggered by device removal

2012-09-06 Thread Bart Van Assche
_suOn 09/06/12 18:27, Michael Christie wrote: > On Sep 3, 2012, at 9:12 AM, Bart Van Assche wrote: >> If the put_device() call in scsi_request_fn() drops the sdev refcount >> to zero then the spin_lock() call after the put_device() call triggers >> a use-after-free. Avoid that by making sure that

Re: [PATCH v6 1/7] scsi: sr: support runtime pm for ODD

2012-09-06 Thread Oliver Neukum
On Thursday 06 September 2012 13:08:18 Alan Stern wrote: > On Thu, 6 Sep 2012, Oliver Neukum wrote: > > > On Thursday 06 September 2012 11:06:49 Alan Stern wrote: > > > On Thu, 6 Sep 2012, Aaron Lu wrote: > > > > > > > > That's why we have an autosuspend delay. Although for some reason > > > >

Re: [PATCH] Fix a use-after-free triggered by device removal

2012-09-06 Thread Mike Christie
On 09/06/2012 12:58 PM, Bart Van Assche wrote: > _suOn 09/06/12 18:27, Michael Christie wrote: >> On Sep 3, 2012, at 9:12 AM, Bart Van Assche wrote: >>> If the put_device() call in scsi_request_fn() drops the sdev refcount >>> to zero then the spin_lock() call after the put_device() call triggers

Re: [PATCH v6 1/7] scsi: sr: support runtime pm for ODD

2012-09-06 Thread Alan Stern
On Thu, 6 Sep 2012, Oliver Neukum wrote: > > > > But in the long run that wouldn't be a good solution. What I'd really > > > > like is a way to do the status polling without having it reset the > > > > idle timer. > > > > > > > > Oliver, what do you think? Would that be a good solution? > > >

Re: [PATCH] Fix a use-after-free triggered by device removal

2012-09-06 Thread Bart Van Assche
On 09/06/12 20:14, Mike Christie wrote: > On 09/06/2012 12:58 PM, Bart Van Assche wrote: >> _suOn 09/06/12 18:27, Michael Christie wrote: >>> On Sep 3, 2012, at 9:12 AM, Bart Van Assche wrote: If the put_device() call in scsi_request_fn() drops the sdev refcount to zero then the spin_loc

Re: [PATCH] Fix a use-after-free triggered by device removal

2012-09-06 Thread Tejun Heo
Hello, Bart, Mike. On Thu, Sep 06, 2012 at 08:52:09PM +0200, Bart Van Assche wrote: > >> The purpose of this patch is indeed to make *blk_run_queue() calls from > >> the block layer safe. There are several direct or indirect > >> *blk_run_queue() calls in the block layer where a reference on the q

Re: [PATCH v6 4/7] libata: acpi: set can_power_off for both ODD and HD

2012-09-06 Thread Jeff Garzik
On 09/04/2012 10:24 AM, Aaron Lu wrote: From: Aaron Lu Hard disk may also be runtime powered off, so set can_power_off flag for it too if condition satisfies. Signed-off-by: Aaron Lu Acked-by: Jeff Garzik -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the bo

Re: [PATCH v6 7/7] libata: acpi: respect may_power_off flag

2012-09-06 Thread Jeff Garzik
On 09/04/2012 10:24 AM, Aaron Lu wrote: From: Aaron Lu If user does not want the device being powered off when runtime suspended by setting may_power_off flag to 0, we will not choose D3 cold ACPI D-State for it. Signed-off-by: Aaron Lu --- drivers/ata/libata-acpi.c | 4 +++- 1 file change

[PATCH] tcm_fc: move the dereference below the NULL test

2012-09-06 Thread Wei Yongjun
From: Wei Yongjun The dereference should be moved below the NULL test. spatch with a semantic match is used to found this. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun --- drivers/target/tcm_fc/tfc_io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/t

[PATCH] target: move the dereference below the NULL test

2012-09-06 Thread Wei Yongjun
From: Wei Yongjun The dereference should be moved below the NULL test. spatch with a semantic match is used to found this. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun --- drivers/target/target_core_pr.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a

Re: [PATCH] Fix a use-after-free triggered by device removal

2012-09-06 Thread Bart Van Assche
On 09/07/12 01:20, Tejun Heo wrote: > I think Mike is wondering whether your patch in isolation is enough or > we also need to have DEAD check there too. The proposed patch can't > handle the case where q->request_fn() is invoked after drain is > complete. I'm not really sure whether that can hap

[PATCH] [SCSI] bnx2fc: move the dereference below the NULL test

2012-09-06 Thread Wei Yongjun
From: Wei Yongjun The dereference should be moved below the NULL test. spatch with a semantic match is used to found this. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun --- drivers/scsi/bnx2fc/bnx2fc_io.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers