Re: [PATCH 1/2] block: bio: ensure newly added bio flags don't override BVEC_POOL_IDX

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 21/03/2019 15:25, Jens Axboe wrote:
> On 3/21/19 8:23 AM, Johannes Thumshirn wrote:
>> On 21/03/2019 15:21, Jens Axboe wrote:
>>> On 3/21/19 8:15 AM, Jens Axboe wrote:
>>>> You also haven't solved the issue of now having an extra bit, 2/2 uses
>>>> the last bit which the other patch already took...
>>>
>>> Here's one way - kill BIO_SEG_VALID. We should just use
>>> ->bi_phys_segments to tell if it's valid or not. This patch uses -1 to
>>> signify it's not.
>>>
>>> Totally untested...
>>
>>
>> That sounds like an idea, I'll trow some testing at it and report back.
> 
> That'd be great, thanks. If we can do that as a prep patch for you, then
> you can just use an enum and not worry about initializing since I'll just
> shove BIO_PAGE_NO_REF at the end.
> 
> And this is simpler than having to shift the masks around.
> 


OK it survived xfstests on BTRFS and XFS(on zram) but blktests block/002
runs into this:

[    7.730469] WARNING: CPU: 1 PID: 283 at drivers/scsi/scsi_lib.c:1018
scsi_init_io+0x132/0x160 [scsi_mod]
[    7.732062] Modules linked in: scsi_debug(E+) scsi_mod(E) zram(E)
[    7.733094] CPU: 1 PID: 283 Comm: modprobe Tainted: G            E
  5.1.0-rc1-default+ #943
[    7.735046] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),
BIOS rel-1.11.0-0-g63451fc-prebuilt.qemu-project.org 04/01/2014
[    7.737504] RIP: 0010:scsi_init_io+0x132/0x160 [scsi_mod]
[    7.738408] Code: 39 c5 7c 47 48 8b 55 00 0f b7 92 78 04 00 00 39 d0
7f 36 4c 89 a3 10 01 00 00 41 89 44 24 08 31 c0 5b 5d 41 5c 41 5d 41 5e
c3 <0f> 0b b8 0a 00 00 00 eb 98 0f 0b b8 09 00 00 00 eb 8f 0f 0b 41 be
[    7.741442] RSP: 0018:ffffb35a402eb6d8 EFLAGS: 00010246
[    7.742296] RAX: 0000000000000002 RBX: ffff8d805f4d0118 RCX:
0000000000000024
[    7.743451] RDX: 0000000000000000 RSI: 0000000000000000 RDI:
ffff8d805f4d0118
[    7.744637] RBP: ffff8d805f4d0000 R08: 0000000000000000 R09:
ffff8d805f4d0150
[    7.745819] R10: 0000000000000024 R11: ffffb35a402eb7b8 R12:
ffff8d805f4d0000
[    7.746977] R13: ffff8d8052fbd000 R14: ffff8d805f4d0118 R15:
ffff8d805fbe4c00
[    7.748132] FS:  00007ffa8a26e700(0000) GS:ffff8d805cb00000(0000)
knlGS:0000000000000000
[    7.749438] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    7.750366] CR2: 00007ffa899c39b2 CR3: 00000000137d6000 CR4:
00000000000006e0
[    7.751520] Call Trace:
[    7.751940]  scsi_queue_rq+0x72a/0x9a0 [scsi_mod]
[    7.753358]  blk_mq_dispatch_rq_list+0x80/0x4b0
[    7.754100]  ? dd_dispatch_request+0x21/0x220
[    7.754815]  blk_mq_do_dispatch_sched+0x64/0xd0
[    7.755575]  blk_mq_sched_dispatch_requests+0xe9/0x160
[    7.756417]  __blk_mq_run_hw_queue+0x5f/0xf0
[    7.757108]  __blk_mq_delay_run_hw_queue+0x106/0x150
[    7.757913]  blk_mq_run_hw_queue+0x51/0x100
[    7.758595]  blk_mq_sched_insert_request+0xa2/0x130
[    7.759383]  blk_execute_rq+0x3b/0x80
[    7.759981]  __scsi_execute+0xb5/0x1e0 [scsi_mod]
[    7.760754]  scsi_probe_and_add_lun+0x270/0xd60 [scsi_mod]
[    7.761641]  ? scsi_alloc_target+0x274/0x340 [scsi_mod]
[    7.762487]  __scsi_scan_target+0xcc/0x220 [scsi_mod]
[    7.763307]  scsi_scan_channel.part.14+0x52/0x70 [scsi_mod]
[    7.764210]  scsi_scan_host_selected+0xe3/0x190 [scsi_mod]
[    7.765098]  ? __pm_runtime_resume+0x48/0x60
[    7.765807]  scsi_scan_host+0x16a/0x1b0 [scsi_mod]
[    7.766580]  sdebug_driver_probe+0x159/0x2c0 [scsi_debug]
[    7.767442]  ? driver_sysfs_add+0x71/0xd0
[    7.768101]  ? driver_allows_async_probing+0x50/0x50
[    7.768893]  really_probe+0x229/0x420
[    7.769492]  ? driver_allows_async_probing+0x50/0x50
[    7.770287]  driver_probe_device+0x115/0x130
[    7.770976]  ? driver_allows_async_probing+0x50/0x50
[    7.771770]  bus_for_each_drv+0x54/0x80
[    7.772398]  __device_attach+0xb2/0x130
[    7.773016]  bus_probe_device+0x8a/0xa0
[    7.773639]  device_add+0x496/0x670
[    7.774209]  sdebug_add_adapter+0xf1/0x1b0 [scsi_debug]
[    7.775049]  scsi_debug_init+0x6e3/0x1000 [scsi_debug]
[    7.775888]  ? 0xffffffffc011a000
[    7.776430]  do_one_initcall+0x4e/0x1d4
[    7.777048]  do_init_module+0x5a/0x21d
[    7.777652]  load_module+0x1926/0x1f00
[    7.778255]  ? m_show+0x1c0/0x1c0
[    7.778794]  __do_sys_finit_module+0x83/0xc0
[    7.779482]  do_syscall_64+0x5b/0x180
[    7.780079]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[    7.780882] RIP: 0033:0x7ffa89959969
[    7.781459] Code: 00 f3 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00
48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f
05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d ef 64 2b 00 f7 d8 64 89 01 48
[    7.784402] RSP: 002b:00007ffca3d05938 EFLAGS: 00000246 ORIG_RAX:
0000000000000139
[    7.785602] RAX: ffffffffffffffda RBX: 00000000010e6400 RCX:
00007ffa89959969
[    7.786740] RDX: 0000000000000000 RSI: 000000000042ac19 RDI:
0000000000000004
[    7.787858] RBP: 000000000042ac19 R08: 0000000000000000 R09:
00000000010e6310
[    7.788985] R10: 0000000000000004 R11: 0000000000000246 R12:
0000000000040000
[    7.790107] R13: 0000000000000000 R14: 00000000010e6530 R15:
0000000000000000


1013 blk_status_t scsi_init_io(struct scsi_cmnd *cmd)
1014 {
1015         struct request *rq = cmd->request;
1016         blk_status_t ret;
1017
1018         if (WARN_ON_ONCE(!blk_rq_nr_phys_segments(rq)))
1019                 return BLK_STS_IOERR;


Looking into it now.

-- 
Johannes Thumshirn                            SUSE Labs Filesystems
jthumshirn@xxxxxxx                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux