Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp518956lqb; Wed, 29 May 2024 02:51:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWtrqG4nlGVFFGQHaKDRWU+rNhMNZQqJGUer9xoH8DverrKGQvsb4PYoFY1KjHrDPNcYmVeSsVvs8nFm+XSYE7JMB/TGs49X0I9VOiCgg== X-Google-Smtp-Source: AGHT+IFVrp9A4YBCweH1jeJzT4y+RHlVFEum0InRZugWfGkl8s+9rVheO+77xryTPMR/5kyARZt4 X-Received: by 2002:a17:90a:ec0f:b0:2bd:93ea:4fdd with SMTP id 98e67ed59e1d1-2bf5f716e86mr11383373a91.45.1716976287734; Wed, 29 May 2024 02:51:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716976287; cv=pass; d=google.com; s=arc-20160816; b=R5AXAQMwOZxKm/y+GDu/Y1PKAmUqR7xd0kkodx4Um7hCRss3y6FosA0KBQVIsSPebR fhHNP2vAE8qaRQ9bRJW1PKtmuICjkVn5t5wGVzqs+YO6do8RUEBoxxGI8U8R5I/N88xT RIFhaIbo9jxLEqtGEevYnZje7zZ0aStHsrkkrikAzMI1vAidW6yScthv1mfkOyyUSVoN 4qXq4cRaqjYtI5+soAhvhdv0DMiOSKBHaEeQrNxSRdhH/HBEpEhp/2Bh5oyKYXL8+mx4 MGsqc9b48FHgDfcjdlO5k/WAEZ06RYxVrHYPJP9Bwylfb6M+1prBqPq3h6Jwdk35fb2x VNCA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=iQFKXiRuggval0rDYcI/GE9lXQV3wEyAb9C3A1xxaNs=; fh=jx8AR6MVEbiBgoTlIieIZ4ki17GXTs8mWitxEHGNKA4=; b=TNA2xGFUJtNjPyV53vNq5hCQJUIalcQdNwHqaqFYzUW83gdH8OVzgr5pGHgNDPGh9q WhjseSOMnbXIfGhVrRK6y1tbJtnpN5y/8Gbbf5hccA+bPn2hcFyHr9TZDqZ4vN2KQS6l HmfNN9CPt/UNM8LeMau+19QBJV9JoNatEiH3FBLLfSR53T/GPLAYRnRqtiHmkoiETCro OnNn0zipYuW88wrtZh34QKgxC2hkfAGaBzeleR40v4WTZ3iBBcZv8nKkmNy5dLntn7bD vrel+DRARDozbcd9fxbVq/9/NSK94nOXa6aMVF91NqoCdx9j/COiG/GzFQKeOi9YZGGr S/Fg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=PbIxQ4aP; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-193492-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193492-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2bdd9ef0d1dsi11381369a91.41.2024.05.29.02.51.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 02:51:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-193492-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=PbIxQ4aP; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-193492-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193492-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 25D1628E204 for ; Wed, 29 May 2024 06:10:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 15A5115E5AD; Wed, 29 May 2024 06:09:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="PbIxQ4aP" Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 E56E91D531; Wed, 29 May 2024 06:09:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716962993; cv=none; b=UR0pr7poncuPN5FTcAXi92pwbaPoPb8IZNPbcrLkISFwI+W3APUUSCQWWVX5PZy/sTg8cw4Q66mje8VYhvJhlxiHl6eWk0/bnCpQYYm1wFabTvtgqyb0Jf7TqRMLBROWbXHlVh8CaJg8uoRF1vPD3G7WYeDdkj4zzP7NQMP+7WY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716962993; c=relaxed/simple; bh=cS3mOSWOwnCsXFDAlr/R0hdrwPsnVMvOAeC9MB0iJnQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=A18/m2MpQupScMQFTAyS8lqjgQuVSPLlOb6j+WLMuj9Cfk8ASXG8+Wg8w8C8SntwlgpTH+V2H7FKINmFbaUx2NBdvFSiIZpLWlARrezyt8HNFEQMZpPoKl5/jW8Jpzi/Ge4jHMSrpdJjhpDW0jYEK/tNKOu7IR9QteR/agvQ09M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=PbIxQ4aP; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org 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=iQFKXiRuggval0rDYcI/GE9lXQV3wEyAb9C3A1xxaNs=; b=PbIxQ4aPnLnt1ABs9RK1C2ufQv qIhOzOw79eUYZ7KglvZg6wNHlr6YFPWncUATvf/zBzJtR/VBLyFm7fwyFbs7AlHxCxuHY5RJITNoR 1UpOgAqNh16VDI47ww/B5EFf/rxpTDRU+MlygczKk+khGO76Ueza0MesS9NBkyqvITm85lNPItd/G PH3gTqo5gOKrzMwWhaPnyiy2zxdAZezsa8ca+klke7oA4kwryBB5GhjNuBLByHBMSgK6OvScfzjoU bxo+66+yrBoyQQxKYuc5HzIf8h/RQT/lxPDBDACq8wiWzQPJ8ZCR43A0fx5O0m65ejJSQaxkerZAS FK9k+iYQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1sCCVR-00000002y0c-3hOw; Wed, 29 May 2024 06:09:49 +0000 Date: Tue, 28 May 2024 23:09:49 -0700 From: Christoph Hellwig To: Yu Kuai Cc: Christoph Hellwig , Li Nan , song@kernel.org, linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org, yi.zhang@huawei.com, houtao1@huawei.com, yangerkun@huawei.com, "yukuai (C)" Subject: Re: [PATCH v2] md: make md_flush_request() more readable Message-ID: References: <20240528203149.2383260-1-linan666@huaweicloud.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html On Wed, May 29, 2024 at 02:08:20PM +0800, Yu Kuai wrote: > > submit_bio_noacct > if (op_is_flush(bio->bi_opf)) > if (!test_bit(QUEUE_FLAG_WC, &q->queue_flags)) > if (!bio_sectors(bio)) > bio_endio(bio); > > Or will the bi_size to be less than one sector? bi_size is always aligned to the sector size except for passthrough command. So the two versions are 100% equivalent. bio_sectors just does a useless shift (which the compiler hopefully optimizes away)