From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from dggsgout12.his.huawei.com (dggsgout12.his.huawei.com [45.249.212.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1CD7517BA5; Thu, 26 Jun 2025 11:37:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750937829; cv=none; b=UXP7bOlUT7AKzfwoA+sEqDt420aGLV9CD3NhYlOq76pkp0wlApH/5X6OpP7ogPF+1CoEO4/Xhb2y1lcpc+JlYe3MzJn04F7QUdwlAcmwiSJwPmYJCD7vY92kX9UcCdj7wAflrn1q9LLa8g1k9c6bS5SpfzYG0YZANHPVTdVmFDE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750937829; c=relaxed/simple; bh=mtyK/NOV28AKjGqGVdbBweKlopSsf/40dE/zw8jYnf0=; h=Subject:To:Cc:References:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=XPY2LjBty7FxRk5rPGlSF9IHRVNh79eo88LBu5nfp+XyrFA3qNth6nluM9KNwcMdMyfPwjy3929XdCa//hItXYwsDOZm47oI+Vhq9eH8+6osjZJqgsBkMBTae8lvAHOUqqpoNBq9HjwpTWU8/QPacZtAW0xv9njLUTeHcrCw2XI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com; spf=pass smtp.mailfrom=huaweicloud.com; arc=none smtp.client-ip=45.249.212.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huaweicloud.com Received: from mail.maildlp.com (unknown [172.19.163.216]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTPS id 4bSc9G3xzRzKHLv5; Thu, 26 Jun 2025 19:37:06 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.128]) by mail.maildlp.com (Postfix) with ESMTP id E44F71A12EF; Thu, 26 Jun 2025 19:37:04 +0800 (CST) Received: from [10.174.179.143] (unknown [10.174.179.143]) by APP4 (Coremail) with SMTP id gCh0CgA3m1_fMF1oAe_ZQg--.50734S3; Thu, 26 Jun 2025 19:37:04 +0800 (CST) Subject: Re: [PATCH] block: fix false warning in bdev_count_inflight_rw() To: John Garry , Yu Kuai , axboe@kernel.dk, hare@suse.de, hch@infradead.org Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, yi.zhang@redhat.com, calvin@wbinvd.org, david@fromorbit.com, yi.zhang@huawei.com, yangerkun@huawei.com, johnny.chenyi@huawei.com, "yukuai (C)" References: <20250626083927.576207-1-yukuai1@huaweicloud.com> <27e4f72f-3b6e-4dc8-a722-0ace9aa8c066@oracle.com> From: Yu Kuai Message-ID: Date: Thu, 26 Jun 2025 19:37:03 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <27e4f72f-3b6e-4dc8-a722-0ace9aa8c066@oracle.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-CM-TRANSID:gCh0CgA3m1_fMF1oAe_ZQg--.50734S3 X-Coremail-Antispam: 1UD129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UjIYCTnIWjp_UUUYK7AC8VAFwI0_Gr0_Xr1l1xkIjI8I6I8E 6xAIw20EY4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM28Cjx kF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWDJVCq3wA2z4x0Y4vE2Ix0cI8I cVCY1x0267AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87 Iv6xkF7I0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE 6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r106r15McIj6I8E87Iv67AKxVWUJVW8JwAm72 CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IY64vIr41lF7I21c0EjII2zVCS5cI20VAGYxC7M4II rI8v6xkF7I0E8cxan2IY04v7Mxk0xIA0c2IEe2xFo4CEbIxvr21l42xK82IYc2Ij64vIr4 1l4c8EcI0Ec7CjxVAaw2AFwI0_Jw0_GFyl4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAq x4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1q6r 43MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF 7I0E14v26r4j6F4UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxV WUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjfU F9a9DUUUU X-CM-SenderInfo: 51xn3trlr6x35dzhxuhorxvhhfrp/ Hi, 在 2025/06/26 17:34, John Garry 写道: > Is it even safe to even use this function when not used for just > informative purposes? I mean, for example, it is used by md code to > check for idle state - could that check return an invalid result (and > cause harm)? For md code, I think it's ok, md still use completed IO for idle state. More importantly, the io_ticks can be wrong due to inflight to be zero, however, it's inaccurate for a long time and there is no much we can do :( Thanks, Kuai