Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp657418pxb; Thu, 17 Feb 2022 11:47:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJwr2QnJcQ2iqiXUJLsLVN2mOnMTED/DJx4tBd4+1Jr0+cTqyG2TKGq+8zM0chzbvH0vp3yH X-Received: by 2002:a05:6a00:10d0:b0:4e1:7504:25c7 with SMTP id d16-20020a056a0010d000b004e1750425c7mr4310976pfu.77.1645127261924; Thu, 17 Feb 2022 11:47:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645127261; cv=none; d=google.com; s=arc-20160816; b=C6dJjgdW6JqlNtTO8sor1l6rg/PmjPdVf3M7x6qpNPVbSB3/OepQppJ2edf7HRePS0 NjfdXOueUvuhq75Z3pYKXmX6hBlzuaK2nDSNOZjmccXAA/rKbOcoTRMyniQpmisfrw6Y /Pj4Xscpb+ZybEr1H/jdO2U7v/gS3orZ1G0zTznRQEM+ZXWqtQmGEmJL+Csp9o7HutN/ 27UJToCLUocgSJtMTFEwvT013Lvn/KsofaNtUpCcQvuxb9EF+fs3s56w4+ZwDRxQg0np KsKiDdZlKl6ZmPnb+e3OQdnhNZjJfp9xGgWkifDeE+UWxevldz5LkHRQpicWPWJn9WSb 1gJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=5ThTrjw8eJGxXVU77D/l4DZ/KHavY2TYx2rYbPHIVDc=; b=s+Rb7I5Fk5EVrY8h6PeaKS31RyMjDqts9LCweaZMXy6hlMB7ZZVTezgJzIl2szDx4q hFZFR8JzolrWm96Py+j4HBbu2X40siIlYYudFtc9i9IrCdnOdbAQmNbgHk8nej1CB14Z HilTJZZw2cfEnBH2+1EuGcL7M/wViLCGu4Ryb+NG/oLBvJwl485WYFzHFUeOQMKF5DBC BY8yte+tSNZH8RvRuh+y/JsTK9wRUDZVz/sfqhf5cQtXqcZpqhy9KjKTyXpH2UuDRGhT DNKtJMRnwLr4DJkEfLZey+Gw/gzwZMfqHW2PD7E9OEda2U8nrVKa+jwhoRG1vhdl8U9w KsQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=v2Ppdt5P; 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 bf16si9936550pgb.57.2022.02.17.11.47.26; Thu, 17 Feb 2022 11:47:41 -0800 (PST) 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=@infradead.org header.s=bombadil.20210309 header.b=v2Ppdt5P; 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 S238384AbiBQOD0 (ORCPT + 99 others); Thu, 17 Feb 2022 09:03:26 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:46536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229938AbiBQODZ (ORCPT ); Thu, 17 Feb 2022 09:03:25 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EBDFC2739; Thu, 17 Feb 2022 06:03:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=5ThTrjw8eJGxXVU77D/l4DZ/KHavY2TYx2rYbPHIVDc=; b=v2Ppdt5PASqi/PN2ZYV3ufJrhW JYjIc+nc+iwarsKwS7Y6+ZPcc+xNcvsKRDRbHhanompEvZKn+OvTXW25kwwMiJVmcPBpEo53MXH/5 eWPwGxnC1deE7wQy24LvSDBcYXCo++cT4nZMrwZCv0/63VwDgGwCttXlvidTT8rpc2IyhDG22YZ/o OdCtDKLLcRrSUf7zvSkcYusz8QQ6zPnOXqhkxj36ErCkxExRxi8GI38mokT+Sn7WnbO4luJ6G6iSu +RViz5r/8Nd0lm2l+EivZAnNrVnXIVEpRzCN+bB8EeoXlUl1IwTNP1vq+EGoWnKqqkwMrQnoSWUny CMoeiwRA==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nKhNF-00AqVB-Jf; Thu, 17 Feb 2022 14:03:09 +0000 Date: Thu, 17 Feb 2022 06:03:09 -0800 From: Christoph Hellwig To: Jens Axboe Cc: Christoph Hellwig , "Wang Jianchao (Kuaishou)" , Bart Van Assche , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] blk: do rq_qos_exit in blk_cleanup_queue Message-ID: References: <20220216113212.83000-1-jianchao.wan9@gmail.com> <96deb063-f4ef-fadd-543b-e905495898f6@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <96deb063-f4ef-fadd-543b-e905495898f6@kernel.dk> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE 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 Thu, Feb 17, 2022 at 06:34:02AM -0700, Jens Axboe wrote: > On 2/17/22 12:48 AM, Christoph Hellwig wrote: > > On Wed, Feb 16, 2022 at 07:32:12PM +0800, Wang Jianchao (Kuaishou) wrote: > >> From: Wang Jianchao > >> > >> When __alloc_disk_node() failed, there will not not del_gendisk() > >> any more, then resource in rqos policies is leaked. Add rq_qos_exit() > >> into blk_cleanup_queue(). rqos is removed from the list, so needn't > >> to worry .exit is called twice. > >> > >> Fixes: commit 8e141f9eb803 ("block: drain file system I/O on del_gendisk") > >> Suggested-by: Bart Van Assche > >> Signed-off-by: Wang Jianchao > > > > Ming had a pending patch to move it into disk_release instead, which > > I think is the right place. > > I missed that patch and can't seem to find it, do you have a link? [PATCH V2 12/13] block: move rq_qos_exit() into disk_release() from Jan 22. Although it would need a rebase so it can be applied without the preceding patches.