From: Peter Lieven <pl@kamp.de>
To: Eric Blake <eblake@redhat.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Cc: Kevin Wolf <kwolf@redhat.com>
Subject: Re: [Qemu-devel] Regression: block: Add .bdrv_co_pwrite_zeroes()
Date: Tue, 5 Jul 2016 09:30:18 +0200 [thread overview]
Message-ID: <577B620A.5010202@kamp.de> (raw)
In-Reply-To: <577B130A.3040205@redhat.com>
Am 05.07.2016 um 03:53 schrieb Eric Blake:
> On 07/04/2016 07:49 AM, Peter Lieven wrote:
>> Hi,
>>
>> the above commit:
>>
>> commit d05aa8bb4a8b6aa9a915ec5074fb12ae632d2323
>> Author: Eric Blake <eblake@redhat.com>
>> Date: Wed Jun 1 15:10:03 2016 -0600
>>
>> block: Add .bdrv_co_pwrite_zeroes()
>>
>> introduces a regression (at least for me).
>>
>> The Limits from the iSCSI Block Limits VPD have no requirement of being
>> a power of two.
>> We use Dell Equallogic iSCSI SANs for instance. They have an internal
>> page size of 15MB. And
>> they advertise this page size as max_ws_len, opt_transfer_len and
>> opt_discard_alignment.
> A non-power-of-2 max_ws_len shouldn't be a problem, but opt_transfer_len
> and opt_discard_alignment not being a power of 2 impacts other code.
> 15MB is a rather odd page size.
I know, not my idea ;-) I think at least opt_discard_alignment of 15MB used to work
before.
>
>> I think we cannot assert that that these alignments are a power of 2.
> Perhaps that means we should just fix our code to round things down to
> the nearest power of 2 (8MB) for the opt_transfer_len and
> opt_discard_alignment values. Can you post a stack-trace of the actual
> assertion you are hitting?
>
Sure:
qemu-system-x86_64: block/io.c:1165: bdrv_co_do_pwrite_zeroes: Assertion `is_power_of_2(alignment)' failed.
Program received signal SIGABRT, Aborted.
0x00007ffff5222c37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 ../nptl/sysdeps/unix/sysv/linux/raise.c: Datei oder Verzeichnis nicht gefunden.
(gdb) bt full
#0 0x00007ffff5222c37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
resultvar = 0
pid = 9610
selftid = 9610
#1 0x00007ffff5226028 in __GI_abort () at abort.c:89
save_stage = 2
act = {__sigaction_handler = {sa_handler = 0x7fffffffe1fe, sa_sigaction = 0x7fffffffe1fe}, sa_mask = {__val = {140737307379972,
93824998987040, 1165, 93823560581120, 140737306023251, 0, 93825220359792, 47244640260, 93825009612448, 256, 0, 0, 0, 21474836480,
140737354027008, 140737307395000}}, sa_flags = 1438406118, sa_restorer = 0x555555bc5ca0 <__PRETTY_FUNCTION__.34924>}
sigs = {__val = {32, 0 <repeats 15 times>}}
#2 0x00007ffff521bbf6 in __assert_fail_base (fmt=0x7ffff536c3b8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
assertion=assertion@entry=0x555555bc55e6 "is_power_of_2(alignment)", file=file@entry=0x555555bc5520 "block/io.c", line=line@entry=1165,
function=function@entry=0x555555bc5ca0 <__PRETTY_FUNCTION__.34924> "bdrv_co_do_pwrite_zeroes") at assert.c:92
str = 0x5555586f5780 ""
total = 4096
#3 0x00007ffff521bca2 in __GI___assert_fail (assertion=assertion@entry=0x555555bc55e6 "is_power_of_2(alignment)",
file=file@entry=0x555555bc5520 "block/io.c", line=line@entry=1165,
function=function@entry=0x555555bc5ca0 <__PRETTY_FUNCTION__.34924> "bdrv_co_do_pwrite_zeroes") at assert.c:101
No locals.
#4 0x0000555555a8a968 in bdrv_co_do_pwrite_zeroes (bs=bs@entry=0x5555565b2df0, offset=offset@entry=1359998976, count=count@entry=4096,
flags=flags@entry=6) at block/io.c:1165
drv = 0x5555560b3580 <bdrv_raw>
qiov = {iov = 0x100000000, niov = 4096, nalloc = 0, size = 140737148473344}
iov = {iov_base = 0x0, iov_len = 0}
ret = 0
need_flush = false
head = 0
tail = 0
max_write_zeroes = <optimized out>
alignment = 15728640
__PRETTY_FUNCTION__ = "bdrv_co_do_pwrite_zeroes"
#5 0x0000555555a8ae3b in bdrv_aligned_pwritev (bs=bs@entry=0x5555565b2df0, req=req@entry=0x555562ee3970, offset=offset@entry=1359998976,
bytes=bytes@entry=4096, qiov=0x555558909e58, flags=<optimized out>, flags@entry=0) at block/io.c:1290
---Type <return> to continue, or q <return> to quit---
drv = 0x5555560b3580 <bdrv_raw>
waited = <optimized out>
ret = <optimized out>
start_sector = 2656248
end_sector = 2656256
__PRETTY_FUNCTION__ = "bdrv_aligned_pwritev"
#6 0x0000555555a8b95f in bdrv_co_pwritev (bs=0x5555565b2df0, offset=offset@entry=1359998976, bytes=bytes@entry=4096,
qiov=qiov@entry=0x555558909e58, flags=flags@entry=0) at block/io.c:1514
req = {bs = 0x5555565b2df0, offset = 1359998976, bytes = 4096, type = BDRV_TRACKED_WRITE, serialising = false,
overlap_offset = 1359998976, overlap_bytes = 4096, list = {le_next = 0x55555a3c9cc0, le_prev = 0x5555565b5f28}, co = 0x555557ccc100,
wait_queue = {entries = {tqh_first = 0x0, tqh_last = 0x555562ee39b8}}, waiting_for = 0x0}
align = 512
head_buf = 0x0
tail_buf = <optimized out>
local_qiov = {iov = 0x0, niov = 1448841360, nalloc = 21845, size = 0}
use_local_qiov = <optimized out>
ret = <optimized out>
__PRETTY_FUNCTION__ = "bdrv_co_pwritev"
#7 0x0000555555a7cae3 in blk_co_pwritev (blk=0x5555565b2c30, offset=1359998976, bytes=4096, qiov=0x555558909e58, flags=0)
at block/block-backend.c:788
ret = <optimized out>
#8 0x0000555555a7cc2e in blk_aio_write_entry (opaque=0x555557da5200) at block/block-backend.c:977
acb = 0x555557da5200
rwco = 0x555557da5228
#9 0x0000555555afafda in coroutine_trampoline (i0=<optimized out>, i1=<optimized out>) at util/coroutine-ucontext.c:78
self = 0x555557ccc100
co = 0x555557ccc100
#10 0x00007ffff5235800 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#11 0x00007fffffffcf20 in ?? ()
No symbol table info available.
#12 0x0000000000000000 in ?? ()
No symbol table info available.
Peter
next prev parent reply other threads:[~2016-07-05 7:30 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-04 13:49 [Qemu-devel] Regression: block: Add .bdrv_co_pwrite_zeroes() Peter Lieven
2016-07-05 1:53 ` Eric Blake
2016-07-05 7:30 ` Peter Lieven [this message]
2016-07-05 13:03 ` Eric Blake
2016-07-05 13:39 ` Paolo Bonzini
2016-07-05 13:37 ` Paolo Bonzini
2016-07-05 13:40 ` Peter Lieven
2016-07-05 14:59 ` Eric Blake
2016-07-05 15:09 ` Paolo Bonzini
2016-07-15 10:09 ` Peter Lieven
2016-07-15 15:40 ` Eric Blake
2016-07-18 7:06 ` Peter Lieven
2016-07-20 23:35 ` Eric Blake
2016-07-21 7:01 ` Peter Lieven
2016-07-21 9:10 ` Paolo Bonzini
2016-07-21 9:08 ` Paolo Bonzini
2016-07-21 15:12 ` Eric Blake
2016-07-21 13:38 ` wangweiwei
2016-07-21 13:45 ` wangweiwei
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=577B620A.5010202@kamp.de \
--to=pl@kamp.de \
--cc=eblake@redhat.com \
--cc=kwolf@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).