Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2213443ybd; Thu, 27 Jun 2019 08:36:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqxOyB+fpI4X1RocplFQIDdJeBcS5KGC1+yW0LpBkOIoYLQq7lA7Hg/K6wFzP6roe192RxN3 X-Received: by 2002:a63:e317:: with SMTP id f23mr4278688pgh.39.1561649769493; Thu, 27 Jun 2019 08:36:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561649769; cv=none; d=google.com; s=arc-20160816; b=YlJaIwZFoN6V0ewbQLIz23VDlkZv0gP7NZFCccCI073hqDoqzzWgTGWknI3BV56pCv gUBvmVBhn8m8Yot8M+f24LK6FZjlYUdrCq3EM4iQBkmGkj3VoShCNwUW50ZpSD2UWk3x SqoAwob8wQiG6g1dFs94uO/8ZyWiObPuo/f9lJux1TyEonvoohoc6eNzfIVStRTd9G2w Lo7FAXGBly4hEmuiuoUgocq4VQ/X8Z/nHy4meMj/HRNBxYnV8hOiL2JbFG35+EJtevn3 ZaAPQ2qoqmCBqL98VBTGKjBfx8rTypEZb7x5Tbz/lgTeYp1zzIVlUsXqobzoeX8KiQC0 j9Xg== 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=xNfs9eAmAfXz2wlVgY3m7EvCzd0F65CMgfZnof7yrCU=; b=on21MR//9+M6OGxsKNCFtLX+fvBsmlOc6OONWdGI4JbxLpKS4YaH98D2D7usAoHteG qsJO0tFO3APqKdvaRV4LWZt19RRe1WXWDnQPhFNyhQYhfI2XaHkNa96Ifenw5GwXEEeV UQensNNJPXXSTt3vNRSff8hxmcl160X13y/bvOakE1/Y83bHketEP019RLOLNwdkj770 YK38Bw9vB0wsh8lTTGro0Z03FzSA5CueQfaJpumMdEcZH7M7tpLkPk9axJbU186O/v32 Hqkn+27U//uYpu6s6+m2yeytIlnbVAwE2mL37607J1gSaJ2G1pF2AU8Ka7fZTFGqV1ax KDeQ== 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 t135si3122408pfc.251.2019.06.27.08.35.52; Thu, 27 Jun 2019 08:36:09 -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 S1726681AbfF0PeT (ORCPT + 99 others); Thu, 27 Jun 2019 11:34:19 -0400 Received: from mx2.suse.de ([195.135.220.15]:48262 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726587AbfF0PeT (ORCPT ); Thu, 27 Jun 2019 11:34:19 -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 C1667ABC4; Thu, 27 Jun 2019 15:34:16 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 7744ADA811; Thu, 27 Jun 2019 17:35:02 +0200 (CEST) Date: Thu, 27 Jun 2019 17:35:02 +0200 From: David Sterba To: Naohiro Aota Cc: "dsterba@suse.cz" , "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 09/19] btrfs: limit super block locations in HMZONED mode Message-ID: <20190627153502.GD20977@twin.jikos.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> <20190607131025.31996-10-naohiro.aota@wdc.com> <20190617225356.GJ19057@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 Tue, Jun 18, 2019 at 09:01:35AM +0000, Naohiro Aota wrote: > On 2019/06/18 7:53, David Sterba wrote: > > On Fri, Jun 07, 2019 at 10:10:15PM +0900, Naohiro Aota wrote: > >> When in HMZONED mode, make sure that device super blocks are located in > >> randomly writable zones of zoned block devices. That is, do not write super > >> blocks in sequential write required zones of host-managed zoned block > >> devices as update would not be possible. > > > > This could be explained in more detail. My understanding is that the 1st > > and 2nd copy superblocks is skipped at write time but the zone > > containing the superblocks is not excluded from allocations. Ie. regular > > data can appear in place where the superblocks would exist on > > non-hmzoned filesystem. Is that correct? > > Correct. You can see regular data stored at usually SB location on HMZONED fs. > > > The other option is to completely exclude the zone that contains the > > superblock copies. > > > > primary sb 64K > > 1st copy 64M > > 2nd copy 256G > > > > Depends on the drives, but I think the size of the random write zone > > will very often cover primary and 1st copy. So there's at least some > > backup copy. > > > > The 2nd copy will be in the sequential-only zone, so the whole zone > > needs to be excluded in exclude_super_stripes. But it's not, so this > > means data can go there. I think the zone should be left empty. > > > > I see. That's more safe for the older kernel/userland, right? By keeping that zone empty, > we can avoid old ones to mis-interpret data to be SB. That's not only for older kernels, the superblock locations are known and the contents should not depend on the type of device on which it was created. This can be considered part of the on-disk format.