Re: MPT Fusion - ext4 delayed allocation failed errors on 4.14!

2018-04-12 Thread Nikola Ciprich
in the meantime, I've disabled WRITE SAME for mptsas: diff -Naur linux-4.14/drivers/message/fusion/mptsas.c linux-4.14-mptsas-disable-write-same/drivers/message/fusion/mptsas.c --- linux-4.14/drivers/message/fusion/mptsas.c2017-11-12 19:46:13.0 +0100 +++ linux-4.14-mptsas-disabl

Re: [PATCH] scsi: qla2xxx: reduce the time granularity of qla2x00_eh_wait_on_command

2018-04-12 Thread jianchao.wang
Would anyone please take a review on this ? Thanks in advance Jianchao On 04/10/2018 04:48 PM, Jianchao Wang wrote: > If the cmd has not be returned after aborted by qla2x00_eh_abort, > we have to wait for it. However, the time is 1000ms at least currently. > If there are a lot cmds need to be ab

Re: 4.15.14 crash with iscsi target and dvd

2018-04-12 Thread Ming Lei
On Tue, Apr 10, 2018 at 08:45:25PM -0400, Wakko Warner wrote: > Ming Lei wrote: > > Sure, thanks for your sharing. > > > > Wakko, could you test the following patch and see if there is any > > difference? > > > > -- > > diff --git a/drivers/target/target_core_pscsi.c > > b/drivers/target/target_

Re: [PATCH] tcmu: fix error resetting qfull_time_out to default

2018-04-12 Thread Mike Christie
On 04/10/2018 04:11 AM, Xiubo Li wrote: > > On 2018/4/9 19:44, Prasanna Kumar Kalever wrote: >> Problem: >> --- >> $ cat /sys/kernel/config/target/core/user_0/block/attrib/qfull_time_out >> -1 >> >> $ echo "-1" > >> /sys/kernel/config/target/core/user_0/block/attrib/qfull_time_out >> -bash: ec

Re: [PATCH] tcmu: fix error resetting qfull_time_out to default

2018-04-12 Thread Mike Christie
On 04/09/2018 06:44 AM, Prasanna Kumar Kalever wrote: > Problem: > --- > $ cat /sys/kernel/config/target/core/user_0/block/attrib/qfull_time_out > -1 > > $ echo "-1" > > /sys/kernel/config/target/core/user_0/block/attrib/qfull_time_out > -bash: echo: write error: Invalid argument > > Fix: >

Re: [PATCHv2] tcmu: allow userspace to reset netlink

2018-04-12 Thread Mike Christie
On 04/04/2018 11:39 PM, xiu...@redhat.com wrote: > From: Xiubo Li > > This patch adds 1 tcmu attr to reset and complete all the blocked > netlink waiting threads. It's used when the userspace daemon like > tcmu-runner has crashed or forced to shutdown just before the > netlink requests be replied

Re: usercopy whitelist woe in scsi_sense_cache

2018-04-12 Thread Kees Cook
On Wed, Apr 11, 2018 at 5:03 PM, Kees Cook wrote: > On Wed, Apr 11, 2018 at 3:47 PM, Kees Cook wrote: >> On Tue, Apr 10, 2018 at 8:13 PM, Kees Cook wrote: >>> I'll see about booting with my own kernels, etc, and try to narrow this >>> down. :) >> >> If I boot kernels I've built, I no longer hit

Re: usercopy whitelist woe in scsi_sense_cache

2018-04-12 Thread Oleksandr Natalenko
Hi. On čtvrtek 12. dubna 2018 20:44:37 CEST Kees Cook wrote: > My first bisect attempt gave me commit 5448aca41cd5 ("null_blk: wire > up timeouts"), which seems insane given that null_blk isn't even built > in the .config. I managed to get the testing automated now for a "git > bisect run ...", so

[PATCH] scsi_transport_srp: Fix shost to rport translation

2018-04-12 Thread Bart Van Assche
Since an SRP remote port is attached as a child to shost->shost_gendev and as the only child, the translation from the shost pointer into an rport pointer must happen by looking up the shost child that is an rport. This patch fixes the following KASAN complaint: BUG: KASAN: slab-out-of-bounds in s

[PATCH] target: Fix Fortify_panic kernel exception

2018-04-12 Thread Bryant G. Ly
[ 496.212783] [ cut here ] [ 496.212784] kernel BUG at /build/linux-hwe-edge-ojNirv/linux-hwe-edge-4.15.0/lib/string.c:1052! [ 496.212789] Oops: Exception in kernel mode, sig: 5 [#1] [ 496.212791] LE SMP NR_CPUS=2048 NUMA pSeries [ 496.212795] Modules linked in: hvcs(O

Re: usercopy whitelist woe in scsi_sense_cache

2018-04-12 Thread Kees Cook
On Thu, Apr 12, 2018 at 12:04 PM, Oleksandr Natalenko wrote: > Hi. > > On čtvrtek 12. dubna 2018 20:44:37 CEST Kees Cook wrote: >> My first bisect attempt gave me commit 5448aca41cd5 ("null_blk: wire >> up timeouts"), which seems insane given that null_blk isn't even built >> in the .config. I man

Re: usercopy whitelist woe in scsi_sense_cache

2018-04-12 Thread Kees Cook
On Thu, Apr 12, 2018 at 3:01 PM, Kees Cook wrote: > On Thu, Apr 12, 2018 at 12:04 PM, Oleksandr Natalenko > wrote: >> Hi. >> >> On čtvrtek 12. dubna 2018 20:44:37 CEST Kees Cook wrote: >>> My first bisect attempt gave me commit 5448aca41cd5 ("null_blk: wire >>> up timeouts"), which seems insane g

Re: 4.15.14 crash with iscsi target and dvd

2018-04-12 Thread Wakko Warner
Ming Lei wrote: > On Tue, Apr 10, 2018 at 08:45:25PM -0400, Wakko Warner wrote: > > Sorry for the delay. I reverted my change, added this one. I didn't > > reboot, I just unloaded and loaded this one. > > Note: /dev/sr1 as seen from the initiator is /dev/sr0 (physical disc) on the > > target. > >

Re: 4.15.14 crash with iscsi target and dvd

2018-04-12 Thread Ming Lei
On Thu, Apr 12, 2018 at 09:43:02PM -0400, Wakko Warner wrote: > Ming Lei wrote: > > On Tue, Apr 10, 2018 at 08:45:25PM -0400, Wakko Warner wrote: > > > Sorry for the delay. I reverted my change, added this one. I didn't > > > reboot, I just unloaded and loaded this one. > > > Note: /dev/sr1 as se

Re: MPT Fusion - ext4 delayed allocation failed errors on 4.14!

2018-04-12 Thread Martin K. Petersen
Nikola, > hmm, further checking 4.4.52, it was not really OK too: > > [ 1895.084325] blk_update_request: I/O error, dev sda, sector 239461608 > [ 1895.101099] sd 4:1:1:0: [sda] tag#1 FAILED Result: hostbyte=DID_OK > driverbyte=DRIVER_SENSE > [ 1895.101101] sd 4:1:1:0: [sda] tag#1 Sense Key : Ille

Re: [PATCH] iscsi: respond to netlink with unicast when appropriate

2018-04-12 Thread Martin K. Petersen
Chris, > Instead of always multicasting responses, send a unicast netlink message > directed at the correct pid. This will be needed if we ever want to > support multiple userspace processes interacting with the kernel over > iSCSI netlink simultaneously. Limitations can currently be seen if yo

Re: [PATCH] scsi_debug: IMMED related delay adjustments

2018-04-12 Thread Martin K. Petersen
Doug, > A patch titled: "[PATCH v2] scsi_debug: implement IMMED bit" > introduced long delays to the Start stop unit (SSU) and Synchronize > cache (SC) commands when the IMMED bit is clear. This patch makes > those delays more realistic. It causes SSU to only delay when the > start stop state is

Re: [PATCH][next] scsi: fnic: fix spelling mistake in fnic stats "Abord" -> "Abort"

2018-04-12 Thread Martin K. Petersen
Colin, > Trivial fix to spelling mistake in fnic stats message text Applied to 4.17/scsi-fixes. Thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: sr: get/drop reference to device in revalidate and check_events

2018-04-12 Thread Martin K. Petersen
Jens, > We can't just use scsi_cd() to get the scsi_cd structure, we have > to grab a live reference to the device. For both callbacks, we're > not inside an open where we already hold a reference to the device. Applied to 4.17/scsi-fixes, thanks! -- Martin K. Petersen Oracle Linux Engine

Re: usercopy whitelist woe in scsi_sense_cache

2018-04-12 Thread Kees Cook
On Thu, Apr 12, 2018 at 3:47 PM, Kees Cook wrote: > After fixing up some build issues in the middle of the 4.16 cycle, I > get an unhelpful bisect result of commit 0a4b6e2f80aa ("Merge branch > 'for-4.16/block'"). Instead of letting the test run longer, I'm going > to switch to doing several short

Re: [PATCHv2] tcmu: allow userspace to reset netlink

2018-04-12 Thread Xiubo Li
+ + if (val != 1) { + pr_err("Invalid block value %d\n", val); I think you wanted "Invalid reset value %d\n" Yeah, just copied it from other place. + return -EINVAL; + } + + spin_unlock(&udev->nl_cmd_lock); Need spin_lock() instead of unlock.

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

2018-04-12 Thread Hannes Reinecke
On Thu, 12 Apr 2018 13:32:07 -0600 "Bart Van Assche" wrote: > Since an SRP remote port is attached as a child to shost->shost_gendev > and as the only child, the translation from the shost pointer into an > rport pointer must happen by looking up the shost child that is an > rport. This patch fix

Re: MPT Fusion - ext4 delayed allocation failed errors on 4.14!

2018-04-12 Thread Nikola Ciprich
Hi Martin, thanks for explanation. but disabling write same for now is safe, right? to answer your questions: drives are SATA. root@siv-70140:~ # sg_inq /dev/sda standard INQUIRY: PQual=0 Device_type=0 RMB=0 version=0x02 [SCSI-2] [AERC=0] [TrmTsk=0] NormACA=0 HiSUP=0 Resp_data_form