From: Kevin Wolf <kwolf@redhat.com>
To: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Cc: qemu-block@nongnu.org, Hanna Reitz <hreitz@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [PATCH] block/block-backend: blk_set_enable_write_cache is IO_CODE
Date: Thu, 27 Oct 2022 20:29:20 +0200 [thread overview]
Message-ID: <Y1rOANXw6zsZ1RAM@redhat.com> (raw)
In-Reply-To: <20221027072726.2681500-1-eesposit@redhat.com>
Am 27.10.2022 um 09:27 hat Emanuele Giuseppe Esposito geschrieben:
> blk_set_enable_write_cache() is defined as GLOBAL_STATE_CODE
> but can be invoked from iothreads when handling scsi requests.
> This triggers an assertion failure:
>
> 0x00007fd6c3515ce1 in raise () from /lib/x86_64-linux-gnu/libc.so.6
> 0x00007fd6c34ff537 in abort () from /lib/x86_64-linux-gnu/libc.so.6
> 0x00007fd6c34ff40f in ?? () from /lib/x86_64-linux-gnu/libc.so.6
> 0x00007fd6c350e662 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
> 0x000056149e2cea03 in blk_set_enable_write_cache (wce=true, blk=0x5614a01c27f0)
> at ../src/block/block-backend.c:1949
> 0x000056149e2d0a67 in blk_set_enable_write_cache (blk=0x5614a01c27f0,
> wce=<optimized out>) at ../src/block/block-backend.c:1951
> 0x000056149dfe9c59 in scsi_disk_apply_mode_select (p=0x7fd6b400c00e "\004",
> page=<optimized out>, s=<optimized out>) at ../src/hw/scsi/scsi-disk.c:1520
> mode_select_pages (change=true, len=18, p=0x7fd6b400c00e "\004", r=0x7fd6b4001ff0)
> at ../src/hw/scsi/scsi-disk.c:1570
> scsi_disk_emulate_mode_select (inbuf=<optimized out>, r=0x7fd6b4001ff0) at
> ../src/hw/scsi/scsi-disk.c:1640
> scsi_disk_emulate_write_data (req=0x7fd6b4001ff0) at ../src/hw/scsi/scsi-disk.c:1934
> 0x000056149e18ff16 in virtio_scsi_handle_cmd_req_submit (req=<optimized out>,
> req=<optimized out>, s=0x5614a12f16b0) at ../src/hw/scsi/virtio-scsi.c:719
> virtio_scsi_handle_cmd_vq (vq=0x7fd6bab92140, s=0x5614a12f16b0) at
> ../src/hw/scsi/virtio-scsi.c:761
> virtio_scsi_handle_cmd (vq=<optimized out>, vdev=<optimized out>) at
> ../src/hw/scsi/virtio-scsi.c:775
> virtio_scsi_handle_cmd (vdev=0x5614a12f16b0, vq=0x7fd6bab92140) at
> ../src/hw/scsi/virtio-scsi.c:765
> 0x000056149e1a8aa6 in virtio_queue_notify_vq (vq=0x7fd6bab92140) at
> ../src/hw/virtio/virtio.c:2365
> 0x000056149e3ccea5 in aio_dispatch_handler (ctx=ctx@entry=0x5614a01babe0,
> node=<optimized out>) at ../src/util/aio-posix.c:369
> 0x000056149e3cd868 in aio_dispatch_ready_handlers (ready_list=0x7fd6c09b2680,
> ctx=0x5614a01babe0) at ../src/util/aio-posix.c:399
> aio_poll (ctx=0x5614a01babe0, blocking=blocking@entry=true) at
> ../src/util/aio-posix.c:713
> 0x000056149e2a7796 in iothread_run (opaque=opaque@entry=0x56149ffde500) at
> ../src/iothread.c:67
> 0x000056149e3d0859 in qemu_thread_start (args=0x7fd6c09b26f0) at
> ../src/util/qemu-thread-posix.c:504
> 0x00007fd6c36b9ea7 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
> 0x00007fd6c35d9aef in clone () from /lib/x86_64-linux-gnu/libc.so.6
>
> Changing GLOBAL_STATE_CODE in IO_CODE is allowed, since GSC callers are
> allowed to call IO_CODE.
>
> Resolves: #1272
>
> Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Thanks, applied to the block branch.
Kevin
prev parent reply other threads:[~2022-10-27 18:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-27 7:27 [PATCH] block/block-backend: blk_set_enable_write_cache is IO_CODE Emanuele Giuseppe Esposito
2022-10-27 12:07 ` Hanna Reitz
2022-10-27 12:41 ` Antoine Damhet
2022-10-27 18:29 ` Kevin Wolf [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y1rOANXw6zsZ1RAM@redhat.com \
--to=kwolf@redhat.com \
--cc=eesposit@redhat.com \
--cc=hreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.