Permalink
Switch branches/tags
v1.11.12 v1.1.12 v1.1.11 v1.1.10 v1.1.9 v1.1.8 v1.1.7 v1.1.6 v1.1.5 v1.1.4 v1.1.3 v1.1.2 v1.1.1 v1.0.0 v0.1.0 nbd-debian-3.17-2 nbd-debian-3.17-1 nbd-debian-3.15.2-3 nbd-debian-3.15.2-2 nbd-debian-3.15.2-1 nbd-debian-3.15.1-1 nbd-debian-3.15-1 nbd-debian-3.14-4 nbd-debian-3.14-3 nbd-debian-3.14-2 nbd-debian-3.14-1 nbd-debian-3.13-1 nbd-debian-3.12.1-2 nbd-debian-3.12.1-1 nbd-debian-3.10-1 nbd-debian-3.8-4 nbd-debian-3.8-4+deb8u3 nbd-debian-3.8-4+deb8u2 nbd-debian-3.8-4+deb8u1 nbd-debian-3.8-3 nbd-debian-3.8-2 nbd-debian-3.8-1 nbd-debian-3.7-1 nbd-debian-3.6-1 nbd-debian-3.5-1 nbd-debian-3.4-2 nbd-debian-3.4-1 nbd-debian-3.3-3 nbd-debian-3.3-2 nbd-debian-3.3-1 nbd-debian-3.2-4_deb7u5 nbd-debian-3.2-4_deb7u5_bpo60+1 nbd-debian-3.2-4_deb7u4 nbd-debian-3.2-4_deb7u3 nbd-debian-3.2-4_deb7u2 nbd-debian-3.2-4_deb7u1 nbd-debian-3.2-1 nbd-debian-3.1.1-1 nbd-debian-3.1-2 nbd-debian-3.1-1 nbd-debian-3.0-1 nbd-debian-2.9.25-2 nbd-debian-2.9.25-1 nbd-debian-2.9.24-3 nbd-debian-2.9.24-2 nbd-debian-2.9.24-1 nbd-debian-2.9.23-4 nbd-debian-2.9.23-3 nbd-debian-2.9.23-2 nbd-debian-2.9.23-1 nbd-debian-2.9.22-3 nbd-debian-2.9.22-2 nbd-debian-2.9.22-1 nbd-debian-2.9.16-8+squeeze2 nbd-debian-2.9.16-8+squeeze1 nbd-3.18 nbd-3.17 nbd-3.16.2 nbd-3.16.1 nbd-3.16 nbd-3.15.3 nbd-3.15.2 nbd-3.15.1 nbd-3.15 nbd-3.14 nbd-3.13 nbd-3.12.1 nbd-3.12 nbd-3.12pre1 nbd-3.11 nbd-3.10 nbd-3.9.1 nbd-3.9 nbd-3.8 nbd-3.7 nbd-3.6 nbd-3.5 nbd-3.4 nbd-3.3 nbd-3.2 nbd-3.2-4 nbd-3.2-3 nbd-3.1.1 nbd-3.1 nbd-3.0
Nothing to show
Commits on Sep 10, 2018
  1. Fix message marker

    yoe committed Sep 10, 2018
    This needs to be %m, not %M.
    
    Fixes: gh-81
  2. Don't build on the Debian branch, anymore

    yoe committed Sep 7, 2018
    use salsa for that instead
Commits on Sep 9, 2018
Commits on Sep 7, 2018
  1. Explicitly set errno on EOF

    yoe committed Sep 7, 2018
    When we reach EOF, that means the other end dropped connection on us,
    for which the ECONNRESET errno value is appropriate. However, read()
    won't set that by itself, so we need to do it.
    
    This function is also called to read data from our backend export file;
    but in that case we know what the size of the export file is and won't
    even try to read beyond EOF, so don't worry about that fact.
    
    Fixes: gh-83
Commits on Aug 18, 2018
  1. Ensure this is available, too

    yoe committed Sep 13, 2017
    (cherry picked from commit ccf099f)
  2. Add the .sh.in file

    yoe committed Jun 5, 2017
    also, don't ignore it
    
    (cherry picked from commit da78fd1)
  3. Merge pull request #82 from maciejsszmigiero/netlink-timeout-fix

    yoe committed Aug 18, 2018
    Don't set unset (zero) timeout in nbd-client when configuring via netlink
Commits on Aug 17, 2018
  1. nbd-client: don't set unset (zero) timeout when configuring via netlink

    maciejsszmigiero committed Aug 17, 2018
    When we are operating as a daemon we ignore unset (zero) timeout in
    set_timeout() and don't set it in kernel.
    However, when operating in the netlink mode netlink_configure() will add
    NBD_ATTR_TIMEOUT attribute unconditionally.
    
    This means that in the default case of timeout being unset it was being set
    to zero in the kernel which resulted in it triggering almost immediately
    upon any I/O request.
    
    Fix this by not appending the timeout attribute in netlink_configure() when
    the timeout is unset.
    
    Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
Commits on Aug 16, 2018
  1. doc: Register qemu namespace for NBD_OPT_SET_META_CONTEXT

    ebblake committed Apr 30, 2018
    The recent qemu 3.0 release added an additional supported context
    namespace to its NBD_OPT_SET_META_CONTEXT implementation, named
    "qemu:".  This serves as a registration of that third-party
    namespace, while pointing to qemu documentation for the
    specification of leaf-names within that namespace (currently just
    a "dirty-bitmap:" sub-namespace that can select a named
    dirty bitmap), and what they represent.  We don't have to track
    the full details of the qemu implementation (especially since
    qemu may add more sub-namespace or bit definitions over time),
    but merely link to qemu documentation that should remain
    up-to-date.
    
    Signed-off-by: Eric Blake <eblake@redhat.com>
    Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
  2. doc: Permit BLOCK_STATUS reply to extend beyond request

    ebblake committed May 29, 2018
    When the NBD_CMD_BLOCK_STATUS extension was first discussed, the
    idea of having the client's length be a hint was proposed, where
    the server could reply beyond the client's request in order to
    allow for fewer transactions when querying the entire disk. The
    portion beyond the client's original request can only occur in
    the final extent for a given context, and only if the additional
    length matches the type given for the last byte actually requested
    by the client.
    
    In the meantime, qemu 2.12 was released as a first client
    implementation of NBD_CMD_BLOCK_STATUS, which always sends the
    NBD_CMD_FLAG_REQ_ONE flag, and which disconnects from the server
    if the server's length exceeds the client request.  This was
    relaxed for subsequent qemu, but it means that we have to be
    explicit that a server should not send extra length except when
    the client is not limiting its request to exactly one extent.
    
    Furthermore, qemu 3.0 was recently released where the server
    actually relies on this looser specification for its
    qemu:dirty-bitmap:NAME context when the REQ_ONE flag is not used.
    
    Signed-off-by: Eric Blake <eblake@redhat.com>
Commits on Jul 24, 2018
  1. server: clean supplementary groups when setuid

    luizluca committed Jul 24, 2018
    When nbd-server drops privileges, it was leaving supplementary
    groups untouched. As nbd-server was normally dropping from root,
    nbd-server kept membership to root supplementary groups.
    
    Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Commits on May 21, 2018
  1. proto: add xNBD command NBD_CMD_CACHE to the spec

    Vladimir Sementsov-Ogievskiy authored and ebblake committed Mar 26, 2018
    The ability to request an NBD server to cache things locally,
    without also spending time in the client reading what was just
    cached, has proved useful to both the xNBD implementation
    (public), and to a VM restore operation performed by Virtuozzo
    atop qemu (not yet public).  Time to document this functionality,
    rather than calling the command a failed experiment.
    
    The documentation is rather fuzzy, in that it makes no
    requirements on what constitutes a valid cache (a server can
    implement this command as a no-op) and no guarantees that a
    cache will benefit the client (although for a specific server
    implementation, the client will indeed benefit).  But as the
    command has a use in existing implementations, it's better
    to document what we can to prevent future incompatible use
    of the command.  In particular, we can envision the addition
    of command flags to request specific caching behvaiors (perhaps
    copying after posix_fadvise semantics), where a server must
    reject a flag it does not know or cannot honor (in the extreme
    case, a new flag to allow the client to drop a portion of the
    cache must not be misinterpreted by the server that populates
    the cache instead because it ignored an unrecognized flag).
    
    Note that this proposal adds NBD_FLAG_SEND_CACHE which xNBD
    did not use; meanwhile, the command NBD_CMD_CACHE is allowed
    to fail with no visible side effects.  The documentation tries
    to point out interoperability constraints resulting from
    existing servers that understand the command but don't advertise
    it, as well as existing clients that send the command even when
    it is not advertised.
    
    Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
    Message-Id: <20180326161049.15981-1-vsementsov@virtuozzo.com>
    [eblake: add commit message, add more documentation]
    Signed-off-by: Eric Blake <eblake@redhat.com>
Commits on May 20, 2018
  1. server: do not crash when handling child name

    Thadeu Lima de Souza Cascardo authored and yoe committed May 18, 2018
    The parent will receive the servename from the child to verify if it has
    reached the max number of connections. When the servename is the empty name, it
    will try to allocate a 0-sized buffer, which will return a NULL pointer, and
    that segfaults when running strcmp.
    
    Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
    Signed-off-by: Wouter Verhelst <w@uter.be>
  2. server: Close socket pair when fork fails.

    Thadeu Lima de Souza Cascardo authored and yoe committed May 18, 2018
    When fork fails, we return without closing the socket pair that was just
    created. This might cause file descriptor leaks.
    
    Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
    Signed-off-by: Wouter Verhelst <w@uter.be>
Commits on May 17, 2018
  1. Drop the modern property

    yoe committed Apr 26, 2018
    We used to have a value "modern" for every client which retained whether
    or not the client had negotiated using the newstyle protocol. However,
    since we don't support oldstyle anymore, this is now a dead assignment,
    so drop it.
Commits on Apr 30, 2018
  1. doc: Reflow paragraphs after recent edits

    ebblake committed Mar 23, 2018
    Not strictly necessary, but having consistent line widths makes it
    easier to read the original markup rather than having to refer to
    the rendered webpage. No content change.
    
    Signed-off-by: Eric Blake <eblake@redhat.com>
  2. Merge branch 'extension-blockstatus' into master

    ebblake committed Apr 30, 2018
    Qemu 2.12 implemented NBD_CMD_BLOCK_STATUS, so it is time to promote
    this extension to stable.
Commits on Apr 18, 2018
  1. Merge pull request #78 from Polynomial-C/master

    yoe committed Apr 18, 2018
    Don't make gnutls and libnl automagic
Commits on Apr 17, 2018
  1. Don't make gnutls and libnl automagic

    Polynomial-C committed Apr 9, 2018
    Introduce --without-gnutls and --without-libnl configure options so that
    users can disable gnutls/libnl even if the packages are available on the
    system. The default is unchanged from before this patch. If no
    --with(out)-* option has been given on the command line, the macro looks
    for presence and uses the packages if found.
Commits on Apr 4, 2018
  1. Use AS_CASE here, too

    yoe committed Apr 4, 2018
  2. Actually do run tlshuge, but allow for a failure

    yoe committed Apr 4, 2018
    Disabling tlshuge entirely means we don't test it on Linux either, where
    it does succeed. Rather than doing that, mark it as an expected failure
    on OSX.
    
    We can fix it later, then.
  3. Don't fail test suite when syslog is disabled

    yoe committed Apr 4, 2018
    We currently fail the test suite if syslog was not enabled at compile
    time. While it can't work, it makes more sense to skip the test than to
    fail it.
  4. Disable tlshuge for now

    yoe committed Apr 4, 2018
  5. Fix path lookup stuff once more

    yoe committed Apr 4, 2018
    Sigh.
    
    realpath is "portable", except not implemented on older versions of
    coreutils, including the one in Ubuntu Trusty :-(
    
    So, default to using realpath (which has the advantage of not requiring
    options anywhere), and fall back to readlink -f if that doesn't exist in
    our path.
    
    If that also fails, then the test suite will fail, but have a nice
    "readlink: -f: invalid option" or some such all over it, pointing to
    what the likely culprit is.
  6. Fix path lookup stuff

    yoe committed Apr 4, 2018
    We actually do need to pass non-symlinked stuff, just can't use readlink for
    it. Use realpath, which is the portable alternative, instead.
  7. Stop home-growing things

    yoe committed Apr 4, 2018
    autoconf has a facility for doing this, no need to create custom rules
    in Makefile.am like we were doing. This also takes care of figuring out
    that some systems don't support symlinks, and falling back to hardlinks
    or copies, where necessary.
  8. Stop using nonportable flags of readlink

    yoe committed Apr 4, 2018
    "readlink -f" is a GNU extension. On OSX (where we try to run the test
    suite, too, courtesy of travis CI) it does not exist.
    
    Not sure why we ever added it in the first place (symlinks work, you
    know) so just drop it entirely; there is no need to canonicalize things
    here.
  9. Allow for things to already be installed

    yoe committed Apr 4, 2018
    Our "brew install gnutls" thing is currently failing with "error, gnutls
    is already installed, use upgrade to go to the latest version".
    
    While an antifeature in brew, it is easily worked around.
  10. Don't upgrade things we don't actually need

    yoe committed Apr 4, 2018
    "brew upgrade" tries to upgrade a whole bunch of stuff. We don't need
    it, and it causes failures, so stop trying.
  11. Stop working around ubuntu precise outdatedness

    yoe committed Apr 4, 2018
    .travis.yml still contained some stuff that was there because the
    precise images that travis used to use were too outdated for things.
    However, travis has since upgraded to trusty, and so the issues that we
    were dealing with now longer are problematic.
    
    Drop it.
  12. Add a few dependencies that we need...

    yoe committed Apr 4, 2018
    libgnutls-dev is preinstalled on the trusty images of travis, but points
    to GnuTLS 2.12 rather than something more modern. Presumably this is why
    things break so badly.
    
    Explicitly install libgnutls28-dev to fix. While at it, also install
    libnl-genl-3-dev to make sure we compile-test the netlink stuff.
  13. Handle execvp() failing in the tester client

    fstirlitz authored and yoe committed Apr 4, 2018
    (cherry picked from commit 0b8a27b)
  14. Merge pull request #76 from fstirlitz/inetd-mode-fix

    yoe committed Apr 4, 2018
    inetd mode fix; resolves #75
Commits on Apr 3, 2018
  1. doc: Improvements to block-status

    ebblake committed Mar 14, 2018
    A patch was recently proposed to qemu to implement the block status
    extension (targetted for qemu 2.12, to be released in a few more
    weeks).  Make some tweaks to the extension documentation based on
    lessons learned during the qemu implementation:
    
    - Make it obvious that the export name in the final
    NBD_OPT_SET_META_CONTEXT must match the export name given to
    NBD_OPT_GO (or NBD_OPT_EXPORT_NAME, although any client using
    structured replies should be favoring NBD_OPT_GO)
    
    - Allow a difference between valid query strings during
    NBD_OPT_LIST_META_CONTEXT and NBD_OPT_SET_META_CONTEXT. One
    obvious example: in the "base:" namespace, the query "base:"
    makes sense to LIST (list ALL contexts that this server knows
    about in the base namespace), but not to SET (if a client
    knows about only "base:allocation", but the server has also
    learned "base:foo", having the server reply with 2 contexts
    is a waste of computation since the client will be discarding
    "base:foo" on every NBD_CMD_BLOCK_STATUS).
    
    - Explicitly mention that unknown namespaces should be ignored
    rather than causing an error (errors should only occur for
    failure to find a "namespace:" prefix, although even that
    should not be required as ignoring is fine there too; and for
    a known "namespace:" prefix with a leaf-name that cannot be
    parsed according to the namespace's rules).  Thus, each query
    in the client's request can map to 0 (ignored), 1 (recognized),
    or many (wildcarding) responses from the server (although
    1-to-many expansion may be more appropriate during LIST than
    SET).
    
    - Mention that NBD_REP_ERR_TOO_BIG is not appropriate when the
    client does NBD_OPT_LIST_META_CONTEXT with zero queries, and
    that the reply for zero queries may include wildcards that
    should be fed back to NBD_OPT_LIST_META_CONTEXT as an explicit
    query for more details.  (That is, a valid answer to zero
    queries can be the list of known namespaces, rather than
    the list of known contexts per namespace.)
    
    - Allow the server responses in a different order than the
    client's request (both for NBD_OPT_{LIST,SET}_META_CONTEXT,
    and for NBD_CMD_BLOCK_STATUS), and for a server to send
    responses prior to determining that an error is present
    
    - Require the server's response to NBD_CMD_BLOCK_STATUS to be
    aligned to any advertised minimum block size
    
    - Consistently uses 'x-' as the prefix for namespaces that will
    not be standardized (rather than a mix of 'x-' and 'X-')
    
    - Similar to recent changes to NBD_CMD_{READ,WRITE}, make it
    clear that a 0-length NBD_CMD_BLOCK_STATUS is unsupported
    (at which point, because NBD_REPLY_TYPE_BLOCK_STATUS requires
    extent descriptors to have a non-zero length, a client will
    always make progress if the command succeeds)
    
    - General wording improvements
    
    [To ease review, a later patch will reflow paragraphs that are
    left looking choppy here.]
    
    Signed-off-by: Eric Blake <eblake@redhat.com>
    
    ---
    v2: split reflow to another patch, incorporate initial feedback