2020-06-29 20:01:52

by Christoph Hellwig

[permalink] [raw]
Subject: rename ->make_request_fn and move it to the block_device_operations

Hi Jens,

this series moves the make_request_fn method into block_device_operations
with the much more descriptive ->submit_bio name. It then also gives
generic_make_request a more descriptive name, and further optimize the
path to issue to blk-mq, removing the need for the direct_make_request
bypass.

Diffstat:
Documentation/block/biodoc.rst | 2
Documentation/block/writeback_cache_control.rst | 2
Documentation/fault-injection/fault-injection.rst | 2
Documentation/trace/ftrace.rst | 4
arch/m68k/emu/nfblock.c | 8
arch/xtensa/platforms/iss/simdisk.c | 9
block/bio.c | 14 -
block/blk-cgroup.c | 2
block/blk-core.c | 255 +++++++++-------------
block/blk-crypto-fallback.c | 2
block/blk-crypto.c | 2
block/blk-merge.c | 23 -
block/blk-mq.c | 12 -
block/blk-throttle.c | 4
block/blk.h | 5
block/bounce.c | 2
drivers/block/brd.c | 5
drivers/block/drbd/drbd_int.h | 8
drivers/block/drbd/drbd_main.c | 12 -
drivers/block/drbd/drbd_receiver.c | 2
drivers/block/drbd/drbd_req.c | 8
drivers/block/drbd/drbd_worker.c | 2
drivers/block/null_blk_main.c | 19 +
drivers/block/pktcdvd.c | 15 -
drivers/block/ps3vram.c | 20 -
drivers/block/rsxx/dev.c | 14 -
drivers/block/umem.c | 11
drivers/block/zram/zram_drv.c | 14 -
drivers/lightnvm/core.c | 8
drivers/lightnvm/pblk-init.c | 16 -
drivers/lightnvm/pblk-read.c | 2
drivers/md/bcache/bcache.h | 2
drivers/md/bcache/btree.c | 2
drivers/md/bcache/request.c | 11
drivers/md/bcache/request.h | 4
drivers/md/bcache/super.c | 24 +-
drivers/md/dm-cache-target.c | 6
drivers/md/dm-clone-target.c | 10
drivers/md/dm-crypt.c | 6
drivers/md/dm-delay.c | 2
drivers/md/dm-era-target.c | 2
drivers/md/dm-integrity.c | 4
drivers/md/dm-mpath.c | 2
drivers/md/dm-raid1.c | 2
drivers/md/dm-snap-persistent.c | 2
drivers/md/dm-snap.c | 6
drivers/md/dm-thin.c | 4
drivers/md/dm-verity-target.c | 2
drivers/md/dm-writecache.c | 2
drivers/md/dm-zoned-target.c | 2
drivers/md/dm.c | 41 +--
drivers/md/md-faulty.c | 4
drivers/md/md-linear.c | 4
drivers/md/md-multipath.c | 4
drivers/md/md.c | 7
drivers/md/raid0.c | 8
drivers/md/raid1.c | 14 -
drivers/md/raid10.c | 28 +-
drivers/md/raid5.c | 10
drivers/nvdimm/blk.c | 5
drivers/nvdimm/btt.c | 5
drivers/nvdimm/pmem.c | 5
drivers/nvme/host/core.c | 1
drivers/nvme/host/multipath.c | 18 -
drivers/nvme/host/nvme.h | 1
drivers/s390/block/dcssblk.c | 11
drivers/s390/block/xpram.c | 8
fs/buffer.c | 5
include/linux/blk-mq.h | 2
include/linux/blkdev.h | 12 -
include/linux/lightnvm.h | 3
71 files changed, 387 insertions(+), 408 deletions(-)


2020-06-30 13:59:10

by Jens Axboe

[permalink] [raw]
Subject: Re: rename ->make_request_fn and move it to the block_device_operations

On 6/29/20 1:39 PM, Christoph Hellwig wrote:
> Hi Jens,
>
> this series moves the make_request_fn method into block_device_operations
> with the much more descriptive ->submit_bio name. It then also gives
> generic_make_request a more descriptive name, and further optimize the
> path to issue to blk-mq, removing the need for the direct_make_request
> bypass.

Looks good to me, and it's a nice cleanup as well. Applied.

--
Jens Axboe

2020-06-30 15:44:28

by Jens Axboe

[permalink] [raw]
Subject: Re: rename ->make_request_fn and move it to the block_device_operations

On 6/30/20 7:57 AM, Jens Axboe wrote:
> On 6/29/20 1:39 PM, Christoph Hellwig wrote:
>> Hi Jens,
>>
>> this series moves the make_request_fn method into block_device_operations
>> with the much more descriptive ->submit_bio name. It then also gives
>> generic_make_request a more descriptive name, and further optimize the
>> path to issue to blk-mq, removing the need for the direct_make_request
>> bypass.
>
> Looks good to me, and it's a nice cleanup as well. Applied.

Dropped, insta-crashes with dm:

[ 10.240134] BUG: kernel NULL pointer dereference, address: 0000000000000000
[ 10.241000] #PF: supervisor instruction fetch in kernel mode
[ 10.241666] #PF: error_code(0x0010) - not-present page
[ 10.242280] PGD 0 P4D 0
[ 10.242600] Oops: 0010 [#1] PREEMPT SMP
[ 10.243073] CPU: 1 PID: 2110 Comm: systemd-udevd Not tainted 5.8.0-rc3+ #6655
[ 10.243939] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1 04/01/2014
[ 10.245012] RIP: 0010:0x0
[ 10.245322] Code: Bad RIP value.
[ 10.245695] RSP: 0018:ffffc900002f7af8 EFLAGS: 00010246
[ 10.246333] RAX: ffffffff81c83520 RBX: ffff8881b805dea8 RCX: ffff88819e844070
[ 10.247227] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff88819e844070
[ 10.248112] RBP: ffffc900002f7b48 R08: ffff8881b6f38800 R09: ffff88818ff0ea58
[ 10.248994] R10: 0000000000000000 R11: ffff88818ff0ea58 R12: ffff88819e844070
[ 10.250077] R13: 00000000ffffffff R14: 0000000000000000 R15: ffff888107812948
[ 10.251168] FS: 00007f5c3ed66a80(0000) GS:ffff8881b9c80000(0000) knlGS:0000000000000000
[ 10.252161] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 10.253189] CR2: ffffffffffffffd6 CR3: 00000001b2953003 CR4: 00000000001606e0
[ 10.254157] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 10.255279] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 10.256365] Call Trace:
[ 10.256781] submit_bio_noacct+0x1f6/0x3d0
[ 10.257297] submit_bio+0x37/0x130
[ 10.257780] ? guard_bio_eod+0x2e/0x70
[ 10.258418] mpage_readahead+0x13c/0x180
[ 10.259096] ? blkdev_direct_IO+0x490/0x490
[ 10.259654] read_pages+0x68/0x2d0
[ 10.260051] page_cache_readahead_unbounded+0x1b7/0x220
[ 10.260818] generic_file_buffered_read+0x865/0xc80
[ 10.261587] ? _copy_to_user+0x6d/0x80
[ 10.262171] ? cp_new_stat+0x119/0x130
[ 10.262680] new_sync_read+0xfe/0x170
[ 10.263155] vfs_read+0xc8/0x180
[ 10.263647] ksys_read+0x53/0xc0
[ 10.264209] do_syscall_64+0x3c/0x70
[ 10.264759] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 10.265200] RIP: 0033:0x7f5c3fcc9ab2
[ 10.265510] Code: Bad RIP value.
[ 10.265775] RSP: 002b:00007ffc8e0cf9c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
[ 10.266426] RAX: ffffffffffffffda RBX: 000055d5eca76c68 RCX: 00007f5c3fcc9ab2
[ 10.267012] RDX: 0000000000000040 RSI: 000055d5eca76c78 RDI: 0000000000000006
[ 10.267591] RBP: 000055d5eca44890 R08: 000055d5eca76c50 R09: 00007f5c3fd99a40
[ 10.268168] R10: 0000000000000008 R11: 0000000000000246 R12: 000000003bd90000
[ 10.268744] R13: 0000000000000040 R14: 000055d5eca76c50 R15: 000055d5eca448e0
[ 10.269319] Modules linked in:
[ 10.269562] CR2: 0000000000000000
[ 10.269845] ---[ end trace f09b8963e5a3593b ]---

--
Jens Axboe

2020-06-30 20:42:21

by Jens Axboe

[permalink] [raw]
Subject: Re: rename ->make_request_fn and move it to the block_device_operations

On 6/30/20 12:19 PM, Christoph Hellwig wrote:
> On Tue, Jun 30, 2020 at 09:43:31AM -0600, Jens Axboe wrote:
>> On 6/30/20 7:57 AM, Jens Axboe wrote:
>>> On 6/29/20 1:39 PM, Christoph Hellwig wrote:
>>>> Hi Jens,
>>>>
>>>> this series moves the make_request_fn method into block_device_operations
>>>> with the much more descriptive ->submit_bio name. It then also gives
>>>> generic_make_request a more descriptive name, and further optimize the
>>>> path to issue to blk-mq, removing the need for the direct_make_request
>>>> bypass.
>>>
>>> Looks good to me, and it's a nice cleanup as well. Applied.
>>
>> Dropped, insta-crashes with dm:
>
> Hmm. Can you send me what is at "submit_bio_noacct+0x1f6" from gdb?
> Or your .config?

I'd have to apply and compile again. But it's a bad RIP, so I'm guessing
it's ->submit_bio == NULL. Let me know if you really need it, and I can
re-generate the OOPS and have the vmlinux too.

--
Jens Axboe

2020-06-30 20:48:00

by Christoph Hellwig

[permalink] [raw]
Subject: Re: rename ->make_request_fn and move it to the block_device_operations

On Tue, Jun 30, 2020 at 09:43:31AM -0600, Jens Axboe wrote:
> On 6/30/20 7:57 AM, Jens Axboe wrote:
> > On 6/29/20 1:39 PM, Christoph Hellwig wrote:
> >> Hi Jens,
> >>
> >> this series moves the make_request_fn method into block_device_operations
> >> with the much more descriptive ->submit_bio name. It then also gives
> >> generic_make_request a more descriptive name, and further optimize the
> >> path to issue to blk-mq, removing the need for the direct_make_request
> >> bypass.
> >
> > Looks good to me, and it's a nice cleanup as well. Applied.
>
> Dropped, insta-crashes with dm:

Hmm. Can you send me what is at "submit_bio_noacct+0x1f6" from gdb?
Or your .config?

2020-06-30 20:54:16

by Jens Axboe

[permalink] [raw]
Subject: Re: rename ->make_request_fn and move it to the block_device_operations

On 6/30/20 12:21 PM, Jens Axboe wrote:
> On 6/30/20 12:19 PM, Christoph Hellwig wrote:
>> On Tue, Jun 30, 2020 at 09:43:31AM -0600, Jens Axboe wrote:
>>> On 6/30/20 7:57 AM, Jens Axboe wrote:
>>>> On 6/29/20 1:39 PM, Christoph Hellwig wrote:
>>>>> Hi Jens,
>>>>>
>>>>> this series moves the make_request_fn method into block_device_operations
>>>>> with the much more descriptive ->submit_bio name. It then also gives
>>>>> generic_make_request a more descriptive name, and further optimize the
>>>>> path to issue to blk-mq, removing the need for the direct_make_request
>>>>> bypass.
>>>>
>>>> Looks good to me, and it's a nice cleanup as well. Applied.
>>>
>>> Dropped, insta-crashes with dm:
>>
>> Hmm. Can you send me what is at "submit_bio_noacct+0x1f6" from gdb?
>> Or your .config?
>
> I'd have to apply and compile again. But it's a bad RIP, so I'm guessing
> it's ->submit_bio == NULL. Let me know if you really need it, and I can
> re-generate the OOPS and have the vmlinux too.

Here's the .config

--
Jens Axboe


Attachments:
qemu-config (79.38 kB)