Re: [RFC 5/6] qedi: Add support for iSCSI session management.

2016-10-19 Thread Johannes Thumshirn
OFLDCONN_FAILED) || > + (qedi_ep->state == > + EP_STATE_OFLDCONN_COMPL)), > + msecs_to_jiffies(timeout_ms)); Maybe: #define QEDI_OLDCON_STATE(q) ((q)->state == E

Re: [RFC 3/6] qedi: Add QLogic FastLinQ offload iSCSI driver framework.

2016-10-19 Thread Johannes Thumshirn
"Unable to start tmf thread!\n"); > + rc = -ENODEV; > + goto free_cid_que; > + } > + > + sprintf(host_buf, "qedi_ofld%d", qedi->shost->host_no); > + qedi->offload_thread = create_workqueue(host_buf); &g

Re: [RFC 2/6] qed: Add iSCSI out of order packet handling.

2016-10-19 Thread Johannes Thumshirn
nfo, > + p_buffer); > + break; > + } > } > + > + /* Submit Tx buffers here */ > + while ((p_buffer = qed_ooo_get_ready_buffer(p_hwfn, > +

[PATCH RFC] fcping: allow pings using FC_BSG_RPT_ELS

2016-10-19 Thread Johannes Thumshirn
fcping uses FC-ELS to perform pings. FC ELS is a host as well as rport service, so allow the rport version of the BSG ioctl() as well as the host version. Signed-off-by: Johannes Thumshirn --- fcping.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a

Re: [RFC 1/6] qed: Add support for hardware offloaded iSCSI.

2016-10-20 Thread Johannes Thumshirn
you do not have strong > objections, I would like to keep it this way. No strong objections, I just don't think these lengthy blocks are readable, but I don't want to do too much bikeshedding about it. Thanks, Johannes -- Johannes Thumshirn

Re: [PATCH v3 02/16] scsi: don't use fc_bsg_job::request and fc_bsg_job::reply directly

2016-10-25 Thread Johannes Thumshirn
On Fri, Oct 14, 2016 at 09:38:21AM +0200, Johannes Thumshirn wrote: > On Thu, Oct 13, 2016 at 05:55:11PM +0200, Steffen Maier wrote: > > Hm, still behaves for me like I reported for v2: > > http://marc.info/?l=linux-scsi&m=147637177902937&w=2 > > Hi Steffen, > &g

Re: [PATCH 07/12] dm: Use BLK_MQ_S_STOPPED instead of QUEUE_FLAG_STOPPED in blk-mq code

2016-10-27 Thread Johannes Thumshirn
; Signed-off-by: Bart Van Assche > Reviewed-by: Christoph Hellwig Looks good, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409

Re: [PATCH 10/12] SRP transport, scsi-mq: Wait for .queue_rq() if necessary

2016-10-27 Thread Johannes Thumshirn
Hellwig 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 Norton HRB 21

Re: [PATCH 09/12] SRP transport: Move queuecommand() wait code to SCSI core

2016-10-27 Thread Johannes Thumshirn
Christoph Hellwig 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 No

Re: [PATCH 06/12] blk-mq: Add a kick_requeue_list argument to blk_mq_requeue_request()

2016-10-27 Thread Johannes Thumshirn
by Christoph Hellwig. > > Signed-off-by: Bart Van Assche > Cc: Christoph Hellwig Looks good, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH,

Re: [PATCH 02/12] blk-mq: Introduce blk_mq_hctx_stopped()

2016-10-27 Thread Johannes Thumshirn
On Wed, Oct 26, 2016 at 03:51:33PM -0700, Bart Van Assche wrote: > Multiple functions test the BLK_MQ_S_STOPPED bit so introduce > a helper function that performs this test. > > Signed-off-by: Bart Van Assche > Cc: Christoph Hellwig Looks good, Reviewed-by: Johannes Thumshirn

Re: [PATCH 04/12] blk-mq: Move more code into blk_mq_direct_issue_request()

2016-10-27 Thread Johannes Thumshirn
that function instead of looking it up a > second time. These changes avoid that code has to be duplicated > in the next patch. > > Signed-off-by: Bart Van Assche > Cc: Christoph Hellwig Looks good, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn

Re: [PATCH 04/12] blk-mq: Move more code into blk_mq_direct_issue_request()

2016-10-27 Thread Johannes Thumshirn
that function instead of looking it up a > second time. These changes avoid that code has to be duplicated > in the next patch. > > Signed-off-by: Bart Van Assche > Cc: Christoph Hellwig Looks good, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn

Re: [PATCH 01/12] blk-mq: Do not invoke .queue_rq() for a stopped queue

2016-10-27 Thread Johannes Thumshirn
Ming Lei > Signed-off-by: Bart Van Assche > Reviewed-by: Christoph Hellwig Looks good, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfelds

Re: [PATCH 1/4] hpsa: correct lockup detector pci_disable_device

2016-10-27 Thread Johannes Thumshirn
y is pci_disable_device() not checking for it? It does: 1607 void pci_disable_device(struct pci_dev *dev) 1608 { [...] 1615 dev_WARN_ONCE(&dev->dev, atomic_read(&dev->enable_cnt) <= 0, 1616 "disabling already-disabled device"); [...]

Re: [PATCH 03/12] blk-mq: Introduce blk_mq_queue_stopped()

2016-10-27 Thread Johannes Thumshirn
are contexts of a blk-mq queue have been stopped. > > Signed-off-by: Bart Van Assche > Reviewed-by: Hannes Reinecke Looks good, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+

Re: [PATCH] Avoid that SCSI device removal through sysfs triggers a deadlock

2016-10-27 Thread Johannes Thumshirn
an Assche > Cc: Hannes Reinecke > Cc: Johannes Thumshirn > Cc: Sagi Grimberg > Cc: > --- [...] > > +static void scsi_remove_device_async(struct scsi_device *sdev) > +{ > + if (scsi_device_get(sdev) < 0) Nit: the < 0 could be dropped, scsi_device_get ret

Re: [PATCH] Avoid that SCSI device removal through sysfs triggers a deadlock

2016-10-28 Thread Johannes Thumshirn
On Thu, Oct 27, 2016 at 08:38:03AM -0700, Bart Van Assche wrote: > On 10/27/2016 02:46 AM, Johannes Thumshirn wrote: > > On Wed, Oct 26, 2016 at 11:44:51AM -0700, Bart Van Assche wrote: > > > +static void scsi_remove_device_async(struct scsi_device *sdev) > > > +{ >

Re: Section mismatch in reference from the function generic_NCR5380_isa_match()

2016-10-29 Thread Johannes Thumshirn
us' tree already. [1] 77f18a871 ("scsi: NCR5380: no longer mark irq probing as __init") Byte, Johannes -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr.

Re: Need some pointers to debug a target hang

2016-10-29 Thread Johannes Thumshirn
On Sat, Oct 29, 2016 at 03:53:25PM -0700, Nicholas A. Bellinger wrote: > Hi Johannes & Zhu, > > On Tue, 2016-10-18 at 23:29 -0700, Nicholas A. Bellinger wrote: > > On Tue, 2016-10-18 at 19:35 +0200, Johannes Thumshirn wrote: > > > On Tue, Oct 18, 2016 at 09:01:34AM +02

Re: [PATCH v2 02/16] scsi: don't use fc_bsg_job::request and fc_bsg_job::reply directly

2016-10-30 Thread Johannes Thumshirn
ere bsg_reply is NULL. > The assignment tries to write to memory at address NULL causing the kernel > page fault. > > Does your suggested change for [PATCH v3 02/16], shuffling the > job->request_len checks, address above kernel page fault? This is what I hope at least. I

Re: Need some pointers to debug a target hang

2016-10-30 Thread Johannes Thumshirn
On Sat, Oct 29, 2016 at 03:53:25PM -0700, Nicholas A. Bellinger wrote: > Hi Johannes & Zhu, > > On Tue, 2016-10-18 at 23:29 -0700, Nicholas A. Bellinger wrote: > > On Tue, 2016-10-18 at 19:35 +0200, Johannes Thumshirn wrote: > > > On Tue, Oct 18, 2016 at 09:01:34AM +02

Re: [PATCH v3 02/16] scsi: don't use fc_bsg_job::request and fc_bsg_job::reply directly

2016-11-03 Thread Johannes Thumshirn
On Thu, Nov 03, 2016 at 08:17:51AM -0700, Christoph Hellwig wrote: > On Fri, Oct 14, 2016 at 09:38:21AM +0200, Johannes Thumshirn wrote: > > On Thu, Oct 13, 2016 at 05:55:11PM +0200, Steffen Maier wrote: > > > Hm, still behaves for me like I reported for v2: > > > http:

Re: [PREEMPT-RT] [REPOST PATCH 1/5] scsi: bnx2i: convert to kworker

2016-11-07 Thread Johannes Thumshirn
2i patches as well (althoug I wrote "for the whole series"). Testing was IIRC booting from the FCoE LUN and the doing a series of fio tests for about an hour. Byte, Johannes -- Johannes Thumshirn Storage jthumsh...@suse.de

[PATCH] libfc: fix seconds_since_last_reset miscalculation

2016-11-08 Thread Johannes Thumshirn
: $ cat /sys/class/fc_host/host8/statistics/seconds_since_last_reset 0x10624dd2f1977b4 Take this into account so /sys/class/fc_host/hostX/statistics/seconds_since_last_reset is sane again. Fixes: 540eb1eef ('scsi: libfc: fix seconds_since_last_reset calculation') Signed-off-by: Jo

Re: [PATCH] libfc: fix seconds_since_last_reset miscalculation

2016-11-15 Thread Johannes Thumshirn
et is computed. Shouldn't seconds_since_last_reset > be computed as follows? > > fc_stats->seconds_since_last_reset = (jiffies - boot_time) / HZ; But what happens when jiffies - boot_time becomes negative? Then we reintroduce the bug again and have 'fcoeadm -s' show weird va

Re: [PATCH v3 02/16] scsi: don't use fc_bsg_job::request and fc_bsg_job::reply directly

2016-11-15 Thread Johannes Thumshirn
On Tue, Oct 25, 2016 at 09:43:14AM +0200, Johannes Thumshirn wrote: > On Fri, Oct 14, 2016 at 09:38:21AM +0200, Johannes Thumshirn wrote: > > On Thu, Oct 13, 2016 at 05:55:11PM +0200, Steffen Maier wrote: > > > Hm, still behaves for me like I reported for v2: > > > http:

Re: [PATCH v3 02/16] scsi: don't use fc_bsg_job::request and fc_bsg_job::reply directly

2016-11-15 Thread Johannes Thumshirn
On Tue, Nov 15, 2016 at 03:31:27PM +0100, Steffen Maier wrote: > Hi Johannes, > > On 11/15/2016 12:56 PM, Johannes Thumshirn wrote: > > On Tue, Oct 25, 2016 at 09:43:14AM +0200, Johannes Thumshirn wrote: > > > On Fri, Oct 14, 2016 at 09:38:21AM +0200, Johannes Thumshirn wr

Re: [PATCH] libfc: fix seconds_since_last_reset miscalculation

2016-11-15 Thread Johannes Thumshirn
On Tue, Nov 15, 2016 at 02:50:17PM +, Bart Van Assche wrote: > On Tue, 2016-11-15 at 10:18 +0100, Johannes Thumshirn wrote: > > On Tue, Nov 08, 2016 at 03:04:43PM +, Bart Van Assche wrote: > > > I think the above code will miscalculate seconds_since_last_reset > &

Re: [PATCH v3 02/16] scsi: don't use fc_bsg_job::request and fc_bsg_job::reply directly

2016-11-15 Thread Johannes Thumshirn
On Tue, Nov 15, 2016 at 03:31:27PM +0100, Steffen Maier wrote: > Hi Johannes, > > On 11/15/2016 12:56 PM, Johannes Thumshirn wrote: > > On Tue, Oct 25, 2016 at 09:43:14AM +0200, Johannes Thumshirn wrote: > > > On Fri, Oct 14, 2016 at 09:38:21AM +0200, Johannes Thumshirn wr

Re: [PATCH v3 02/16] scsi: don't use fc_bsg_job::request and fc_bsg_job::reply directly

2016-11-16 Thread Johannes Thumshirn
On Tue, Nov 15, 2016 at 04:39:33PM +0100, Johannes Thumshirn wrote: > On Tue, Nov 15, 2016 at 03:31:27PM +0100, Steffen Maier wrote: > > Hi Johannes, > > > > On 11/15/2016 12:56 PM, Johannes Thumshirn wrote: > > > On Tue, Oct 25, 2016 at 09:43:14AM +0200, Johannes T

Re: [PATCH] mvsas: fix command_active typo

2016-11-16 Thread Johannes Thumshirn
&' makes the code look reasonable, as we check the > command bit before setting and printing it. > > Fixes: a4632aae8b66 ("[SCSI] mvsas: Add new macros and functions") > Signed-off-by: Arnd Bergmann > --- Looks reasonable, Reviewed-by: Johannes Thumshirn -- Jo

Re: [PATCH] libfc: fix seconds_since_last_reset miscalculation

2016-11-17 Thread Johannes Thumshirn
On Wed, Nov 16, 2016 at 05:58:14PM +0100, Arnd Bergmann wrote: > On Tuesday, November 15, 2016 4:05:31 PM CET Johannes Thumshirn wrote: > > On Tue, Nov 15, 2016 at 02:50:17PM +, Bart Van Assche wrote: > > > On Tue, 2016-11-15 at 10:18 +0100, Johannes Thumshirn wrote: >

[PATCH v4 03/15] scsi: fc: Export fc_bsg_jobdone and use it in FC drivers

2016-11-17 Thread Johannes Thumshirn
e can remove the function pointer from struct fc_bsg_job as well. Signed-off-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Acked-by: Tyrel Datwyler --- drivers/s390/scsi/zfcp_fc.c | 2 +- drivers/scsi/bfa/bfad_bsg.c | 6 ++-- drivers/scsi/ibm

[PATCH v4 01/15] scsi: Get rid of struct fc_bsg_buffer

2016-11-17 Thread Johannes Thumshirn
struct fc_bsg_buffer is just a clone of struct bsg_buffer from bsg-lib, so use this one instead. Signed-off-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig --- drivers/scsi/lpfc/lpfc_bsg.c | 3 ++- drivers/scsi/scsi_transport_fc.c | 2 +- include/scsi

[PATCH v4 05/15] scsi: fc: provide fc_bsg_to_rport() helper

2016-11-17 Thread Johannes Thumshirn
Provide fc_bsg_to_rport() helper that will become handy when we're moving from struct fc_bsg_job to a plain struct bsg_job. Also move all LLDDs to use the new helper. Signed-off-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Acked-by: Tyrel Datwyler --- drivers/s390/scsi/zfcp

[PATCH v4 10/15] scsi: fc: Use bsg_destroy_job

2016-11-17 Thread Johannes Thumshirn
fc_destroy_bsgjob() and bsg_destroy_job() are now 1:1 copies, so use the later. As bsg_destroy_job() comes from bsg-lib we need to select it in Kconfig once CONFOG_SCSI_FC_ATTRS is active. Signed-off-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke --- block/bsg-lib.c | 7

[PATCH v4 14/15] scsi: fc: move FC transport's bsg code to bsg-lib

2016-11-17 Thread Johannes Thumshirn
Now that all conversions are done, move the FibreChannel bsg code over to the bsg library. This patch is derived from work done by Mike Christie in 2011 [1] but only the iscsi parts got merged back then. [1] http://marc.info/?l=linux-scsi&m=131149780921009&w=2 Signed-off-by: Johannes T

[PATCH v4 12/15] scsi: fc: use bsg_job_done

2016-11-17 Thread Johannes Thumshirn
fc_bsg_jobdone() and bsg_job_done() are 1:1 copies now so use the bsg-lib one instead of the FC private implementation. Signed-off-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Acked-by: Tyrel Datwyler --- drivers/s390/scsi/zfcp_fc.c | 2 +- drivers/scsi/bfa/bfad_bsg.c | 4

[PATCH v4 09/15] scsi: change FC drivers to use 'struct bsg_job'

2016-11-17 Thread Johannes Thumshirn
Change FC drivers to use 'struct bsg_job' from bsg-lib.h instead of 'struct fc_bsg_job' from scsi_transport_fc.h and remove 'struct fc_bsg_job'. Signed-off-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Acked-by: Tyrel Datwyler --- drivers/s390/scsi/zfcp_ex

[PATCH v4 02/15] scsi: don't use fc_bsg_job::request and fc_bsg_job::reply directly

2016-11-17 Thread Johannes Thumshirn
Don't use fc_bsg_job::request and fc_bsg_job::reply directly, but use helper variables bsg_request and bsg_reply. This will be helpfull when transitioning to bsg-lib. Signed-off-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke --- drivers/s390/scsi/zfcp_fc.c | 9 +- drivers/scs

[PATCH v4 13/15] block: add bsg_job_put() and bsg_job_get()

2016-11-17 Thread Johannes Thumshirn
Add bsg_job_put() and bsg_job_get() so don't need to export bsg_destroy_job() any more. Signed-off-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke --- block/bsg-lib.c | 17 ++--- drivers/scsi/scsi_transport_fc.c | 4 ++-- include/linux/bsg-lib.h

[PATCH v4 11/15] scsi: fc: use bsg_softirq_done

2016-11-17 Thread Johannes Thumshirn
bsg_softirq_done() and fc_bsg_softirq_done() are copies of each other, so ditch the fc specific one. Signed-off-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke --- block/bsg-lib.c | 3 ++- drivers/scsi/scsi_transport_fc.c | 15 ++- include/linux/bsg-lib.h

[PATCH v4 07/15] scsi: fc: implement kref backed reference counting

2016-11-17 Thread Johannes Thumshirn
Implement kref backed reference counting instead of rolling our own. This elimnates the need of the following fields in 'struct fc_bsg_job': * ref_cnt * state_flags * job_lock bringing us close to unification of 'struct fc_bsg_job' and 'struct bsg_job'. Sig

[PATCH v4 04/15] scsi: fc: provide fc_bsg_to_shost() helper

2016-11-17 Thread Johannes Thumshirn
Provide fc_bsg_to_shost() helper that will become handy when we're moving from struct fc_bsg_job to a plain struct bsg_job. Also use this little helper in the LLDDs. Signed-off-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Acked-by: Tyrel Datwyler --- drivers/s390/scsi/zfcp

[PATCH v4 06/15] scsi: libfc: don't set FC_RQST_STATE_DONE before calling fc_bsg_jobdone()

2016-11-17 Thread Johannes Thumshirn
Don't set FC_RQST_STATE_DONE before calling fc_bsg_jobdone() as fc_bsg_jobdone() calls blk_complete_requeust() which raises a soft-IRQ that ends up in fc_bsg_sofirq_done() and fc_bsg_softirq_done() sets the FC_RQST_STATE_DONE flag. Signed-off-by: Johannes Thumshirn Reviewed-by: Hannes Rei

[PATCH v2] libfc: fix seconds_since_last_reset miscalculation

2016-11-17 Thread Johannes Thumshirn
Commit 540eb1eef 'scsi: libfc: fix seconds_since_last_reset calculation' removed the use of 'struct timespec' from fc_get_host_stats(). This broke the output of 'fcoeadm -s' after kernel 4.8-rc1. Fixes: 540eb1eef ('scsi: libfc: fix seconds_since_last_reset ca

[PATCH RESEND v4 08/15] block: add reference counting for struct bsg_job

2016-11-17 Thread Johannes Thumshirn
Add reference counting to 'struct bsg_job' so we can implement a reuqest timeout handler for bsg_jobs, which is needed for Fibre Channel. Signed-off-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke --- block/bsg-lib.c | 7 +-- include/linux/bsg-lib.h | 2 ++ 2 files

[PATCH RESEND v4 15/15] block: unexport bsg_softirq_done() again

2016-11-17 Thread Johannes Thumshirn
Unexport bsg_softirq_done() again, we don't need it outside of bsg-lib.c anymore now that scsi_transport_fc is a pure bsg-lib client. Signed-off-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke --- block/bsg-lib.c | 3 +-- include/linux/bsg-lib.h | 1 - 2 files changed, 1 inse

[PATCH RESEND v4 00/15] Convert FibreChannel bsg code to use bsg-lib

2016-11-17 Thread Johannes Thumshirn
bsg_job_done patches as requested by Christoph * Fixed the hopefully last bisection breaking point * Fixed kernel panic on s390 with patch 2/15 * Fixed kernel panic on s390 with patch 5/15 * Fixed zfcp_show output on s390 with patch 4/15 Johannes Thumshirn (15): scsi: Get rid of struct fc_bsg_b

Re: use PCI layer IRQ affinity in lpfc

2016-11-18 Thread Johannes Thumshirn
smp_affinity; done 44: 46: 48: 49: 51: 52: ettrick:~ # Anything else you want me to look at? Apart from that, for the whole series: Tested-by: Johannes Thumshirn Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn

Re: [PATCH] bfa: turn bfa_mem_{kva,dma}_setup into inline functions

2016-11-18 Thread Johannes Thumshirn
; '&&' instead [-Werror=int-in-bool-context] > > Using inline functions makes them much more readable and avoids > the warnings. > > Signed-off-by: Arnd Bergmann > --- Looks good, Reviewed-by: Johannes Thumshirn -- Johannes Thumsh

Re: use PCI layer IRQ affinity in lpfc

2016-11-18 Thread Johannes Thumshirn
On Fri, Nov 18, 2016 at 05:22:11AM -0800, Christoph Hellwig wrote: > On Fri, Nov 18, 2016 at 02:13:12PM +0100, Johannes Thumshirn wrote: > > This is what /proc/interrupts looks like after booting from the lpfc HBA, > > with your patches: > > > > ettrick:~ # grep lpfc

Re: use PCI layer IRQ affinity in lpfc

2016-11-18 Thread Johannes Thumshirn
On Fri, Nov 18, 2016 at 05:22:11AM -0800, Christoph Hellwig wrote: > On Fri, Nov 18, 2016 at 02:13:12PM +0100, Johannes Thumshirn wrote: > > This is what /proc/interrupts looks like after booting from the lpfc HBA, > > with your patches: > > > > ettrick:~ # grep lpfc

Re: [PATCH] mpt2sas: Fix secure erase premature termination.

2016-11-21 Thread Johannes Thumshirn
before the mpt{2,3}sas unification (a.k.a pre-4.4). Hope that helps. Byte, Johannes -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendör

Re: [PATCH 1/2] hpsa: cleanup sas_phy structures in sysfs when unloading

2016-11-21 Thread Johannes Thumshirn
or PHYs that > have been set up successfully, anyway). > > References: bsc#1010946. I don't think the SUSE bugzilla tag is of relevance upstream. But for sake of completeness we could add a Link: https://bugzilla.suse.com/show_bug.cgi?id=1010946 > Signed-off-by: Martin Wilck Re

Re: [PATCH 2/2] hpsa: destroy sas transport properties before scsi_host

2016-11-21 Thread Johannes Thumshirn
caused by the fact that host device hostX is deleted before the > SAS transport devices hostX/port-a:b. > > This patch fixes this by reverting the order of device deletions. > > References: bsc#1010946 > Signed-off-by: Martin Wilck > --- With the References

Re: SG does not ignore dxferp (direct io + mmap)

2016-11-21 Thread Johannes Thumshirn
ave a look at it. Byte, Johannes -- 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 Norton HRB 21284 (AG Nürnberg)

Re: SG does not ignore dxferp (direct io + mmap)

2016-11-21 Thread Johannes Thumshirn
On Mon, Nov 21, 2016 at 04:15:52PM +0100, Johannes Thumshirn wrote: > On Mon, Nov 21, 2016 at 04:55:29PM +0200, Eyal Ben David wrote: > > Thanks for your reply, > > > > On RHEL system it does not occur. > > > > So far I have seen the problem on Ubuntu 16.04 an

Re: [PATCH 1/2] hpsa: cleanup sas_phy structures in sysfs when unloading

2016-11-22 Thread Johannes Thumshirn
On Mon, Nov 21, 2016 at 10:47:20PM -0500, Martin K . Petersen wrote: > >>>>> "Johannes" == Johannes Thumshirn writes: > > Johannes> I don't think the SUSE bugzilla tag is of relevance upstream. > > Nope. I'd rather have really comprehensi

Re: SG does not ignore dxferp (direct io + mmap)

2016-11-22 Thread Johannes Thumshirn
ppears to > fix the issue when applied on top of 4.4. Still looking... This brings bad memories from commit 2d99b55d3 back to live, but this is applied on all test kernels I have. I too will run some bisection as well now that we have an easy reproducer and my

Re: SG does not ignore dxferp (direct io + mmap)

2016-11-22 Thread Johannes Thumshirn
es a difference. Byte, Johannes -- 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 Norton HRB 21284 (AG Nürnberg)

Re: [PATCH] lpfc: fix oops/BUG in lpfc_sli_ringtxcmpl_put()

2016-11-23 Thread Johannes Thumshirn
0 [lpfc] > [...] [...] lpfc_do_work+0xd88/0x1970 [lpfc] > [...] [...] kthread+0x108/0x130 > [...] [...] ret_from_kernel_thread+0x5c/0xbc > <...> > > Cc: sta...@vger.kernel.org # v4.8 > Fixes: 22466da5b4b7 ("lpfc: Fix possible NULL pointer dereference&

Re: SG does not ignore dxferp (direct io + mmap)

2016-11-25 Thread Johannes Thumshirn
and try to hunt it down. It'll be good to know if anyone of you can reproduce it with the above script as well. Byte, Johannes -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH,

Re: [patch] scsi: libfc: Remove an unneeded condition

2016-11-25 Thread Johannes Thumshirn
On Thu, Nov 24, 2016 at 01:52:38PM +0300, Dan Carpenter wrote: > We verified that resp_code is FC_SPP_RESP_ACK earlier so we don't need > to check again here. > > Signed-off-by: Dan Carpenter > Looks good, Acked-by: Johannes Thumshirn --

Re: SG does not ignore dxferp (direct io + mmap)

2016-11-25 Thread Johannes Thumshirn
* 100 VM:~ # uname -r 4.8.9-60-default+ VM:~ # Anyways, can you test the patch Ewan found on one of your kernel's that are known to fail? Byte, Johannes -- Johannes Thumshirn Storage jthu

Re: SG does not ignore dxferp (direct io + mmap)

2016-11-25 Thread Johannes Thumshirn
On Fri, Nov 25, 2016 at 12:53:17PM +0100, Johannes Thumshirn wrote: > On Fri, Nov 25, 2016 at 01:20:34PM +0200, Eyal Ben David wrote: > > Note that sg_mmap_read does not parse the SCSI sense, so the script > > might fail for other reasons (some SCSI error) and think its a zero >

Re: [PATCH] scsi: lpfc: Replace pci_pool_alloc by pci_pool_zalloc

2016-11-28 Thread Johannes Thumshirn
On Mon, Nov 28, 2016 at 03:22:37PM +0530, Souptick Joarder wrote: > In lpfc_new_scsi_buf_s3() and lpfc_new_scsi_buf_s4() pci_pool_alloc > followed by memset will be replaced by pci_pool_zalloc() > > Signed-off-by: Souptick joarder > --- Looks good, Reviewed-by: Johannes Thumshirn

Re: SG does not ignore dxferp (direct io + mmap)

2016-11-28 Thread Johannes Thumshirn
eam bug report. I was tracing it down to the exact opposite of this KASAN report [1] which came in over the weekend, so I'll be looking into this one as well now. [1] http://www.spinics.net/lists/linux-scsi/msg102232.html Byte, Johannes --

Re: scsi: use-after-free in bio_copy_from_iter

2016-12-03 Thread Johannes Thumshirn
_len in the SG driver. I did a lot of debugging (actually I spend the whole last work week soley on this) but I can't find where it does the actual use-after-free, so if you have anything to share I'd be glad. Byte, Johannes -- Johannes Thumshirn

Re: scsi: use-after-free in bio_copy_from_iter

2016-12-03 Thread Johannes Thumshirn
On Sat, Dec 03, 2016 at 04:22:39PM +0100, Dmitry Vyukov wrote: > On Sat, Dec 3, 2016 at 11:38 AM, Johannes Thumshirn > wrote: > > On Fri, Dec 02, 2016 at 05:50:39PM +0100, Dmitry Vyukov wrote: > >> On Fri, Nov 25, 2016 at 8:08 PM, Dmitry Vyukov wrote: [...] Hi Dmitry, &g

Re: scsi: use-after-free in bio_copy_from_iter

2016-12-05 Thread Johannes Thumshirn
On Mon, Dec 05, 2016 at 03:31:43PM +0100, Dmitry Vyukov wrote: > On Sat, Dec 3, 2016 at 7:19 PM, Johannes Thumshirn wrote: > > On Sat, Dec 03, 2016 at 04:22:39PM +0100, Dmitry Vyukov wrote: > >> On Sat, Dec 3, 2016 at 11:38 AM, Johannes Thumshirn > >> wrote: > >

Re: scsi: use-after-free in bio_copy_from_iter

2016-12-06 Thread Johannes Thumshirn
On Mon, Dec 05, 2016 at 07:03:39PM +, Al Viro wrote: > On Mon, Dec 05, 2016 at 04:17:53PM +0100, Johannes Thumshirn wrote: > > 633 hp = &srp->header; > > [...] > > 646 hp->dxferp = (char __user *)buf + cmd_size; > > > So the m

Re: [PATCH] scsi: mvsas: Replace pci_pool_alloc by pci_pool_zalloc

2016-12-06 Thread Johannes Thumshirn
On Mon, Nov 28, 2016 at 04:56:26PM +0530, Souptick Joarder wrote: > Inside mvs_task_prep(), pci_pool_alloc() followed by memset will be > replaced by pci_pool_zalloc() > > Signed-off-by: Souptick joarder > --- FWIW, Reviewed-by: Johannes Thumshirn -- Joh

Re: scsi: use-after-free in bio_copy_from_iter

2016-12-06 Thread Johannes Thumshirn
On Tue, Dec 06, 2016 at 10:43:57AM +0100, Dmitry Vyukov wrote: > On Tue, Dec 6, 2016 at 10:32 AM, Johannes Thumshirn > wrote: > > On Mon, Dec 05, 2016 at 07:03:39PM +, Al Viro wrote: > >> On Mon, Dec 05, 2016 at 04:17:53PM +0100, Johannes Thumshirn wrote: > >> &

Re: [PATCH 1/1] scsi: fcoe: return value of skb_linearize should be handled

2016-12-07 Thread Johannes Thumshirn
for skb_is_nonlinear is within skb_linearize */ - + if (skb_linearize(skb)) + goto free_skb; /* * Frame length checks and setting up the header pointers * was done in fcoe_rcv already. @@ -1732,6 +1731,7 @@ static void fcoe_recv_frame(struct sk_buff *skb

Re: [PATCH 2/2] ibmvscsi: log bad SRP response opcode in hex format

2016-12-08 Thread Johannes Thumshirn
d-off-by: Tyrel Datwyler > --- 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, Jan

Re: [PATCH 1/2] ibmvscsi: add vscsi hosts to global list_head

2016-12-08 Thread Johannes Thumshirn
; > Signed-off-by: Tyrel Datwyler > --- 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

Re: [PATCH] ibmvscsi: add write memory barrier to CRQ processing

2016-12-08 Thread Johannes Thumshirn
done = 1; > } Is this something you have seen in the wild or just a "better save than sorry" barrier? Thanks, Johannes -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 740

Re: [PATCH v2] lpfc: Fix possible NULL pointer dereference

2016-12-09 Thread Johannes Thumshirn
On Thu, Dec 08, 2016 at 11:01:30AM -0800, James Bottomley wrote: > On Tue, 2016-08-02 at 01:17 -0400, Martin K. Petersen wrote: > > > > > > > "Johannes" == Johannes Thumshirn > > > > > > > writes: > > > > Johannes> Check for t

Re: [PREEMPT-RT] bnx2i + bnx2fc: convert to generic workqueue (#2)

2016-12-09 Thread Johannes Thumshirn
ap > in 4.10. This one of the last holdouts. As I already said, the FCoE part looks OK and is tested. Lee, Chris can you do some testing with the iSCSI part as well, seems like Chad isn't reachable. Thanks, Johannes -- Johannes Thumshirn

Re: Samsung SSD 1.92TB PM863 Enterprise 2.5" SATA3 errors withc stable 4.4.34

2016-12-14 Thread Johannes Thumshirn
10b to 8b decoding error occurred DevExch: Device presence has changed This could indicate a problem with the cabling and/or connectors. Byte, Johannes -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 7

Re: Uninitialized variable in bfad_im_bsg_els_ct_request

2017-01-09 Thread Johannes Thumshirn
>reply; uint32_t command_type = bsg_request->msgcode; unsigned long flags; I'll send out an official patch soon, thanks for the report. Johannes -- Johannes Thumshirn Storage jthumsh...@suse.de

[PATCH] Set elsiocb contexts to NULL after freeing it

2017-01-10 Thread Johannes Thumshirn
Set the elsiocb contexts to NULL after freeing as others depend on it. Signed-off-by: Johannes Thumshirn --- drivers/scsi/lpfc/lpfc_els.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 236e4e5..7b6bd8e 100644 --- a/drivers

Re: [PATCH] scsi: remove useless acpi functions in the head file

2017-01-10 Thread Johannes Thumshirn
the head file, do it now. ^ header? > > Signed-off-by: Hanjun Guo > --- Otherwise, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de

[PATCH] bfa: fix wrongly initialized variable in bfad_im_bsg_els_ct_request()

2017-01-10 Thread Johannes Thumshirn
Iooss Signed-off-by: Johannes Thumshirn --- drivers/scsi/bfa/bfad_bsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/bfa/bfad_bsg.c b/drivers/scsi/bfa/bfad_bsg.c index a9a0016..b2e8c0d 100644 --- a/drivers/scsi/bfa/bfad_bsg.c +++ b/drivers/scsi/bfa/bfad_bsg.

Re: [LSF/MM TOPIC ATTEND] kernel booting using remote storage is a mess

2017-01-10 Thread Johannes Thumshirn
at we live in now. As this applies to FCoE as well as iSCSI I'd be very interested in this session as well. Byte, Johannes -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH,

Re: [PATCH] scsi: qedi: select UIO

2017-01-10 Thread Johannes Thumshirn
.1': > qedi_main.c:(.text.__qedi_probe.constprop.1+0x1368): undefined reference to > `__uio_register_device' > > This adds a compile-time dependency. > > Fixes: ace7f46ba5fd ("scsi: qedi: Add QLogic FastLinQ offload iSCSI driver > framework.") >

Re: [PATCH 01/15] virtio_blk: avoid DMA to stack for the sense buffer

2017-01-11 Thread Johannes Thumshirn
s' tree? Byte, Johannes -- 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 Norton HRB 21284 (AG Nürnberg) Key finger

Re: [PATCH 14/15] block/bsg: move queue creation into bsg_setup_queue

2017-01-11 Thread Johannes Thumshirn
On Tue, Jan 10, 2017 at 04:06:19PM +0100, Christoph Hellwig wrote: > Simply the boilerplate code needed for bsg nodes a bit. > > Signed-off-by: Christoph Hellwig > --- that reminds me of posting my SAS bsg-lib patch... Anyways looks good, Reviewed-by: Johannes Thumshirn

Re: [PATCH 14/15] block/bsg: move queue creation into bsg_setup_queue

2017-01-11 Thread Johannes Thumshirn
On Wed, Jan 11, 2017 at 09:45:12AM +0100, Christoph Hellwig wrote: > On Wed, Jan 11, 2017 at 09:42:44AM +0100, Johannes Thumshirn wrote: > > On Tue, Jan 10, 2017 at 04:06:19PM +0100, Christoph Hellwig wrote: > > > Simply the boilerplate code needed for bsg nodes a bit. > >

Re: [LFS/MM TOPIC][LFS/MM ATTEND]: - Storage Stack and Driver Testing methodology.

2017-01-11 Thread Johannes Thumshirn
validation? > 6. Whether QEMU can be used to emulate some of the H/W functionality to > create a test  >   platform? (Optional subsystem specific) Well, something I was thinking about but didn't find enough time to actually implement is making a xfstestes like test suite written usin

[PATCH] lpfc: avoid double free of resource identifiers

2017-01-11 Thread Johannes Thumshirn
From: Roberto Sassu Set variables initialized in lpfc_sli4_alloc_resource_identifiers() to NULL if an error occurred. Otherwise, lpfc_sli4_driver_resource_unset() attempts to free the memory again. Signed-off-by: Roberto Sassu Signed-off-by: Johannes Thumshirn --- drivers/scsi/lpfc

Re: [PATCH] qla4xxx: remove two unused MSI-X related #defines

2017-01-11 Thread Johannes Thumshirn
On Wed, Jan 11, 2017 at 02:26:52PM +0100, Christoph Hellwig wrote: > Spotted while preparing qla2xxx changes as the symbols exist in both > drivers (sigh..). > > Signed-off-by: Christoph Hellwig > --- Looks good, Reviewed-by: Johannes Thumshirn -- Joh

[LSF/MM TOPIC][LSF/MM ATTEND] NAPI polling for block drivers

2017-01-11 Thread Johannes Thumshirn
M I'd like to whether it is desirable to have NAPI like polling in more block drivers and how to overcome the currently seen performance issues. [1] http://lists.infradead.org/pipermail/linux-nvme/2016-October/006975.html Byte, Johannes -- Joh

[PATCH RFC] sas: convert to bsg-lib

2017-01-11 Thread Johannes Thumshirn
Convert the SAS transport class over to using bsg-lib instead of doing "raw" bsg access. Signed-off-by: Johannes Thumshirn --- drivers/scsi/scsi_transport_sas.c | 41 +++ 1 file changed, 16 insertions(+), 25 deletions(-) diff --git a/dr

Re: [LSF/MM TOPIC][LSF/MM ATTEND] NAPI polling for block drivers

2017-01-11 Thread Johannes Thumshirn
can't you? I'll do some prototyping and tests tomorrow so we have some more ground for discussion. Byte, Johannes -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxf

Re: [LSF/MM TOPIC][LSF/MM ATTEND] NAPI polling for block drivers

2017-01-12 Thread Johannes Thumshirn
e this if I > can find volunteers with high-end nvme devices (I only have access > to client nvme devices. I have a P3700 but somehow burned the FW. Let me see if I can bring it back to live. I also have converted AHCI to the irq_poll interface and will run some tests. I do also have s

Re: [LSF/MM TOPIC][LSF/MM ATTEND] NAPI polling for block drivers

2017-01-12 Thread Johannes Thumshirn
ly in qemu or with real H/W as well? > > Note that I ran randrw because I was backed with null_blk, testing > with a real nvme device, you should either run randread or write, and > if you do a write, you can't run it multi-threaded (well you can, but >

Re: [Lsf-pc] [LSF/MM TOPIC][LSF/MM ATTEND] NAPI polling for block drivers

2017-01-12 Thread Johannes Thumshirn
> >Did you do testing only in qemu or with real H/W as well? > > I tried once. IIRC, I saw the same phenomenons... JFTR I tried my AHCI irq_poll patch on the Qemu emulation and the read throughput dropped from ~1GB/s to ~350MB/s. But this can be related to Qemu's

<    1   2   3   4   5   6   7   8   9   10   >