Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7014413ybi; Thu, 13 Jun 2019 08:10:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqzlYQH+WJVrXZQhuhC+vt9q43o6WjUILSKa5CTscjoxaEV4l6ilWk+Ltk7iI980yD3iw2Lz X-Received: by 2002:a63:6ecf:: with SMTP id j198mr17704510pgc.437.1560438612356; Thu, 13 Jun 2019 08:10:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560438612; cv=none; d=google.com; s=arc-20160816; b=KEwrk5iakrq1wGrJruAss8U/G737RIqtrMTaAuT3jVMxaYhQ5tDy9+CvUS1uB9R/yf aoCKB8gvUOk1X4eJsXYLtkJ+Exbp7yFICv2SZHFv+4Z3SOF7OTDosj655q+EwJHPoCSo yijjccb8vpxbZQxyn6Sr91XW1fchqAglzVUwHULkVQRxKnC6ohMMD6SfbsLAYK/QXmRh oARLZwdE5U0EdK5f97hvwlVmQjHf6V2DHxh8bGHz9F+qvJeYOyFVqVyQDpEqHpve+PkU GRMsqLkgJl62GpqEBO3YC/yYWIWgxiaFHy6+dMvg+1/YIbpZTaNBZLjzBR0oClKLlj6J q42g== 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=yl3u9OHniWwozrwRg8MwFXqj/tcVXwxH/GoIuJ/+cgI=; b=deRBq8jAewQVu4M1lBgytiAHYu5a1NpMVvHDhh4sw18uVal+JnZyLYcmhWl9Dob7iW t90KU/2quCJKGYrL5BglXZvMiBE1326JxrPC2iGZqAE9boeMN00iDAmU+eSp8GBvl9SJ btj5lH5d/XcLUUtzj/PTUJgXd4g+rlEM1LmMNotwy7Gq+q/7WtdKWjawmOxayTHLAlEl 3QL/UYR5WI+4LGhzs5UsV49HNSp1LRJDhbckfCnt04qBnyLBR9Aimc5sQ3X9H+pBcgYo 0wT6JKK/tuuZz16NPkHKOXKWhJkZnKrFVjM5Jja+5pdO+wZzksqu5rZqBg/PqEAgBUtX 4XcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@toxicpanda-com.20150623.gappssmtp.com header.s=20150623 header.b=Pi7rcOcl; 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 w7si51286pgs.168.2019.06.13.08.09.56; Thu, 13 Jun 2019 08:10:12 -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=Pi7rcOcl; 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 S1732780AbfFMPJ1 (ORCPT + 99 others); Thu, 13 Jun 2019 11:09:27 -0400 Received: from mail-qt1-f193.google.com ([209.85.160.193]:35806 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732362AbfFMN6D (ORCPT ); Thu, 13 Jun 2019 09:58:03 -0400 Received: by mail-qt1-f193.google.com with SMTP id d23so22638649qto.2 for ; Thu, 13 Jun 2019 06:58:02 -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=yl3u9OHniWwozrwRg8MwFXqj/tcVXwxH/GoIuJ/+cgI=; b=Pi7rcOcllDzY4YtuAORwjevLbfVYkp9i72ie6hKY1hOBpeYxeYRsynLD/r+GX+1WgH 9jmz/Q4qLoLPj8DMkRMmocG1HkWaTtBqtjIbD09vscOFJJ4QDtmbpw0e3U1fLQ4Phs/R mm87AwBXyWcfet3drfxfBbP4UMYRvWbQj0PMUFxSthTBZjkcOo6tXgvizMr/hUkl/13I aI0yGb3dmtIfyR9EUbCQqe1oj4prYz6e3G20ui0X2KQIm8ieYwI2Xg+7728d6x5yRuS6 FF+5aN9S5RAfYTLprSlp/cc73PjoMmLzraZlJPIxZSsVnzTk6h1W29S/oRgRORNWjD2Y Kp4Q== 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=yl3u9OHniWwozrwRg8MwFXqj/tcVXwxH/GoIuJ/+cgI=; b=R4ZBXDLniDG2dK+0+OwSBpvqvF5XZCMR2VZTAvJaBBpqwUiM77XAhQU+a1u/NxMQmi dKO5pyENMXHRVe5SRkTRYDSbasc87HTQJmDUceu85ymAfmCZdopajZTV9zUcYDzCufWl SKRyGPX6/UlIXclDM/Ns1DTkBOCeNvewS7OYGq2wcrsWxCkoYUHraw6b5/k72tGcexTw GCrDoZswJvWBSdWXqmj3cDvEQbEq4MdxaOGWQ/lu+VlSqOEGVI/6Po78YtCJ4WHYhQbd r0i5KQcIdeBAyYlOz3M50UPSguSloBDG3RXDMeDb7wakyQsqPw6F91/Kxdd4MYjTgmo2 YI1A== X-Gm-Message-State: APjAAAUqR6XWNVVZcz5Q5/gOGZJSmtU8Kw/B/JFA/bzK7YZIo1EFQbhk R1PmIEhkMl+XeQVVFkCQ4xrYXQ== X-Received: by 2002:ac8:38d5:: with SMTP id g21mr74358612qtc.52.1560434282173; Thu, 13 Jun 2019 06:58:02 -0700 (PDT) Received: from localhost ([2620:10d:c091:480::9d6b]) by smtp.gmail.com with ESMTPSA id v41sm1699059qta.78.2019.06.13.06.58.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jun 2019 06:58:01 -0700 (PDT) Date: Thu, 13 Jun 2019 09:58:00 -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 02/19] btrfs: Get zone information of zoned block devices Message-ID: <20190613135759.22siaadm7l4gz2ri@MacBook-Pro-91.local> References: <20190607131025.31996-1-naohiro.aota@wdc.com> <20190607131025.31996-3-naohiro.aota@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190607131025.31996-3-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:08PM +0900, Naohiro Aota wrote: > If a zoned block device is found, get its zone information (number of zones > and zone size) using the new helper function btrfs_get_dev_zonetypes(). To > avoid costly run-time zone report commands to test the device zones type > during block allocation, attach the seqzones bitmap to the device structure > to indicate if a zone is sequential or accept random writes. > > This patch also introduces the helper function btrfs_dev_is_sequential() to > test if the zone storing a block is a sequential write required zone. > > Signed-off-by: Damien Le Moal > Signed-off-by: Naohiro Aota > --- > fs/btrfs/volumes.c | 143 +++++++++++++++++++++++++++++++++++++++++++++ > fs/btrfs/volumes.h | 33 +++++++++++ > 2 files changed, 176 insertions(+) > We have enough problems with giant files already, please just add a separate hmzoned.c or whatever and put all the zone specific code in there. That'll save me time when I go and break a bunch of stuff out. Thanks, Josef