Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp3736688rwi; Wed, 12 Oct 2022 06:13:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5pszWvNSBIUOlztj5sYGE7EIWmIdRBanZuVJKtYAuQlbrQK0O2YYV0JO6mXd/NV6riyK7A X-Received: by 2002:a17:907:7638:b0:78d:9e03:86a8 with SMTP id jy24-20020a170907763800b0078d9e0386a8mr15330333ejc.6.1665580420312; Wed, 12 Oct 2022 06:13:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665580420; cv=none; d=google.com; s=arc-20160816; b=IoIP6eHooCCSoUw/AvVnqqcvFjDZC1FehuN6GoXP5wC0UJsBozjX29k2P4QdFIlxzo loiWhfRfn6VPARhY09YAf+x4QchjlyY0T57m1LQTVvquUpdUmVvPI23EYhRO5heZw1+x RYdSvDmxOFp6yBMEPFkw19+KLLqBoB0NpURL++AgnePV2AN7blAaCjTjWQmMB/tEpXBP 5KUBYnoMcwFFuuvS8P8Mk4wtOhMErryNKkHpn3LpQEbtDcgDcuWwYkpJ30f8tqHqk80D nbOonrnwWZTjybiWIkzVpGxKICqm1deylMYxCIqNtYMN/Lno4NRGgFCro9wGXXyPg1D/ YnRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:reply-to:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature; bh=qrA2CI8dDGDHD2Tp/B22Ukl2G8QcxU9FnPA/bcB+ldQ=; b=ngwe8uYL56RuKawR6HqFMXPT7gRME1bFMNIYYZlq+S62TTuDpdRbPaoQ6gLm3VfQRX gtRFNLTfXllgpvauUdlegYwLAf1wU6nKMndNe3n4YXPAS9xfpies5uyiI07H1/V1SDA+ O/2BT338CY65XLS8KOVXI//MW1HR2fqxaYhzdyTFLNrfmzUx0dq7z+QmPRi9NsYro4o8 Wo/gafA26c2F9pl8KziGsA08z7MKDsDcHjzglkpIMIsYDfAwiU94SIRB+KrJRqX8ltpw VY1FgrBjihzXKFyAMyidJa85c/ZyThEtojIbaiqG2y8w9f1GKui445PgQG1DIU3xMHV0 /CxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=KkPas0Qh; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=MiRd3Q0p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r18-20020a05640251d200b0044e9ca6880bsi18230158edd.364.2022.10.12.06.13.06; Wed, 12 Oct 2022 06:13:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=KkPas0Qh; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=MiRd3Q0p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229605AbiJLM5B (ORCPT + 99 others); Wed, 12 Oct 2022 08:57:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229543AbiJLM46 (ORCPT ); Wed, 12 Oct 2022 08:56:58 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3ED49101C8; Wed, 12 Oct 2022 05:56:56 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 821171F38D; Wed, 12 Oct 2022 12:56:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1665579414; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=qrA2CI8dDGDHD2Tp/B22Ukl2G8QcxU9FnPA/bcB+ldQ=; b=KkPas0QhlyfQvs3HBwNgpgxNyh4dCX6gqiG1t+JoNUKMnT/yoeWNkNnTdoWJbYziNJAMtN bkwrk/TB/wHfon1sRXyEeFKvjqHinPHvBgsLVMR4hyaE00olDEJgLEYoqK0T0tON3+w0q3 daBBUd8dtPhEU0pSNdW2jjRBr3Fv5ao= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1665579414; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=qrA2CI8dDGDHD2Tp/B22Ukl2G8QcxU9FnPA/bcB+ldQ=; b=MiRd3Q0pPRx8b4tENbtbE8We1HgTmOCqaASy2Yee3Hw4FygwkGNUc5q4MXwGzW0Lz6cWHY 5aJ+TaIYVz+KtcDQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 3AC3E13ACD; Wed, 12 Oct 2022 12:56:54 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id mOP4DJa5RmM4agAAMHmgww (envelope-from ); Wed, 12 Oct 2022 12:56:54 +0000 Date: Wed, 12 Oct 2022 14:56:48 +0200 From: David Sterba To: Sasha Levin Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Qu Wenruo , David Sterba , clm@fb.com, josef@toxicpanda.com, linux-btrfs@vger.kernel.org Subject: Re: [PATCH AUTOSEL 6.0 38/46] btrfs: introduce BTRFS_QGROUP_RUNTIME_FLAG_CANCEL_RESCAN Message-ID: <20221012125648.GX13389@suse.cz> Reply-To: dsterba@suse.cz References: <20221011145015.1622882-1-sashal@kernel.org> <20221011145015.1622882-38-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221011145015.1622882-38-sashal@kernel.org> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_SOFTFAIL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 11, 2022 at 10:50:06AM -0400, Sasha Levin wrote: > From: Qu Wenruo > > [ Upstream commit e562a8bdf652b010ce2525bcf15d145c9d3932bf ] > > Introduce a new runtime flag, BTRFS_QGROUP_RUNTIME_FLAG_CANCEL_RESCAN, > which will inform qgroup rescan to cancel its work asynchronously. > > This is to address the window when an operation makes qgroup numbers > inconsistent (like qgroup inheriting) while a qgroup rescan is running. > > In that case, qgroup inconsistent flag will be cleared when qgroup > rescan finishes. > But we changed the ownership of some extents, which means the rescan is > already meaningless, and the qgroup inconsistent flag should not be > cleared. > > With the new flag, each time we set INCONSISTENT flag, we also set this > new flag to inform any running qgroup rescan to exit immediately, and > leaving the INCONSISTENT flag there. > > The new runtime flag can only be cleared when a new rescan is started. Qu, does this patch make sense for stable on itself? It was part of a series adding some new flags and the sysfs knob. As I read it there's a case where it can affect how the rescan is done and that it can be cancelled but still am not sure if it's worth the backport.