From: "Richard W.M. Jones" <rjones@redhat.com>
To: Hanna Reitz <hreitz@redhat.com>
Cc: kwolf@redhat.com, andrey.shinkevich@virtuozzo.com,
eblake@redhat.com, qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: Block alignment of qcow2 compress driver
Date: Fri, 28 Jan 2022 11:56:19 +0000 [thread overview]
Message-ID: <20220128115619.GR1127@redhat.com> (raw)
In-Reply-To: <e07b998f-9a62-7587-0526-bf51eae54ed6@redhat.com>
I hacked nbdcopy to ignore block alignment (the error actually comes
from libnbd refusing to send the unaligned request, not from
qemu-nbd), and indeed qemu-nbd accepts the unaligned request without
complaint.
Eric - maybe having some flag for nbdcopy to ignore unaligned requests
when we know the server doesn't care (qemu-nbd) would work?
Rich.
--- a/copy/nbd-ops.c
+++ b/copy/nbd-ops.c
@@ -59,6 +59,10 @@ open_one_nbd_handle (struct rw_nbd *rwn)
exit (EXIT_FAILURE);
}
+ uint32_t sm = nbd_get_strict_mode (nbd);
+ sm &= ~LIBNBD_STRICT_ALIGN;
+ nbd_set_strict_mode (nbd, sm);
+
nbd_set_debug (nbd, verbose);
if (extents && rwn->d == READING &&
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW
next prev parent reply other threads:[~2022-01-28 12:28 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-28 11:07 Block alignment of qcow2 compress driver Richard W.M. Jones
2022-01-28 11:39 ` Hanna Reitz
2022-01-28 11:48 ` Richard W.M. Jones
2022-01-28 11:57 ` Hanna Reitz
2022-01-28 12:18 ` Richard W.M. Jones
2022-01-28 12:30 ` Hanna Reitz
2022-01-28 13:19 ` Kevin Wolf
2022-01-28 13:36 ` Richard W.M. Jones
2022-01-28 13:30 ` Richard W.M. Jones
2022-01-28 13:37 ` Richard W.M. Jones
2022-01-28 21:22 ` Eric Blake
2022-01-28 11:56 ` Richard W.M. Jones [this message]
2022-01-28 21:40 ` Eric Blake
2022-02-01 14:13 ` Vladimir Sementsov-Ogievskiy
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=20220128115619.GR1127@redhat.com \
--to=rjones@redhat.com \
--cc=andrey.shinkevich@virtuozzo.com \
--cc=eblake@redhat.com \
--cc=hreitz@redhat.com \
--cc=kwolf@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.