Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7010378ybi; Thu, 13 Jun 2019 08:06:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqxDBybykyEgvhuSUY65bjAojOCYfx0nODHGXOUNum1zosusIch1fcvXcOY4WL+eGiNeFQy9 X-Received: by 2002:a17:902:7887:: with SMTP id q7mr2493578pll.129.1560438407141; Thu, 13 Jun 2019 08:06:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560438407; cv=none; d=google.com; s=arc-20160816; b=MTbRGoKabyf+agvdNkx2tAh+Ra+yl+JDJpAFXD2JxMel8/Nh0lAl61r7MP2q2VFemJ NtH+VUXCCQFWUEz7FK+1e5MDvH/u0ayytYZbH3/Fc4qTHc2zZpGd/qIJc6yKI8KYUyDQ gIfI6VF6juVsCf+D2/zwk7YogxjRFQIiE6+GHcd7O6k9EaFPKs2toFbMjOc5O2zCuRyR s2Ih+GP4LxECpjvggj+dlZnyURcJ99W3EdWQE6BLWrhXvr3vgeXTXurF9psNdPNEoAwb tuFHIPFT84cDG9fH5EAjY1kjqv1C+k9T166mYV3VslzR5VcYq4g3+VkvqyqWhY3omcMw KKuA== 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:message-id:subject:cc :to:from:date:dkim-signature; bh=GDhqdSFdNrJkUzLZKLANjMrDzCWc+1BFxgZR9EoSJWc=; b=FFJDNOm9P+I0h4gKMiD8ukHjDWKlkDw17AQh4x2sro2x8Xu4EaFt+SYFrXbhuM2TL+ quFd9rmMBDOQRLsujKBDXzIYMYuIMV8vWKeBGybOFOad7P41VJ6yNKVwb7U81HcScJfd ruQDqbL541E1WvrVqXDTqr8QGhmhtZ7cqoEsYQTziHyhUx2Vm4EogF8Gr1iF+Y7hd11J BhYdU0P923klAHY+xCjmu0VBc6116xzvOe96qrP1hGKjKAItOYGKg/tMZ7qyPzc3s8zP cHt/aB1tPTVaLYNeeXD+3Ay6/zVNu+kBlXX5MYW8GzxnxZS3MZlB3sq9r7Ceiha6+Zld o8Uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@toxicpanda-com.20150623.gappssmtp.com header.s=20150623 header.b=o9ysYyAY; 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 o3si3290248pll.53.2019.06.13.08.06.31; Thu, 13 Jun 2019 08:06:47 -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=@toxicpanda-com.20150623.gappssmtp.com header.s=20150623 header.b=o9ysYyAY; 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 S1733171AbfFMPFz (ORCPT + 99 others); Thu, 13 Jun 2019 11:05:55 -0400 Received: from mail-qt1-f194.google.com ([209.85.160.194]:43380 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732433AbfFMOMh (ORCPT ); Thu, 13 Jun 2019 10:12:37 -0400 Received: by mail-qt1-f194.google.com with SMTP id z24so9464701qtj.10 for ; Thu, 13 Jun 2019 07:12:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=GDhqdSFdNrJkUzLZKLANjMrDzCWc+1BFxgZR9EoSJWc=; b=o9ysYyAYYAkKDCEjOpEcA8dHcyUIgiishqyzWE+RGyB0CPD0qX9BMV8V2Ph7rpuhQ2 K8NR9n3H2e8PDC40efcl/XPNsZvrJzaA26yNoknpyzgEflgHS0LCRUJZDIxSiwaskZOx wVtjRQyVJFXdvVLENdH2e5X3E+kNGZusxml91Hhgrxkdi0137ew7YVLbQca3LK9zF88/ ajD2LpyQ70yJdzGRaInaMTvnMegeomU9tWJ7wrO/cd9dwWrkG3s41kbgxjMsoVvaBYhS JdQZnPb7pa+AfGg8+n8JdN/2O+vKRsl7thrK0YyHBoE/x0JUOpZD1nFq32wrn+4+Pmlh 8wdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=GDhqdSFdNrJkUzLZKLANjMrDzCWc+1BFxgZR9EoSJWc=; b=THrHL3inc6BlTBo4HqxaSULG0Cl0yQjRlx6/tK9GQdnw/wusq4XQfQoGdhQ8Ndk2IC 3RgJglqibhlDvwOqe0NLbGXUMXzD+IFKdND0DlXHFzrJlRG5fQcQIU/XQhtiRgZtyEj1 /UZ9w2keg1OUVy8fTNUTNP0c7kdKEKcPGmqQk8t6kZl1ichZXo30jwdzPCwliqnmDiT/ nEM92X4QlovPyyhoMG8txr5kZVv/GkdMYpL18tUR1JXP0sqVUcRUQ39uwSCImzZXw9+c DoZ8CmdDWB81Cw+xT24lUAQAGyNplmotAsb2Uf64fqNC5MidG7rJwkH8xk9Qt3DICDaQ 8Uyg== X-Gm-Message-State: APjAAAWsUtGn1/ok9ek4ixTPdZVmV/uRmo0JPXbxAWoa6sExiqX0rG69 j+lZdQaa6mtr00mYx7uCVDv0pw== X-Received: by 2002:ac8:18f0:: with SMTP id o45mr74804877qtk.273.1560435156338; Thu, 13 Jun 2019 07:12:36 -0700 (PDT) Received: from localhost ([2620:10d:c091:480::9d6b]) by smtp.gmail.com with ESMTPSA id k15sm1394975qtg.22.2019.06.13.07.12.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jun 2019 07:12:35 -0700 (PDT) Date: Thu, 13 Jun 2019 10:12:34 -0400 From: Josef Bacik 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 =?utf-8?B?QmrDuHJsaW5n?= , Johannes Thumshirn , Bart Van Assche Subject: Re: [PATCH 09/19] btrfs: limit super block locations in HMZONED mode Message-ID: <20190613141232.nud7gqz622ewcyzp@MacBook-Pro-91.local> References: <20190607131025.31996-1-naohiro.aota@wdc.com> <20190607131025.31996-10-naohiro.aota@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190607131025.31996-10-naohiro.aota@wdc.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > > Signed-off-by: Damien Le Moal > Signed-off-by: Naohiro Aota > --- > fs/btrfs/disk-io.c | 11 +++++++++++ > fs/btrfs/disk-io.h | 1 + > fs/btrfs/extent-tree.c | 4 ++++ > fs/btrfs/scrub.c | 2 ++ > 4 files changed, 18 insertions(+) > > diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c > index 7c1404c76768..ddbb02906042 100644 > --- a/fs/btrfs/disk-io.c > +++ b/fs/btrfs/disk-io.c > @@ -3466,6 +3466,13 @@ struct buffer_head *btrfs_read_dev_super(struct block_device *bdev) > return latest; > } > > +int btrfs_check_super_location(struct btrfs_device *device, u64 pos) > +{ > + /* any address is good on a regular (zone_size == 0) device */ > + /* non-SEQUENTIAL WRITE REQUIRED zones are capable on a zoned device */ This is not how you do multi-line comments in the kernel. Thanks, Josef