Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3448068rwb; Sun, 9 Oct 2022 05:25:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6A7DROttf6JbhdlAt2+bli7a83q0FPuq5S17R8VSOmMs+FmzCsbFFPX1urqdngQ5oIpj2n X-Received: by 2002:a17:907:9603:b0:742:9ed3:3af2 with SMTP id gb3-20020a170907960300b007429ed33af2mr10872379ejc.510.1665318317466; Sun, 09 Oct 2022 05:25:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665318317; cv=none; d=google.com; s=arc-20160816; b=fmXnnIxXzfZEJGLPkaufWUBL57xOBeleaB/Cx84IIvOI2OzpLn463OrjCrHNpUHDtP zPqNTtbzsgrTzaiD7FYDG67dMO+58p2QKfXwmMrL2wWd/0gaF7cKs0JoW3luAc+vhOxA HCIk/M6i4NI37xlhIKm8tsHhqYQrFNwlHcZTYehn5CAC8lGz4lqOnf5m6zi6GP5Vf8iX zxteTK0Cb2DiPO1rXR3WkMN0P5wisNo+75YeS5Qyag9+yfMv1RozenNtkl2OpDzI4tfU 1dWjTz6x/fe8B+ErZ62/9z5j1sKU51Ciz6dwW7sz1g3UQrd24+foAs1t1r6QzdBK/yzT mdqw== 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=X2G38wtJbBiFB37+C1UdAfE84soGtmhkBVZfHBjD0aU=; b=yFUHUpicyc6d9iIEW8wa5lEoK8oj1omokuCVrB8KsCdaaNmU4eJwVWGlC32//s47FQ i7vOHBNgXusWR0IOgt6+K0HJcXVjW/QxQyQLhEwy1EWivO+O9fDsVeF3FbrmT8aXIBFK LAldF8WC3YnnnR3LJIPIL52IoJVJ/1g8YddgRqR5xedvaU1m3y49WZGiKzfoxdyf/IoP EMS+Yu1oaT4O1gOwMy4vOnkmAcWHGB4qbXeo0v0RdxCEDtmVlBcXq0bro6dV6cqFPqD8 K+ZC25Q+NaLaMikzqFPHfkXHmYr8oAb0Pjs000Mex+fWfCEHi5sPhKmgSFZzB+cGhF7P 9ODw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=L7wgl760; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c16-20020a50d650000000b0044e9c289ae5si6736860edj.155.2022.10.09.05.24.51; Sun, 09 Oct 2022 05:25:17 -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=@redhat.com header.s=mimecast20190719 header.b=L7wgl760; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230085AbiJILrX (ORCPT + 99 others); Sun, 9 Oct 2022 07:47:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229980AbiJILrU (ORCPT ); Sun, 9 Oct 2022 07:47:20 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F97F2D752 for ; Sun, 9 Oct 2022 04:47:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665316038; h=from:from:reply-to:subject:subject: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=X2G38wtJbBiFB37+C1UdAfE84soGtmhkBVZfHBjD0aU=; b=L7wgl760P/AUzp40i4srdrasvtyU51PVrqNQVtdUgWa0uE+E5p47gZx/Vc8+rco9Gf1adw n/hjGoXYI2KPHh7UAr2FMySbrZiOvG5HrnrOSEV3qt+ZvbnOFW8Hvovb5bDlQ6nVmr9bLi dDbBaK/NkD52gno5nevSMH4BDIPmcbo= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-356-d3tdQJWxPi-hwcLilEe6xw-1; Sun, 09 Oct 2022 07:47:12 -0400 X-MC-Unique: d3tdQJWxPi-hwcLilEe6xw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2ED0E101A52A; Sun, 9 Oct 2022 11:47:12 +0000 (UTC) Received: from T590 (ovpn-8-25.pek2.redhat.com [10.72.8.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A25C9112D164; Sun, 9 Oct 2022 11:47:06 +0000 (UTC) Date: Sun, 9 Oct 2022 19:47:00 +0800 From: Ming Lei To: Yu Kuai Cc: fengwei.yin@intel.com, axboe@kernel.dk, yukuai3@huawei.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, yi.zhang@huawei.com Subject: Re: [PATCH] blk-wbt: fix that 'rwb->wc' is always set to 1 in wbt_init() Message-ID: References: <20221009101038.1692875-1-yukuai1@huaweicloud.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221009101038.1692875-1-yukuai1@huaweicloud.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 Sun, Oct 09, 2022 at 06:10:38PM +0800, Yu Kuai wrote: > From: Yu Kuai > > commit 8c5035dfbb94 ("blk-wbt: call rq_qos_add() after wb_normal is > initialized") moves wbt_set_write_cache() before rq_qos_add(), which > is wrong because wbt_rq_qos() is still NULL. > > Fix the problem by removing wbt_set_write_cache() and setting 'rwb->wc' > directly. Noted that this patch also remove the redundant setting of > 'rab->wc'. > > Fixes: 8c5035dfbb94 ("blk-wbt: call rq_qos_add() after wb_normal is initialized") > Reported-by: kernel test robot > Link: https://lore.kernel.org/r/202210081045.77ddf59b-yujie.liu@intel.com > Signed-off-by: Yu Kuai Looks fine, Reviewed-by: Ming Lei Thanks, Ming