On 10/19/18 9:01 AM, Benjamin Block wrote:
> On Wed, Oct 17, 2018 at 10:01:16AM -0600, Jens Axboe wrote:
>> On 10/17/18 9:55 AM, Benjamin Block wrote:
>>> On Tue, Oct 16, 2018 at 08:43:01AM -0600, Jens Axboe wrote:
>>>> Requires a few changes to the FC transport class as well.
>>>>
>>>> Cc: Johannes Thumshirn <jthumsh...@suse.de>
>>>> Cc: Benjamin Block <bbl...@linux.vnet.ibm.com>
>>>> Cc: linux-scsi@vger.kernel.org
>>>> Signed-off-by: Jens Axboe <ax...@kernel.dk>
>>>> ---
>>>>  block/bsg-lib.c                  | 102 +++++++++++++++++--------------
>>>>  drivers/scsi/scsi_transport_fc.c |  61 ++++++++++--------
>>>>  2 files changed, 91 insertions(+), 72 deletions(-)
>>>>
>>>
>>> Hey Jens,
>>>
>>> I haven't had time to look into this in any deep way - but I did plan to
>>> -, but just to see whether it starts and runs some I/O I tried giving it
>>> a spin and came up with nothing (see line 3 and 5):
>>
>> I'm an idiot, can you try this on top?
>>
>>
>> diff --git a/block/bsg-lib.c b/block/bsg-lib.c
>> index 1aa0ed3fc339..95e12b635225 100644
>> --- a/block/bsg-lib.c
>> +++ b/block/bsg-lib.c
>> @@ -311,7 +311,7 @@ struct request_queue *bsg_setup_queue(struct device 
>> *dev, const char *name,
>>      int ret = -ENOMEM;
>>  
>>      set = kzalloc(sizeof(*set), GFP_KERNEL);
>> -    if (set)
>> +    if (!set)
>>              return ERR_PTR(-ENOMEM);
>>  
>>      set->ops = &bsg_mq_ops;
>>
> 
> Well, yes, that would be wrong. But it still doesn't fly (s390x stack
> trace):
> 
> [   36.271953] scsi host0: scsi_eh_0: sleeping
> [   36.272571] scsi host0: zfcp
> [   36.298065] WARNING: CPU: 7 PID: 856 at block/blk-settings.c:71 
> blk_queue_rq_timed_out+0x44/0x60
> [   36.298315] Modules linked in: zfcp scsi_transport_fc dm_multipath ....
> [   36.299015] CPU: 7 PID: 856 Comm: systemd-udevd Tainted: G        W        
>  4.19.0-rc8-bb-next+ #1
> [   36.299059] Hardware name: IBM 3906 M03 704 (LPAR)
> [   36.299101] Krnl PSW : 0704e00180000000 0000000000ced494 
> (blk_queue_rq_timed_out+0x44/0x60)
> [   36.299192]            R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3 CC:2 PM:0 
> RI:0 EA:3
> [   36.299259] Krnl GPRS: 0000000000000000 00000000015cee60 00000000a0ce0180 
> 0000030000000000
> [   36.299304]            0000030000000000 0000000000ced486 00000000a5738000 
> 000003ff8069eba0
> [   36.299349]            00000000a11ec6a8 00000000a0ce0000 00000000a11ec400 
> 000003ff805ee438
> [   36.299394]            00000000a0ce0000 000003ff805f6b00 0000000000ced486 
> 00000000a28af0b0
> [   36.299460] Krnl Code: 0000000000ced486: e310c1800002        ltg     
> %r1,384(%r12)
>                           0000000000ced48c: a7840004            brc     
> 8,ced494
>                          #0000000000ced490: a7f40001            brc     
> 15,ced492
>                          >0000000000ced494: 4120c150            la      
> %r2,336(%r12)
>                           0000000000ced498: c0e5ffc76290        brasl   
> %r14,5d99b8
>                           0000000000ced49e: e3b0c1500024        stg     
> %r11,336(%r12)
>                           0000000000ced4a4: ebbff0a00004        lmg     
> %r11,%r15,160(%r15)
>                           0000000000ced4aa: 07fe                bcr     
> 15,%r14
> [   36.299879] Call Trace:
> [   36.299922] ([<00000000a11ec6a8>] 0xa11ec6a8)
> [   36.299979]  [<000003ff805ee3fa>] fc_host_setup+0x622/0x660 
> [scsi_transport_fc] 
> [   36.300029]  [<0000000000f0baca>] transport_setup_classdev+0x62/0x70 
> [   36.300075]  [<0000000000f0b592>] 
> attribute_container_add_device+0x182/0x1d0 
> [   36.300163]  [<000003ff80503cae>] scsi_sysfs_add_host+0x5e/0x100 
> [scsi_mod] 
> [   36.300245]  [<000003ff804e6d7c>] scsi_add_host_with_dma+0x2dc/0x468 
> [scsi_mod] 
> [   36.300310]  [<000003ff806835f2>] zfcp_scsi_adapter_register+0x222/0x260 
> [zfcp] 
> [   36.300373]  [<000003ff8066a49a>] zfcp_adapter_enqueue+0xae2/0xb20 [zfcp] 
> [   36.300435]  [<000003ff8066b436>] zfcp_ccw_set_online+0xb6/0x208 [zfcp] 
> [   36.300482]  [<0000000000f8ad14>] ccw_device_set_online+0x41c/0x878 
> [   36.300527]  [<0000000000f8b374>] 
> online_store_recog_and_online+0x204/0x230 
> [   36.300572]  [<0000000000f8de20>] online_store+0x290/0x3e8 
> [   36.300619]  [<00000000007842c0>] kernfs_fop_write+0x1b0/0x288 
> [   36.300663]  [<000000000064217e>] __vfs_write+0xee/0x398 
> [   36.300705]  [<00000000006426b4>] vfs_write+0xec/0x238 
> [   36.300754]  [<0000000000642abe>] ksys_write+0xd6/0x148 
> [   36.300800]  [<000000000137b668>] system_call+0x2b0/0x2d0 
> [   36.300843] 5 locks held by systemd-udevd/856:
> [   36.300882]  #0: 00000000da3c74e2 (sb_writers#4){.+.+}, at: 
> vfs_write+0xd6/0x238
> [   36.301053]  #1: 000000002a1f461f (&of->mutex){+.+.}, at: 
> kernfs_fop_write+0x258/0x288
> [   36.301202]  #2: 00000000deb28615 (kn->count#52){.+.+}, at: 
> kernfs_fop_write+0x26e/0x288
> [   36.301374]  #3: 000000002ddb9663 (&dev->mutex){....}, at: 
> online_store+0x19c/0x3e8
> [   36.301523]  #4: 00000000982b5ed9 (attribute_container_mutex){+.+.}, at: 
> attribute_container_add_device+0x3c/0x1d0
> [   36.301675] Last Breaking-Event-Address:
> [   36.301717]  [<0000000000ced490>] blk_queue_rq_timed_out+0x40/0x60
> [   36.301758] irq event stamp: 9073
> [   36.301804] hardirqs last  enabled at (9081): [<000000000028bd7e>] 
> console_unlock+0xa46/0xb20
> [   36.301851] hardirqs last disabled at (9088): [<000000000028b5b6>] 
> console_unlock+0x27e/0xb20
> [   36.301900] softirqs last  enabled at (8334): [<00000000010853c0>] 
> peernet2id+0xd8/0xf0
> [   36.301947] softirqs last disabled at (8332): [<0000000001085380>] 
> peernet2id+0x98/0xf0
> [   36.301989] ---[ end trace 32ec744f85308e9e ]---
> [   36.307495] qdio: 0.0.1900 ZFCP on SC 107 using AI:1 QEBSM:0 PRI:1 TDD:1 
> SIGA: W AP
> 
> This should be here:
> 
>       static int
>       fc_bsg_hostadd(struct Scsi_Host *shost, struct fc_host_attrs *fc_host)
>       {
>               struct device *dev = &shost->shost_gendev;
>               struct fc_internal *i = to_fc_internal(shost->transportt);
>               struct request_queue *q;
>               char bsg_name[20];
> 
>               fc_host->rqst_q = NULL;
> 
>               if (!i->f->bsg_request)
>                       return -ENOTSUPP;
> 
>               snprintf(bsg_name, sizeof(bsg_name),
>                        "fc_host%d", shost->host_no);
> 
>               q = bsg_setup_queue(dev, bsg_name, fc_bsg_dispatch, 
> i->f->dd_bsg_size);
>               if (IS_ERR(q)) {
>                       dev_err(dev,
>                               "fc_host%d: bsg interface failed to initialize 
> - setup queue\n",
>                               shost->host_no);
>                       return PTR_ERR(q);
>               }
>               __scsi_init_queue(shost, q);
> ====>         blk_queue_rq_timed_out(q, fc_bsg_job_timeout);
>               fc_host->rqst_q = q;
>               return 0;
>       }
> 
> Guessing it has also to do with the series.

It does, you'll want this one as well:

http://git.kernel.dk/cgit/linux-block/commit/?h=mq-conversions&id=e930a73f3112c9c617303253fba4e754eb5d0491

but that's not going to apply cleanly... Can you just try and run my
mq-conversions branch? That has everything, and it also has that
alloc failure fixed.

git://git.kernel.dk/linux-block mq-conversions


-- 
Jens Axboe

Reply via email to