[PATCH] sr: mark device as changed when performing a write SG_IO operation

2018-05-22 Thread Maurizio Lombardi
Signed-off-by: Maurizio Lombardi --- drivers/scsi/sr.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index 3f3cb72..e64311d 100644 --- a/drivers/scsi/sr.c +++ b/drivers/scsi/sr.c @@ -49,6 +49,7 @@ #include #include

[PATCH RFC] sr: mark the device as changed when burning a CD

2018-05-22 Thread Maurizio Lombardi
Some of our customers complain that, after burning a CD, it's not possible to proceed to mount it without ejecting it first. The problem is that the sr driver caches some information about the CD-ROM and doesn't update them after burning it, leading to a failure when the isofs filesystem tries to

Re: [PATCH RFC] sr: mark the device as changed when burning a CD

2018-05-22 Thread Jens Axboe
On 5/22/18 3:15 AM, Maurizio Lombardi wrote: > Some of our customers complain that, after burning a CD, it's not possible > to proceed to mount it without ejecting it first. > > The problem is that the sr driver caches some information about the CD-ROM > and doesn't update them after burning it,

BUG: scsi/qla2xxx: BUG_ON(blk_queued_rq(req) is triggered in blk_finish_request

2018-05-22 Thread jianchao.wang
Hi all Our customer met a panic triggered by BUG_ON in blk_finish_request. >From the dmesg log, the BUG_ON was triggered after command abort occurred many >times. There is a race condition in the following scenario. cpu A cpu B kworker

RE: [PATCH RFC 0/3] Add ufs provisioning support in driver

2018-05-22 Thread sayali
Hi Kyuho Choi, Thank you for your comments. Yes, there can be multiple use-cases where we want to re-provision a ufs device. Some devices may be required to be configured multiple times during system setup or system development. As per spec ,the host may write the Configuration Descriptors

Re: [PATCH RFC 0/3] Add ufs provisioning support in driver

2018-05-22 Thread Kyuho Choi
Hi Sayali, Provisioning ufs device need to handle lock/unlock the bConfigdescrlock attribute. According to UFS spec bConfigdescrlock is write once attribute. Are we really need this API in kernel?. On 5/22/18, Sayali Lokhande wrote: > This change adds a new API

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Randy Dunlap
On 05/22/2018 04:31 PM, Kees Cook wrote: > On Tue, May 22, 2018 at 12:16 PM, Jens Axboe wrote: >> On 5/22/18 1:13 PM, Christoph Hellwig wrote: >>> On Tue, May 22, 2018 at 01:09:41PM -0600, Jens Axboe wrote: I think Martin and Christoph are objecting to moving the code to

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Jens Axboe
On May 22, 2018, at 5:31 PM, Kees Cook wrote: > >> On Tue, May 22, 2018 at 12:16 PM, Jens Axboe wrote: >>> On 5/22/18 1:13 PM, Christoph Hellwig wrote: On Tue, May 22, 2018 at 01:09:41PM -0600, Jens Axboe wrote: I think Martin and Christoph are

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Randy Dunlap
On 05/22/2018 04:39 PM, Kees Cook wrote: > On Tue, May 22, 2018 at 4:34 PM, Randy Dunlap wrote: >> On 05/22/2018 04:31 PM, Kees Cook wrote: >>> On Tue, May 22, 2018 at 12:16 PM, Jens Axboe wrote: On 5/22/18 1:13 PM, Christoph Hellwig wrote: > On

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Kees Cook
On Tue, May 22, 2018 at 12:16 PM, Jens Axboe wrote: > On 5/22/18 1:13 PM, Christoph Hellwig wrote: >> On Tue, May 22, 2018 at 01:09:41PM -0600, Jens Axboe wrote: >>> I think Martin and Christoph are objecting to moving the code to >>> block/scsi_ioctl.h. I don't care too much

Re: [PATCH 2/6] scsi: cxlflash: Drop unused sense buffers

2018-05-22 Thread Matthew R. Ochs
On Tue, May 22, 2018 at 11:15:08AM -0700, Kees Cook wrote: > This removes the unused sense buffer in read_cap16() and write_same16(). > > Signed-off-by: Kees Cook Looks good. Acked-by: Matthew R. Ochs

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Kees Cook
On Tue, May 22, 2018 at 4:34 PM, Randy Dunlap wrote: > On 05/22/2018 04:31 PM, Kees Cook wrote: >> On Tue, May 22, 2018 at 12:16 PM, Jens Axboe wrote: >>> On 5/22/18 1:13 PM, Christoph Hellwig wrote: On Tue, May 22, 2018 at 01:09:41PM -0600, Jens

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Kees Cook
On Tue, May 22, 2018 at 4:42 PM, Jens Axboe wrote: > On May 22, 2018, at 5:31 PM, Kees Cook wrote: >> >>> On Tue, May 22, 2018 at 12:16 PM, Jens Axboe wrote: On 5/22/18 1:13 PM, Christoph Hellwig wrote: > On Tue, May 22, 2018 at

Re: [PATCH 1/6] ide-cd: Drop unused sense buffers

2018-05-22 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig

Re: [PATCH 2/6] scsi: cxlflash: Drop unused sense buffers

2018-05-22 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Martin K. Petersen
Christoph, > On Tue, May 22, 2018 at 11:15:09AM -0700, Kees Cook wrote: >> Both SCSI and ATAPI share the sense header. In preparation for using the >> struct scsi_sense_hdr more widely, move this into a separate header and >> move the helper function to scsi_ioctl.c which is linked with

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Kees Cook
On Tue, May 22, 2018 at 11:50 AM, Martin K. Petersen wrote: > > Christoph, > >> On Tue, May 22, 2018 at 11:15:09AM -0700, Kees Cook wrote: >>> Both SCSI and ATAPI share the sense header. In preparation for using the >>> struct scsi_sense_hdr more widely, move this into

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Jens Axboe
On 5/22/18 12:59 PM, Kees Cook wrote: > On Tue, May 22, 2018 at 11:50 AM, Martin K. Petersen > wrote: >> >> Christoph, >> >>> On Tue, May 22, 2018 at 11:15:09AM -0700, Kees Cook wrote: Both SCSI and ATAPI share the sense header. In preparation for using the

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Christoph Hellwig
On Tue, May 22, 2018 at 01:09:41PM -0600, Jens Axboe wrote: > I think Martin and Christoph are objecting to moving the code to > block/scsi_ioctl.h. I don't care too much about where the code is, but > think it would be nice to have the definitions in a separate header. But > if they prefer just

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Jens Axboe
On 5/22/18 1:13 PM, Christoph Hellwig wrote: > On Tue, May 22, 2018 at 01:09:41PM -0600, Jens Axboe wrote: >> I think Martin and Christoph are objecting to moving the code to >> block/scsi_ioctl.h. I don't care too much about where the code is, but >> think it would be nice to have the definitions

[PATCH 4/6] block: Consolidate scsi sense buffer usage

2018-05-22 Thread Kees Cook
There is a lot of needless struct request_sense usage in the CDROM code. These can all be struct scsi_sense_hdr instead, to avoid any confusion over their respective structure sizes. This patch is a lot of noise changing "sense" to "sshdr", but the final code is more readable to distinguish

[PATCH 5/6] libata-scsi: Move sense buffers onto stack

2018-05-22 Thread Kees Cook
Instead of dynamically allocating the sense buffers, put them on the stack so that future compile-time sizeof() checks will be able to see their buffer length. Signed-off-by: Kees Cook --- drivers/ata/libata-scsi.c | 18 ++ 1 file changed, 6 insertions(+),

[PATCH 6/6] scsi: Check sense buffer size at build time

2018-05-22 Thread Kees Cook
To avoid introducing problems like those fixed in commit f7068114d45e ("sr: pass down correctly sized SCSI sense buffer"), this creates a macro wrapper for scsi_execute() that verifies the size of the sense buffer similar to what was done for command string sizes in commit 3756f6401c30 ("exec:

[PATCH 2/6] scsi: cxlflash: Drop unused sense buffers

2018-05-22 Thread Kees Cook
This removes the unused sense buffer in read_cap16() and write_same16(). Signed-off-by: Kees Cook --- drivers/scsi/cxlflash/superpipe.c | 8 ++-- drivers/scsi/cxlflash/vlun.c | 7 ++- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git

[PATCH 0/6] block: Consolidate scsi sense buffer usage

2018-05-22 Thread Kees Cook
This is a follow-up to commit f7068114d45e ("sr: pass down correctly sized SCSI sense buffer") which further cleans up and removes needless sense character array buffers and "struct request_sense" usage in favor of the common "struct scsi_sense_hdr". First, drop a bunch of unused sense buffers:

[PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Kees Cook
Both SCSI and ATAPI share the sense header. In preparation for using the struct scsi_sense_hdr more widely, move this into a separate header and move the helper function to scsi_ioctl.c which is linked with CONFIG_IDE by way of CONFIG_BLK_SCSI_REQUEST. Signed-off-by: Kees Cook

[PATCH 1/6] ide-cd: Drop unused sense buffers

2018-05-22 Thread Kees Cook
This drops unused sense buffers from: cdrom_eject() cdrom_read_capacity() cdrom_read_tocentry() ide_cd_lockdoor() ide_cd_read_toc() Signed-off-by: Kees Cook --- drivers/ide/ide-cd.c | 36 +++-

Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI

2018-05-22 Thread Christoph Hellwig
On Tue, May 22, 2018 at 11:15:09AM -0700, Kees Cook wrote: > Both SCSI and ATAPI share the sense header. In preparation for using the > struct scsi_sense_hdr more widely, move this into a separate header and > move the helper function to scsi_ioctl.c which is linked with CONFIG_IDE > by way of

Re: [PATCH 1/2] libsas: remove irq save in sas_ata_qc_issue()

2018-05-22 Thread Sebastian Andrzej Siewior
On 2018-05-18 14:31:27 [+0100], John Garry wrote: > On 04/05/2018 15:50, Sebastian Andrzej Siewior wrote: > > Since commit 312d3e56119a ("[SCSI] libsas: remove ata_port.lock > > management duties from lldds") the sas_ata_qc_issue() function unlocks > > the ata_port.lock and disables interrupts

Re: [PATCH v2] scsi_transport_srp: Fix shost to rport translation

2018-05-22 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham