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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2F2B6C433EF for ; Thu, 17 Feb 2022 14:03:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239150AbiBQOD1 (ORCPT ); Thu, 17 Feb 2022 09:03:27 -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 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.