Git log: commit ae99c290a8db51abf59ff54cb5e229cc1c9a74f6
Author: Wouter Verhelst <w@uter.be>
Date: Fri Jul 28 19:44:58 2023 +0200
Make nbdroot work again
commit 9de4b35b8f78b2370dd183bb75d6797e7129e90e
Author: Wouter Verhelst <w@uter.be>
Date: Tue Jun 13 18:17:58 2023 +0200
Releasing 1:3.25-1
commit 9ee093c96077f8bfe39da3730474d6b33e001f45
Author: Wouter Verhelst <w@uter.be>
Date: Tue Jun 13 13:01:04 2023 +0200
Mark min-nbd-client as not installed
We actually do install it, into nbd-client-udeb, but we have to rename
the binary to do that, and none of the debhelper tools support this.
Work around the issue by claiming that we don't install it, rather than
trying to massage some debhelper tool into moving a file around.
commit aedddc84a35889d86b03ffcdf9a959ec0f6e0332
Author: Wouter Verhelst <w@uter.be>
Date: Tue Jun 13 12:55:23 2023 +0200
Drop duplicate function definition
commit 2d060730c543b82c72e5fa0c290fa99101a4904c
Author: Wouter Verhelst <w@uter.be>
Date: Sun May 21 16:52:10 2023 +0200
Changelog entry
commit 6549ef653c7daffff2c5397d55e2578067b5b5a5
Merge: 4ca46200 1d02fb93
Author: Wouter Verhelst <w@uter.be>
Date: Tue Jun 13 12:51:13 2023 +0200
Merge branch 'master' into debian
commit 4ca46200f07ba15a9680a6576a6c79f64b5f57e1
Author: Wouter Verhelst <w@uter.be>
Date: Sun May 21 16:21:30 2023 +0200
Bump debhelper compat level to 13
commit 1d02fb9375f5a5a1e16ee2b5c0b9007b654e1db8
Author: Wouter Verhelst <w@uter.be>
Date: Mon May 1 16:08:12 2023 +0200
Documentation updates for nbd-trdump
Signed-off-by: Wouter Verhelst <w@uter.be>
commit 6ce2e13d0042d1a4462d1071d6e5c3eb1fbca149
Author: Wouter Verhelst <w@uter.be>
Date: Mon May 1 16:04:46 2023 +0200
Teach nbd-trdump about structured replies
Signed-off-by: Wouter Verhelst <w@uter.be>
commit a10d07b43fe5169cd295604632faf6a08c52f75b
Author: Wouter Verhelst <w@uter.be>
Date: Mon May 1 15:46:02 2023 +0200
Also enable the thread pool when we're in inetd mode
inetd mode is initialized differently; we shouldn't forget to make the
relevant changes there, too.
In the longer term, we should probably combine these two into a single
method that just differs on how the socket is accepted, but that's more
work and not for now.
Fixes: 3cb679f4a97e1a54a7285ee1f22e2888c9d3b900
Signed-off-by: Wouter Verhelst <w@uter.be>
commit 0a658407c5fafb354a8a667f8495ad5c1c4a1bb9
Author: Wouter Verhelst <w@uter.be>
Date: Fri Apr 28 09:59:33 2023 +0200
Don't declare a function as non-static if we're going to implement it as static later on.
Signed-off-by: Wouter Verhelst <w@uter.be>
commit e5bf2a5d0720e92938744178c7d58ee441871c09
Author: Wouter Verhelst <w@uter.be>
Date: Fri Apr 28 09:47:46 2023 +0200
Disable CWRAP here, too
If we remove the conditional from configure.ac, we need to remove it
from Makefile.am, too
Fixes: 8d2b6e999c5d74cb7e90f07cdf3495c2a37ef05a
Signed-off-by: Wouter Verhelst <w@uter.be>
commit 7a1680cea57911b5f6cb52984a34746a3b798a45
Merge: 8d2b6e99 7bc199ed
Author: Wouter Verhelst <w@uter.be>
Date: Fri Apr 28 09:46:38 2023 +0200
Merge remote-tracking branch 'puavo/master'
commit 8d2b6e999c5d74cb7e90f07cdf3495c2a37ef05a
Author: Wouter Verhelst <w@uter.be>
Date: Thu Apr 27 15:40:47 2023 +0200
Disable cwrap for now.
This doesn't currently work as expected, so stop trying to use it.
This *may* be related to gh-144, but not sure.
Signed-off-by: Wouter Verhelst <w@uter.be>
commit 3cb679f4a97e1a54a7285ee1f22e2888c9d3b900
Author: Wouter Verhelst <w@uter.be>
Date: Thu Apr 27 15:35:40 2023 +0200
nbd-server: do not straddle uses of GThreadPool across a fork()
We created the thread pool at the main initialization, before forking
off a child. This used to work just fine, but as of GLib 2.76, this no
longer works due to changes internal to the implementation of
GThreadPool.
Since we don't need to use the thread pool before the fork() call
anyway, stop trying to do so and avoid the problem altogether.
Closes: gh-146
Signed-off-by: Wouter Verhelst <w@uter.be>
commit 193377a51e9349684a2f29b023186e51e40c3168
Author: Eric Blake <eblake@redhat.com>
Date: Mon Apr 24 11:08:49 2023 -0500
spec: Reserve two more extended headers magic numbers
In addition to reserving the new option and flag values, it's also
worth reserving the two magic numbers used in transmission phase.
Signed-off-by: Eric Blake <eblake@redhat.com>
commit b3883c7cce26a489f7020abbd19ee59eede2d41d
Author: Eric Blake <eblake@redhat.com>
Date: Mon Apr 24 10:42:13 2023 -0500
spec: Document extended headers extension branch
Branch extension-ext-header now exists to capture the specs reviewed
on list and tentatively implemented in both qemu (server and client)
and libnbd (client) code. I'm still working on implementing the
extension in nbdkit (server) before promoting the extension branch to
mainline.
Meanwhile, structured replies and block status have been incorporated
into mainline for some time now (see commit 6e896bca in 2018, v3.17);
and while block status is still not implemented in the kernel module
or in nbd-server, we did just recently implement structured replies in
nbd-server.
Signed-off-by: Eric Blake <eblake@redhat.com>
commit daf3fce989b23cc8c9023f28e0eec2f074c9f1bd
Author: Eric Blake <eblake@redhat.com>
Date: Thu Apr 7 16:07:14 2022 -0500
spec: Change maximum block size to maximum payload size
Commit 9f30fedb improved the spec to allow non-payload requests like
NBD_CMD_TRIM that exceed any advertised maximum block size. Take this
one step further by documenting that the server may use NBD_EOVERFLOW
as a hint to the client when a non-payload request is oversize (while
permitting NBD_EINVAL for back-compat), and by rewording the text to
explicitly call out that what is being advertised is the maximum
payload length, not maximum block size. Furthermore, favor the term
'maximum payload size' instead of 'maximum block size', as the real
limitation here is how many bytes are sent in one direction as part of
the command (a maximum payload size may be related to maximum block
size, but existing implementations of both servers and clients that
actually implement NBD_INFO_BLOCK_SIZE have generally been advertising
things like a 32M or 64M data cap, and not an underlying block size
constraint).
As such, the section titled 'Block size constraints' is now more
accurately referred to as 'Size constraints'.
Document existing practice that structured replies can slightly exceed
payload size (a client requesting a 32M NBD_CMD_READ can get a single
NBD_REPLY_TYPE_OFFSET_DATA of size 32M+8 bytes, rather than the server
splitting it across two chunks); the only hard limit here is that on
client/server pairs that permit larger payloads than 32M, the reply
type still has a 32-bit limit on payload size (no known client or
server actually tries to do an NBD_CMD_READ of 4G-1 bytes, but the
spec shouldn't prevent it).
This becomes more important when we add 64-bit extensions, where it
becomes possible to extend `NBD_CMD_BLOCK_STATUS` to have both an
effect length (how much of the image does the client want status on -
may be larger than 32 bits) and an optional payload length (a way to
filter the response to a subset of negotiated metadata contexts). In
the shorter term, it means that a server may (but not must) accept a
read request larger than the maximum block size if it can use
structured replies to keep each chunk of the response under the
maximum payload limits.
Message-Id: <20230413220241.1396012-3-eblake@redhat.com>
Reviewed-By: Wouter Verhelst <w@uter.be>
[eblake: also s/Block size constraints/Size constraints/]
Signed-off-by: Eric Blake <eblake@redhat.com>
commit 926a51df579442e7a84dfb078f043a6b60f0e7e2
Author: Eric Blake <eblake@redhat.com>
Date: Thu Apr 13 17:02:36 2023 -0500
spec: Recommend cap on NBD_REPLY_TYPE_BLOCK_STATUS length
The spec was silent on how many extents a server could reply with.
However, both qemu and nbdkit (the two server implementations known to
have implemented the NBD_CMD_BLOCK_STATUS extension) implement a hard
cap, and will truncate the amount of extents in a reply to avoid
sending a client a reply so large that the client would treat it as a
denial of service attack. Clients currently have no way during
negotiation to request such a limit of the server, so it is easier to
just document this as a restriction on viable server implementations
than to add yet another round of handshaking. Also, mentioning
amplification effects is worthwhile.
When qemu first implemented NBD_CMD_BLOCK_STATUS for the
base:allocation context (qemu commit e7b1948d51, Mar 2018), it behaved
as if NBD_CMD_FLAG_REQ_ONE were always passed by the client, and never
responded with more than one extent. Later, when adding its
qemu:dirty-bitmap:XYZ context extension (qemu commit 3d068aff16, Jun
2018), it added a cap to 128k extents (1M+4 bytes), and that cap was
applied to base:allocation once qemu started sending multiple extents
for that context as well (qemu commit fb7afc797e, Jul 2018). Qemu
extents are never smaller than 512 bytes (other than an exception at
the end of a file whose size is not aligned to 512), but even so, a
request for just under 4G of block status could produce 8M extents,
resulting in a reply of 64M if it were not capped smaller.
When nbdkit first implemented NBD_CMD_BLOCK_STATUS (nbdkit 4ca66f70a5,
Mar 2019), it did not impose any restriction on the number of extents
in the reply chunk. But because it allows extents as small as one
byte, it is easy to write a server that can amplify a client's request
of status over 1M of the image into a reply over 8M in size, and it
was very easy to demonstrate that a hard cap was needed to avoid
crashing clients or otherwise killing the connection (a bad server
impacting the client negatively). So nbdkit enforced a bound of 1M
extents (8M+4 bytes, nbdkit commit 6e0dc839ea, Jun 2019). [Unrelated
to this patch, but worth noting for history: nbdkit's situation also
has to deal with the fact that it is designed for plugin server
implementations; and not capping the number of extents in a reply also
posed a problem to nbdkit as the server, where a plugin could exhaust
memory and kill the server, unrelated to any size constraints enforced
by a client.]
Since the limit chosen by these two implementations is different, and
since nbdkit has versions that were not limited, add this as a SHOULD
NOT instead of MUST NOT constraint on servers implementing block
status. It does not matter that qemu picked a smaller limit that it
truncates to, since we have already documented that the server may
truncate for other reasons (such as it being inefficient to collect
that many extents in the first place). But documenting the limit now
becomes even more important in the face of a future addition of 64-bit
requests, where a client's request is no longer bounded to 4G and
could thereby produce even more than 8M extents for the corner case
when every 512 bytes is a new extent, if it were not for this
recommendation.
Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Message-Id: <20230413220241.1396012-2-eblake@redhat.com>
Reviewed-By: Wouter Verhelst <w@uter.be>
commit 1ed0603adc2abb8af23c70adb53ab92356279ad4
Author: Wouter Verhelst <w@uter.be>
Date: Wed Apr 19 11:05:59 2023 +0200
Drop support for Sockets Direct Protocol (SDP)
The SDP support in nbd-client was a drive-by patch originally given to us way
back in 2007 (before git!), and not revisited since.
According to Wikipedia,
This protocol has been deprecated[5] or not maintained by OFED in the latest
releases
and also, according to
https://lists.openfabrics.org/pipermail/ewg/2012-April/017365.html,
> So where did it go? Is SDP obsolete?
its deprecated
So, as I don't have the hardware required to test these patches, and as
I also don't remember anyone ever stepping forward with any comments or
remarks about the SDP support in the 15 years since we added this, and
since apparently this is now deprecated, let's just drop it.
I considered keeping support for the command-line options and/or the
config file options, but I think that isn't all that useful.
Signed-off-by: Wouter Verhelst <w@uter.be>
commit fd2c5a60e36ef0ea0d7fd6f8a6bd908d24d5801d
Author: Eric Blake <eblake@redhat.com>
Date: Wed Apr 12 14:41:29 2023 -0500
doc: Fix a few typos
I noticed a duplicate 'a', then ran aspell to spot a few other
oddities.
Signed-off-by: Eric Blake <eblake@redhat.com>
commit 9d097d758e610f80aeee186ad6420d268262e841
Author: Eric Blake <eblake@redhat.com>
Date: Mon Apr 10 14:22:24 2023 -0500
docs: Prefer export over file
When referring to the data available from the server, we prefer the
term 'export' over 'file', since a server may be generating an export
by means of several files or by some other means. Fix a few outliers
that have crept in to the spec.
Suggested-by: Wouter Verhelst <w@uter.be>
Signed-off-by: Eric Blake <eblake@redhat.com>
commit 42d54ec61a2f85975abea5ca144e550c7f3b7221
Author: Eric Blake <eblake@redhat.com>
Date: Thu Mar 9 15:06:23 2023 -0600
nbd: Use uint64_t instead of char[8] for cookie
Type-punning *(uint64_t*)(char[8]) is unsafe if the pointer is not
aligned per the requirements of the hardware (x86_64 has 1-byte
alignment, but other hardware exists that will give a SIGBUS). In
practice, it didn't matter - 'struct nbd_request' was already 64-bit
aligned for 'from' (even before the recent change in commit 739f7121
to pack it), and 'struct nbd_reply' being packed means the compiler
emits code to deal with 1-byte alignment despite hardware. But since
the cookie is already opaque on the server side, we might as well
treat it as an 8-byte integer instead of a character array, with no
visible semantic changes to the client.
This patch does NOT perform endian swapping on the value. As long as
we are consistent (no swap when reading from the client, no swap when
writing back to the client), the client sees the same value. If we
were to log the cookie at any point in our local handling, then it
would be nice to obey the spec that all NBD values sent over the wire
are in network byte order (big-endian), so that what we log appears as
a 64-bit value with endianness matching whatever wireshark or the
client might be logging as well. But since we aren't logging the
cookie, skipping the byte-swaps doesn't hurt.
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20230309210623.2238671-4-eblake@redhat.com>
commit e6efa7c73a81235c37f4ab56f5b94373245fe8e9
Author: Eric Blake <eblake@redhat.com>
Date: Thu Mar 9 15:06:22 2023 -0600
nbd: s/handle/cookie/g when referring to opaque client id
Match the documentation change of the previous patch. Now, places
using 'handle' refer to things like signal handlers and callbacks,
while 'cookie' is the 8-byte opaque value used by the client to
correlate replies back to requests.
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20230309210623.2238671-3-eblake@redhat.com>
commit ca4392eb2bb44f2ba9b77a30e7561d60bb5743aa
Author: Eric Blake <eblake@redhat.com>
Date: Thu Mar 9 15:06:21 2023 -0600
docs: Prefer 'cookie' over 'handle'
In libnbd, we quickly learned that distinguishing between 'handle'
(verb for acting on an object) and 'handle' (noun describing which
object to act on) could get confusing; we solved it by renaming the
latter to 'cookie'. Copy that approach into the NBD spec, and make it
obvious that a cookie is opaque data from the point of view of the
server. Makes no difference to implementations (other than older code
still using 'handle' may be slightly harder to tie back to the spec).
In parallel, a patch has been proposed to update the kernel uapi to
prefer the same naming [1], as well as preferring operations on a
64-bit integer rather than a char[8] (doesn't matter in practice when
the value is opaque, but does make it easier to write wireshark
sniffers that can expect a certain endianness for correlation back to
log messages when the logs also use 64-bit integers).
[1] https://lkml.org/lkml/2023/3/17/1107
Suggested-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20230309210623.2238671-2-eblake@redhat.com>
Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
commit 1b3c7df2463ae6f34609cf6ac4abeb4b36bd7144
Author: Wouter Verhelst <w@uter.be>
Date: Tue Mar 7 17:37:06 2023 +0200
Implement negotiation of structured replies
This should make it possible for us to use structured replies!
Signed-off-by: Wouter Verhelst <w@uter.be>
Reviewed-by: Eric Blake <eblake@redhat.com>
commit cedb50b20a74714d104a1510a149f9cf88da0ab6
Author: Wouter Verhelst <w@uter.be>
Date: Tue Mar 7 16:50:50 2023 +0200
Implement structured reply handling
This implements the transmission phase part of structured replies as documented
in doc/proto.txt, but does not do the negotiation phase part of this (yet).
Signed-off-by: Wouter Verhelst <w@uter.be>
Reviewed-By: Eric Blake <eblake@redhat.com>
commit 432cc5e858ae3e9812a84ac9ae648aeb3919d330
Author: Wouter Verhelst <w@uter.be>
Date: Tue Mar 7 16:46:32 2023 +0200
Add a "confirm_read" call
This doesn't currently do anything, but we call it when the buffer is
ready to be sent out, so that when we get to structured replies, we can
optionally send out our buffer there.
Signed-off-by: Wouter Verhelst <w@uter.be>
commit 0877ad28b1d899abf67dd963dfcc97d8ec5c1ed3
Author: Wouter Verhelst <w@uter.be>
Date: Tue Mar 7 16:24:12 2023 +0200
Refactor request handling
Currently, the state of a request is stored on the stack, with the reply
being built in a buffer which is sent out at the very end of the
'handle_normal_read' function.
This makes implementing structured replies complicated, as for those we
may want to sometimes send a reply chunk before that point.
Thus, refactor request handling such that we no longer depend on the
stack for sending out things.
Signed-off-by: Wouter Verhelst <w@uter.be>
commit 2c335a967d0f8df724e3cd174bc26c70d90fa505
Author: Wouter Verhelst <w@uter.be>
Date: Mon Mar 27 09:55:50 2023 +0200
nbd-tester-client: refactor away TEST_HANDSHAKE
We have a CONNECTION_TYPE enum which is used to tell the
setup_connection function where to stop, but the TEST_HANDSHAKE flag
also caused an early exit.
Refactor away that flag into a value of that enum.
commit c48add629754d2fe3bc9a65907222327b8c001c0
Author: Bignaux Ronan <ronan@aimao.org>
Date: Wed Mar 22 15:41:23 2023 +0100
Update README.md
Add lwNBD server library to Alternate implementations.
commit de9f19333eaea51dfa9e4cbd0b88f9423d893e8a
Author: Wouter Verhelst <w@uter.be>
Date: Tue Mar 14 09:23:27 2023 +0200
uapi nbd: improve doc links to userspace spec
On Fri, Mar 10, 2023 at 02:15:23PM -0600, Eric Blake wrote:
> The documentation file also had a stale link to sourceforge; nbd
> ditched that several years ago in favor of github.
While it's accurate to say that we've mostly moved to github, I wouldn't
describe the sourceforge link as "stale"; I've kept the information on
that landing page generally up-to-date over the years (the most recent
change was the addition of the link to Ceph for Windows for a Windows
NBD client, in 2020), and I do still post file releases on sourceforge,
primarily.
However, I guess it's been long enough, and there isn't really anything
that sourceforge can provide us which github can't, so I suppose we
might as well.
commit 450bcb06fc43ddaade0dc40f4f1b78a7f4140aee
Author: pastalian <pastalian46@gmail.com>
Date: Sun Mar 12 03:58:20 2023 +0900
nbd-server: raise glib version requirement
g_array_set_clear_func is only available since glib 2.32, so nbd-server
cannot be compiled with lower versions of glib.
This bump also makes previous workaround for old glib (dace3ad)
unnecessary.
Signed-off-by: Takuya Wakazono <pastalian46@gmail.com>
Signed-off-by: Wouter Verhelst <w@uter.be>
commit 81eeeb55d8f19eb1f3993fe03459fe413c63c8b0
Author: Wouter Verhelst <w@uter.be>
Date: Tue Mar 14 09:21:07 2023 +0200
proto: update stale link to qemu's nbd.txt
We linked to git.qemu.org, but that now has a generic redirect to the
qemu project on gitlab.com, not linking to the specific file we want to
see.
Update the link to point to the correct file on gitlab.com
Signed-off-by: Wouter Verhelst <w@uter.be>
commit 739f7121d242343051f4d9513418396411bbcd8f
Author: Wouter Verhelst <w@uter.be>
Date: Tue Mar 7 16:33:13 2023 +0200
Add missing packed attribute
commit af848aa11c61af4a378ee05de83860e3ba6561c6
Author: Wouter Verhelst <w@uter.be>
Date: Tue Mar 7 16:47:59 2023 +0200
Remove outdated comment
commit f2a63cd6ea65d2352c76939f126d2d3208c59b73
Author: Wouter Verhelst <w@uter.be>
Date: Tue Mar 7 16:48:59 2023 +0200
Reflow this structure
The text here was highly unreadable due to how things were done. Fix.
commit db66b92a47613a0e0448a7cb74af8dca0689d3e4
Author: Juha Erkkilä <Juha.Erkkila@opinsys.fi>
Date: Wed Feb 1 14:50:26 2023 +0200
Increment server reference counter when reading new configurations.
commit 7bc199edc3c5b20a9e2e46e439cf7259d1db7f2c
Author: Juha Erkkilä <Juha.Erkkila@opinsys.fi>
Date: Wed Feb 1 14:50:26 2023 +0200
Increment server reference counter when reading new configurations.
commit 90dc1adc9ba196fca84a9b4f7d85fdfdd9fc4d5b
Author: Wouter Verhelst <w@uter.be>
Date: Tue Jan 31 11:59:13 2023 +0200
Use the correct level of pointers on clearing the SERVER element
Closes: gh-143
Original-patch-by: Juha Erkkilä <Juha.Erkkila@opinsys.fi>
Updated by Wouter Verhelst as an upstream patch rather than a Debian one.
commit d11ec82e6f47bcd7408ec066b717884bb37b583a
Author: Wouter Verhelst <w@uter.be>
Date: Tue Jan 31 11:59:13 2023 +0200
Use the correct level of pointers on clearing the SERVER element
Closes: gh-143
commit bb9c47f6b9fea87597beaa2061c1261d46dffa47
Author: Juha Erkkilä <Juha.Erkkila@opinsys.fi>
Date: Mon Jan 16 13:15:05 2023 +0200
Fix server array reference counting.
The function given to g_array_set_clear_func() for clearing
server arrays gets a pointer to server pointer as a parameter
instead of simply pointer to server structure. This change
adds a wrapper function removing one level of indirection.
Before this change, when arrays are freed, the serve_dec_ref()
would decrement random stuff in memory and rarely call free()
to some random memory address, crashing nbd-server.
commit 89c177d612d89de887df2b29de667233cb6496e8
Author: Jan Krieg <git@jankrieg.anonaddy.com>
Date: Fri Dec 2 22:02:37 2022 +0100
Avoid sporadic race condition due to parallel make
nbdtab_lexer.l includes nbdtab_parser.tab.h, which in turn is
dynamically generated during the build from nbdtab_parser.y.
Specifying nbdtab_parser.tab.h in BUILT_SOURCES avoids a potential
race condition where parallel make can fail if nbdtab_lexer.l
is processed before nbdtab_parser.tab.h has been created.
Fixes: #140
commit bc216cf718bd3e788bc7c20799f40f66dad8b5e0
Author: Jan Krieg <git@jankrieg.anonaddy.com>
Date: Wed Nov 23 20:22:46 2022 +0100
nbd-server: Add option to not daemonize main process
While the existing -d/--dont-fork option for nbd-server already avoids
daemonizing the main process, it also disallows to fork the serving
process for a client from the master process. The new -n/--nodaemon
option still allows child processes while keeping the main process
in the foreground.
Fixes: #132
commit d30ea3b5bbcd276502f0950cd343ae0025158304
Author: Eric Blake <eblake@redhat.com>
Date: Wed Oct 5 14:23:20 2022 -0500
tests: Fix typo in recent test change
A missing } caused 'make check' to fail. While at it, use TAB
consistently.
Fixes: af309d8a ("nbd-server: fix bug in auth for v6-mapped IPv4 addresses")
CC: 吕梦昭10286442 <lv.mengzhao@zte.com.cn>
Signed-off-by: Eric Blake <eblake@redhat.com>
commit 174ad5513a3f7464bb0633a56a4124a85e891f10
Author: Eric Blake <eblake@redhat.com>
Date: Tue Oct 4 14:57:32 2022 -0500
docs: Mention the word 'endian'
We already document that NBD uses network byte order, but explicitly
having the word 'endian' in the docs may save a developer some time
that would otherwise be spent on a google search to see that network
order is big-endian.
commit af309d8a1b0cbe7b1a3a9d7ee78a782722284ea2
Author: 吕梦昭10286442 <lv.mengzhao@zte.com.cn>
Date: Wed Aug 24 15:08:27 2022 +0800
nbd-server: fix bug in auth for v6-mapped IPv4 addresses
For v6-mapped address authentication, when comparing the client IP address
with the address in the authentication file, we should skip the first
12 identical prefixes and compare the real IP address.
This Fixes: #137
commit 4697b68efc0781ef0dd7bdc92229d399091fde51
Author: Eric Blake <eblake@redhat.com>
Date: Thu Aug 4 16:08:09 2022 -0500
docs: Allow NBD_REPLY_TYPE_ERROR_OFFSET on more commands
Writing zeroes and caching are also commands where an error at a
specific offset may be useful information to the caller. WRITE_ZEROES
was missed in commit c77903ca when structured replies were added;
CACHE was missed in 9378376a when it was added.
commit a6f392baaa833c6904de0b9b3dfaa81ce5fd24c6
Author: Eric Blake <eblake@redhat.com>
Date: Fri Jul 29 16:16:44 2022 -0500
doc: Typo fix on baseline implementation
The server replies to NBD_OPT_ with NBD_RET_; there is no
NBD_OPT_UNSUP.
Fixes: 7827f3ae ("Add initial baseline/maximum interop spec", v3.20)
commit 15cac433346613a73cb3c290d9c31114c02086ae
Author: Eric Blake <eblake@redhat.com>
Date: Mon Jul 25 16:19:30 2022 -0500
docs: Clarify server behavior on read failures
Back in 3.14, we clarified the documentation to state that a read
error detected before the header is sent must use a 0-length payload
to keep the connection alive, to match most existing server and client
implementations, rather than initiating a hard disconnect or sending a
full length payload of garbage. We then tweaked another spot in the
docs to match in 3.17 (commit e5474502), but then regressed when
merging in support for structured replies shortly after, since that
was developed in parallel.
Fixes: d1fcc84b ("Merge branch 'origin' into extension-structured-reply", 3.17)
commit 050d753ac3adc7bb6cd1a3dca09a392ed3d4133a
Author: Wouter Verhelst <w@uter.be>
Date: Wed Jul 20 10:52:40 2022 +0200
Add missing percent sign
Closes: gh-134
commit 9ed62752ae804546a01ce4694f1c35deebec2886
Author: Eric Blake <eblake@redhat.com>
Date: Wed Mar 23 11:01:49 2022 -0500
spec: Clarify BLOCK_STATUS reply details
Our docs were inconsistent on whether a NBD_REPLY_TYPE_BLOCK_STATUS
reply chunk can exceed the client's requested length, and silent on
whether the lengths must be consistent when multiple contexts were
negotiated. Clarify this to match existing practice as implemented in
qemu-nbd and nbdkit. Clean up some nearby grammatical errors while at
it.
Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@openvz.org>
commit d80518bda2dc6899b0ec2bd8f83e04f79a5a5203
Author: Wouter Verhelst <w@uter.be>
Date: Fri Jun 17 12:55:37 2022 +0200
Fix documentation about block size
The default is 512, not 1024. Thanks to Richard W.M. Jones for spotting
this.
commit 623e31036c2381a5634b4fcb64efb2f3ea3361a6
Author: Wouter Verhelst <w@uter.be>
Date: Mon Mar 7 14:50:02 2022 +0200
Ensure cwrap_test is shipped, too
commit a2b92ae012962f0fd421ca92ba2f802113cd3c62
Author: Eric Blake <eblake@redhat.com>
Date: Wed Mar 23 11:14:19 2022 -0500
docs: Clarify structured reads vs. block size constraints
The text for structured reads mentioned a mandatory split of certain
large reads, without also mentioning that large reads are generally
not possible when block constraints are in play.
Signed-off-by: Eric Blake <eblake@redhat.com>
Acked-by: Richard W.M. Jones <rjones@redhat.com>
commit 9485786fda3527f3edac7c76945d294e57de3b2b
Author: Eric Blake <eblake@redhat.com>
Date: Wed Mar 23 11:06:41 2022 -0500
docs: Clarify NBD_REPLY_TYPE_ERROR lengths
Add explicit mention that human-readable error message strings must
comply with the overall NBD string limits.
Signed-off-by: Eric Blake <eblake@redhat.com>
Acked-by: Richard W.M. Jones <rjones@redhat.com>
commit 973b9e2270b891c529a2fc150533b14e4adca702
Author: Wouter Verhelst <w@uter.be>
Date: Mon Mar 7 14:21:29 2022 +0200
Optionally use cwrap
We currently conflict with a system-wide NBD implementation (if one is
running).
Optionally LD_PRELOAD the cwrap libraries in the test suite, if found,
so that we don't do that anymore.
In future we might perhaps also add extra tests that do more if the cwrap
libraries are available, but not now.