From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08CD8C433DB for ; Mon, 11 Jan 2021 19:17:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BFE6822BF3 for ; Mon, 11 Jan 2021 19:17:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390582AbhAKTRV (ORCPT ); Mon, 11 Jan 2021 14:17:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387724AbhAKTRV (ORCPT ); Mon, 11 Jan 2021 14:17:21 -0500 Received: from mail-qt1-x829.google.com (mail-qt1-x829.google.com [IPv6:2607:f8b0:4864:20::829]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F5A7C061794 for ; Mon, 11 Jan 2021 11:16:41 -0800 (PST) Received: by mail-qt1-x829.google.com with SMTP id e15so65864qte.9 for ; Mon, 11 Jan 2021 11:16:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=EOIAHZy7Alr8j0pKyIV99mgIDJFNi3YsWZPV/tFxciI=; b=Rv0JtkE3sNJWZpvrJPQTHpAG6CzUTdY4fYgqMvTNVg+8Zpuc52jkJ2q1qb0jj1I8nN 4Hlhzx+x0yRbv4yrFXrBRI/sd+Gsf2PEJUGvquMY6V73JNug6wlzc/vsRQpG3Q0B3AC3 j8sX8eJiHOfnktBqo+eDB5FzD4otaF8o/OqWm583fAIQnCRQT0+Dx59198BppCDpomq/ AsV/Tc55Nj8EYfz0AczTAtr8eWnCN3LSj3FzNOME1wtRKBe/C2liJAhY2cqM2xmipFvr e9dgL5+R0Gqe4Qcm9JHfZpqJQSOWmdo3CnKqFzpUqF6xRx4Y7D6c8CUD3rVB/duBQpje X/pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=EOIAHZy7Alr8j0pKyIV99mgIDJFNi3YsWZPV/tFxciI=; b=IxLNxcxSRweHJsJ63yzgENShghb65F9rD+ziPYeEZryr3SlhL7ehXv5CHC9S46CjyN ZOpaoKOyp5vll8ShymY6NxvVJHHgi8nFQBtGANxJXVEVFCiRo1+o/VqHMzBzBWicOuzw nNvvGaiQuigGu+SxjIqUfHlEFyBLLo3QZ/oF741+KHqV985otL18TzFtFPaUg+7L01NO UGnXlu6nLgj7gtl3VKPgKc7HbZOIAYi1SftMNHN8HCmPA47pplgOahxbbXYAn+/DNSL+ L7uDRrbF5qAE/z3u8+j/D9KrKQFcW53bG6zLHZfILxXcYJtiMoziXnUD6yw5qtbJd5RX MFKw== X-Gm-Message-State: AOAM531BKC4f9KS9P++l14bb5M00cTfjl/F6d8qH+AQHXx3tYB8OsONh 1SoCKPXoxVm2eNzXlo8g6+m7uA== X-Google-Smtp-Source: ABdhPJxm4i5VdPQb/eP5QpGwRg3sntj8WZF0Msn9gz42PlqLZvCHhmdxl9uij6E89ihSRlw99Ix1nQ== X-Received: by 2002:ac8:6b59:: with SMTP id x25mr1061609qts.301.1610392600388; Mon, 11 Jan 2021 11:16:40 -0800 (PST) Received: from [192.168.1.45] (cpe-174-109-172-136.nc.res.rr.com. [174.109.172.136]) by smtp.gmail.com with ESMTPSA id x185sm415721qkb.87.2021.01.11.11.16.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 11 Jan 2021 11:16:39 -0800 (PST) Subject: Re: [PATCH v11 03/40] btrfs: defer loading zone info after opening trees To: Naohiro Aota , linux-btrfs@vger.kernel.org, dsterba@suse.com Cc: hare@suse.com, linux-fsdevel@vger.kernel.org, Jens Axboe , Christoph Hellwig , "Darrick J. Wong" References: <06add214bc16ef08214de1594ecdfcc4cdcdbd78.1608608848.git.naohiro.aota@wdc.com> From: Josef Bacik Message-ID: Date: Mon, 11 Jan 2021 14:16:38 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On 12/21/20 10:48 PM, Naohiro Aota wrote: > This is preparation patch to implement zone emulation on a regular device. > > To emulate zoned mode on a regular (non-zoned) device, we need to decide an > emulating zone size. Instead of making it compile-time static value, we'll > make it configurable at mkfs time. Since we have one zone == one device > extent restriction, we can determine the emulated zone size from the size > of a device extent. We can extend btrfs_get_dev_zone_info() to show a > regular device filled with conventional zones once the zone size is > decided. > > The current call site of btrfs_get_dev_zone_info() during the mount process > is earlier than reading the trees, so we can't slice a regular device to > conventional zones. This patch defers the loading of zone info to > open_ctree() to load the emulated zone size from a device extent. > > Signed-off-by: Naohiro Aota Reviewed-by: Josef Bacik Thanks, Josef