Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7018234ybi; Thu, 13 Jun 2019 08:13:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqyOyOC6HjjU5IKU+CXfHS131Cx1q6lMUXK93sUpggYshhNC4yyWhwUoHwcIolVAEJAwCxTl X-Received: by 2002:a62:fb18:: with SMTP id x24mr93089592pfm.76.1560438819960; Thu, 13 Jun 2019 08:13:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560438819; cv=none; d=google.com; s=arc-20160816; b=UT7AiXF08AXH7aQm1IRZKYA6ApkDt+REQSs33H1azt4YivCChZNn36jStXNt0xKs/4 EgMro47TpYpkF4zip+sH0kJQ34vwZe5KoYPF7Mrnzl0OqIBpTVsyTtAM2xpD1DuJetSH 5cHOki3gm83KNe2OQTG9RnTlVUEDEbT0wGUbzQdK/ta6pPoj8JBgyNGdCcfeNkzkNAMH Zwnr3IIj3wJlIMiauPKsSGf6CigFCDOEkaNQ9Uk95L6EH/Ax4lKkQ4nSaMiBfCpl7W1M doXXVeP+MYMwSbLPn2HJVsNcQTuz2LS+btUDcpCA/WkzTZt6oweDfkbxFLso8W/4SPxC Zn3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :reply-to:message-id:subject:cc:to:from:date; bh=N1iaF3v7/8w11OfGL7dziuqbEQUHT5Cu3w6+xFlQK1c=; b=d9yM5sY3e4FOD3XLlsfrAxmr3pOnIWuB8fJ5VNf1XvpM/fYXgMwYD5xHYD9bC3p7Ya /8QdkI5hbMvAU6KS030n6CRhDgrLl24tl/zC+8QK8CaO176AuqsfwA2+3DE3VzXnUkDs 3aRI4Y5+9vEEm0RHXg1KK/PMXueTPxVoFHUretffeaxFce3xPbc6ak2mI6ZKqdOZbpta qT+XA8sCMtGQFGgdts2tjTezMjSjE7qGO75e1Kkq3ZwTJpwMJgZIt9zr5WM1V7i3LsdA e/KwK1EeV7/OTqmc+MePQO8FTX+QTiDhYv24lbJ08WHV9nGofQqNm9ZIWvuhFiQAGlOP z7Iw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r3si3411819plb.14.2019.06.13.08.13.25; Thu, 13 Jun 2019 08:13:39 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387962AbfFMPMp (ORCPT + 99 others); Thu, 13 Jun 2019 11:12:45 -0400 Received: from mx2.suse.de ([195.135.220.15]:48108 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732278AbfFMNpZ (ORCPT ); Thu, 13 Jun 2019 09:45:25 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 097D1AE12; Thu, 13 Jun 2019 13:45:24 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 5E34FDA897; Thu, 13 Jun 2019 15:46:12 +0200 (CEST) Date: Thu, 13 Jun 2019 15:46:12 +0200 From: David Sterba To: Naohiro Aota Cc: "linux-btrfs@vger.kernel.org" , David Sterba , Chris Mason , Josef Bacik , Qu Wenruo , Nikolay Borisov , "linux-kernel@vger.kernel.org" , Hannes Reinecke , "linux-fsdevel@vger.kernel.org" , Damien Le Moal , Matias =?iso-8859-1?Q?Bj=F8rling?= , Johannes Thumshirn , Bart Van Assche Subject: Re: [PATCH v2 00/19] btrfs zoned block device support Message-ID: <20190613134612.GU3563@suse.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Naohiro Aota , "linux-btrfs@vger.kernel.org" , David Sterba , Chris Mason , Josef Bacik , Qu Wenruo , Nikolay Borisov , "linux-kernel@vger.kernel.org" , Hannes Reinecke , "linux-fsdevel@vger.kernel.org" , Damien Le Moal , Matias =?iso-8859-1?Q?Bj=F8rling?= , Johannes Thumshirn , Bart Van Assche References: <20190607131025.31996-1-naohiro.aota@wdc.com> <20190612175138.GT3563@twin.jikos.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1 (2014-03-12) 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 04:59:23AM +0000, Naohiro Aota wrote: > On 2019/06/13 2:50, David Sterba wrote: > > On Fri, Jun 07, 2019 at 10:10:06PM +0900, Naohiro Aota wrote: > >> btrfs zoned block device support > >> > >> This series adds zoned block device support to btrfs. > > > > The overall design sounds ok. > > > > I skimmed through the patches and the biggest task I see is how to make > > the hmzoned adjustments and branches less visible, ie. there are too > > many if (hmzoned) { do something } standing out. But that's merely a > > matter of wrappers and maybe an abstraction here and there. > > Sure. I'll add some more abstractions in the next version. Ok, I'll reply to the patches with specific things. > > How can I test the zoned devices backed by files (or regular disks)? I > > searched for some concrete example eg. for qemu or dm-zoned, but closest > > match was a text description in libzbc README that it's possible to > > implement. All other howtos expect a real zoned device. > > You can use tcmu-runer [1] to create an emulated zoned device backed by > a regular file. Here is a setup how-to: > http://zonedstorage.io/projects/tcmu-runner/#compilation-and-installation That looks great, thanks. I wonder why there's no way to find that, all I got were dead links to linux-iscsi.org or tutorials of targetcli that were years old and not working. Feeding the textual commands to targetcli is not exactly what I'd expect for scripting, but at least it seems to work. I tried to pass an emulated ZBC device on host to KVM guest (as a scsi device) but lsscsi does not recognize that it as a zonde device (just a QEMU harddisk). So this seems the emulation must be done inside the VM.