Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7010895ybi; Thu, 13 Jun 2019 08:07:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqz2iOqaqtT1PEeNAjSwWwEfiPfAzf4pohSi+tcGgJgjfyPPbpW6hkSgLzXb+iRGx5JJYPR4 X-Received: by 2002:a17:902:b944:: with SMTP id h4mr85778230pls.179.1560438433644; Thu, 13 Jun 2019 08:07:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560438433; cv=none; d=google.com; s=arc-20160816; b=SjkOXjbcLn57C3/iuu+X26C2WPer00HWdspzLF4kSgbdZ3SISIaM03WNa9ex05UmXP InTuAb+mL68PUq0s5tIMUpHwtIHtRdUUnTKZ8tKUeWmnRyXIoUWG9IWpvum+DS5sUpoU KjyaPc1vPQjoGtYD2rS6IKIhOK5o4jgRyUvqssDMZuW5OsiYbzrF+DSmTxmfp+pj2ZH+ DfERrof3pQ6eR395LrhT/RbvUtsRCAfkBFMlMPloMHxZdUUtX/q27XmY3c8scLbmiNdZ 9eRVuEVzrw5FXpcF3SEmEwqnDAjQAz4FFozegCnq2E3dcHu5qLf+WeccgfThD9O0h6Lq uw6Q== 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=oUME5bpW/Pr2SfzIJPfU0VV06cSnG0RxvavtUh+MNiE=; b=zhanoCc/tJ/6hCWLjeWjabEu3d17mvFDI4hk33+vEhRzaWjsyF2QMDGGiahzF1DgAY vDAeGaJ1tVOX4OZVggzXDukV10u6zy1xWYW0B6O/d5XDHO3EXABMTEJMG+ho2ekXSL2k rf7nR8bnjgOqMroGLtbXpiwnDXADYokmfuRBL9mEkBWe/+uPRhsR4kRS8nxw5j+E5EXP zbFfQVYmuGnwRiWAYmoPKDwqNa6gOY8mrko2hopaMs7edKOr1pLM/7UJbL3dLftezYjU VUKMMlox+Ks+QXn6WRr7PlAujBrrJXWYrei5tB9YNjQzT+/jw5tPdFBDneLYkmfIXIrP dhGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@toxicpanda-com.20150623.gappssmtp.com header.s=20150623 header.b="M/EoFGxS"; 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 p1si6301pjo.33.2019.06.13.08.06.57; Thu, 13 Jun 2019 08:07:13 -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="M/EoFGxS"; 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 S1732412AbfFMPG0 (ORCPT + 99 others); Thu, 13 Jun 2019 11:06:26 -0400 Received: from mail-qt1-f193.google.com ([209.85.160.193]:37498 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732416AbfFMOJZ (ORCPT ); Thu, 13 Jun 2019 10:09:25 -0400 Received: by mail-qt1-f193.google.com with SMTP id y57so22718249qtk.4 for ; Thu, 13 Jun 2019 07:09:25 -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=oUME5bpW/Pr2SfzIJPfU0VV06cSnG0RxvavtUh+MNiE=; b=M/EoFGxSABgyBztItve42zjdupYcYzfD66qeOAPLBjvpSgzRq3HwHibHyK/bfTYVEp Snv4WKDHMWhtXFgzfNRIFTonBDpjlZsLLMc7vcnU9wP5LDnc/CIYINLuC6ppOlhzSzY5 ZWucyBOfomZUhxoFgVEij2q2INcKhyqsuO0F4hRvO7iu5rONPKPMTHOya75MQbomTah8 wugG9whK6bvLQvDOPZ19ijqEfPhbK5NevTijutOMONhj6LXCDCikjy8e+z5pAil5qWGh rbacUCGTqim+/+M2vPQhdgQMs5lJtjkZ2RiSQhQb59i7UDGC3ZBzpBNJdPhIml4PbxZi n6EA== 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=oUME5bpW/Pr2SfzIJPfU0VV06cSnG0RxvavtUh+MNiE=; b=NAIP6bIOSH+DVEz3E1Wtjvie8vKsUpvk5pueXVJGkgYDLCABwR1z6q3hfyGP+8FMbW FyyzBjkDb8S2lql9FLJWh/SypV+cDGmuz+qXDiGr8Zo6jQZQ2P2GsL0dzzpawTSVCD+D Bd5NFs4OALgcFcyU9fn7X18m+aCt0rvvyddglY0mvp89vlDo8gk/fQIdntmRFTFlgm2P p9yJsPZ7stkS7CGLSzJMxKPazD0o4VBecTD37dLdhE7RnL35ecoFn5sDL5DGBHRWfNuQ P+8Zy0HjqYO54Q+Fme5WlwH6YoeKNatPdtZ/bqeNyOKdlOpcRMcaFGDo+bReTsK/MW1w Akew== X-Gm-Message-State: APjAAAUYRWvEQA2jl5klY+E1H6fDsEDDd2I+7GPYJlxdxEy4CGtqwwWJ 8eglt79miBODtMr+AwUv6tZceA== X-Received: by 2002:a0c:b036:: with SMTP id k51mr3868142qvc.103.1560434964503; Thu, 13 Jun 2019 07:09:24 -0700 (PDT) Received: from localhost ([2620:10d:c091:480::9d6b]) by smtp.gmail.com with ESMTPSA id m44sm1865189qtm.54.2019.06.13.07.09.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jun 2019 07:09:23 -0700 (PDT) Date: Thu, 13 Jun 2019 10:09:22 -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 08/19] btrfs: make unmirroed BGs readonly only if we have at least one writable BG Message-ID: <20190613140921.a2kmty5p6lzqztej@MacBook-Pro-91.local> References: <20190607131025.31996-1-naohiro.aota@wdc.com> <20190607131025.31996-9-naohiro.aota@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190607131025.31996-9-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:14PM +0900, Naohiro Aota wrote: > If the btrfs volume has mirrored block groups, it unconditionally makes > un-mirrored block groups read only. When we have mirrored block groups, but > don't have writable block groups, this will drop all writable block groups. > So, check if we have at least one writable mirrored block group before > setting un-mirrored block groups read only. > I don't understand why you want this. Thanks, Josef