Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7074044ybi; Thu, 13 Jun 2019 09:07:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqxcLge9eA5MRcr+CEHf7sdGqm3PJJyuOA5O9mbgLA+bOPq/WnrRakIpDC8H+6gUSwXPwtlg X-Received: by 2002:a17:902:860c:: with SMTP id f12mr89046736plo.127.1560442074805; Thu, 13 Jun 2019 09:07:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560442074; cv=none; d=google.com; s=arc-20160816; b=mymOFDrt4d1nqiIGDZnfRBqyrYHwD3oHtX5af7z4t4V8GZWXiY2WfCvR6cB6gIHYC6 izQxVxY1VeBF6+7RllYJ920sv+RAd8Vju00vkISs3zi3d4pDH35wjm6WTltzKST8lQC+ dpYAa2VERliVxNlD3XqRg+Dgl4jzZbWL8r86YGsUtayDXk/ydM5+8ZesNUdJxs3LMPAb UpGhiVX/zNqP161bQoGbaJeosU8mhDgUMxXo2Oukm4kmmTz3aZ7JxkhwFH37DoS7M9Hv UwN6iqeQIwLbxPU11TyoCaR/5HZC734autsGU3Uhveyps0QanGjdMGVUhUX+Ek1eC6UY JxOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=mLABAOBxUi7apPgtRPROSyumsCPedDiB3eVS3aen4Uc=; b=ObzJTIMSby36wjOpRhm4cdgHS61qqwFYea29yzPj0nLdqzHXlcd/wald3nkgL5eu5n +/L2KAtUadqjaxuOdWRr/fXam2nIikjfptGFp7o7cKoSgB+HcWbSEMHBdLxdg+377X8C bRPtpxmOX04BgjthKk/gbLVH+BlHnODoxpFggpkFXlIGyYF/lGWpmXn0LRAanymuH/ar bKhblED0SLXBe7PjhHJqva1PzB7JZJSarG2q0CbxjrDe3QqLyIh+/aZ/obJ4gzME3KjU IEhep4d1oCF/ViJ/z7IIbjNZHmLuwfwVW00JFkwOI2fM8qNE60XPwpa6PpiVG7dfp+OE SBIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@globallogic.com header.s=google header.b=OhQ1gd9h; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=globallogic.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u13si138423pgp.332.2019.06.13.09.07.39; Thu, 13 Jun 2019 09:07:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@globallogic.com header.s=google header.b=OhQ1gd9h; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=globallogic.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390281AbfFMQFz (ORCPT + 99 others); Thu, 13 Jun 2019 12:05:55 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:36000 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391035AbfFMQFw (ORCPT ); Thu, 13 Jun 2019 12:05:52 -0400 Received: by mail-ed1-f66.google.com with SMTP id k21so28615271edq.3 for ; Thu, 13 Jun 2019 09:05:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=globallogic.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mLABAOBxUi7apPgtRPROSyumsCPedDiB3eVS3aen4Uc=; b=OhQ1gd9hI7gUmtNiW/OqjsHiQzwW6iZW8IGNtHnPK8zug5HhC3kYfdVVJXheeoRaC6 tbmDhYFOS083pJUz6jcfjmqIHLpaa597AhPSvEEAQBLMcwwRZdZ9O7lGn8Jrx1FkCvdA RfoNRWL1Q1taE5K1YXiR/zwm5WR9EoJjDgXouRhoyKnyxhNXGKOCVqG682PKrplC0mP1 Qpfiw8SI/tUrfiIzQe/qG1BF+PWPkB7bpYVgOpQ13Zx0Rbd4MCnxbKjoLNKRwofxot0+ wUn9KJjxcqacAAr3a+vEKvbp/n79eMo2Fiugl2fTd1aDgFw1RPt3MF66M1s1hvXWy13C 7JuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mLABAOBxUi7apPgtRPROSyumsCPedDiB3eVS3aen4Uc=; b=s0e/Ci0MhSoV4RmEyZfb8bFmJ7Y0LBWOGtVMXOoyYc7WDk1vD7oCtJmjNGh8zoXccb 0hQptiPw8zXvi8scIZTKI+jHysEuO08xVbD93p0EbBWzAeSEfIBOMq5GsJJkHdYzuRZC bBjMo0KIuDpUpUuzH2fE7U+nL1B9iIO0BKNgZaDb+dgInxzPHSfqUowJEH63TJ2W14Dz 4lcwdCdT0MVIytAiO+MW9JAbN+Axl+yC1lFtUoQaTgM0fSf7CLwAhQOSxMfUcgXe5uxN E5xDrWQtFqPhIkW7W9EfIFZXC0mgpZFifufWg+a3BXnEaexuHmyNIcFnLv+h2SpMr2x/ 829w== X-Gm-Message-State: APjAAAWXipI0K31XCKTuSOl+tBLJLWbL3+ZTmcXTWlAm3blSiEd18fjs 8DXMxlETTkumuIA5wWwLHOAQAOpC5WNiQySwKP06GQ== X-Received: by 2002:a50:9918:: with SMTP id k24mr47972367edb.173.1560441949919; Thu, 13 Jun 2019 09:05:49 -0700 (PDT) MIME-Version: 1.0 References: <20190612163144.18486-1-roman.stratiienko@globallogic.com> <20190612163144.18486-2-roman.stratiienko@globallogic.com> <20190613135241.aghcrrz7rg2au3bw@MacBook-Pro-91.local> In-Reply-To: From: Roman Stratiienko Date: Thu, 13 Jun 2019 19:05:38 +0300 Message-ID: Subject: Re: [PATCH 2/2] nbd: add support for nbd as root device To: Eric Blake Cc: Josef Bacik , linux-kernel@vger.kernel.org, nbd@other.debian.org, Aleksandr Bulyshchenko , linux-block@vger.kernel.org, axboe@kernel.dkn.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 13, 2019 at 6:14 PM Eric Blake wrote: > > On 6/13/19 9:45 AM, Roman Stratiienko wrote: > > >> > >> Just throw nbd-client in your initramfs. Every nbd server has it's own > >> handshake protocol, embedding one particular servers handshake protocol into the > >> kernel isn't the answer here. Thanks, > > The handshake protocol is well-specified: > https://github.com/NetworkBlockDevice/nbd/blob/cdb0bc57f3faefd7a5562d57ad57cd990781c415/doc/proto.md > > All servers implement various subsets of that document for the handshake. > > > Also, as far as I know mainline nbd-server daemon have only 2 > > handshake protocols. So called OLD-STYLE and NEW-STYLE. And OLD-STYLE > > is no longer supported. So it should not be a problem, or please fix > > me if I'm wrong. > > You are correct that oldstyle is no longer recommended. However, the > current NBD specification states that newstyle has two different > flavors, NBD_OPT_EXPORT_NAME (which you used, but is also old) and > NBD_OPT_GO (which is newer, but is more likely to encounter differences > where not all servers support it). > > The NBD specification includes a compatibility baseline: > https://github.com/NetworkBlockDevice/nbd/blob/cdb0bc57f3faefd7a5562d57ad57cd990781c415/doc/proto.md#compatibility-and-interoperability > > and right now, NBD_OPT_GO (and _not_ NBD_OPT_EXPORT_NAME) is the > preferred way forward. As long as your handshake implementation > complies with the baseline documented there, you'll have maximum > portability to the largest number of servers that also support the > baseline - but not all servers are up to that baseline yet. > > So, this becomes a question of how much are you reinventing baseline > portability handshake concerns in the kernel, vs. in initramfs. > > -- > Eric Blake, Principal Software Engineer > Red Hat, Inc. +1-919-301-3226 > Virtualization: qemu.org | libvirt.org > Thank you for the review comments, I will address them in v2. -- Regards, Roman