[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZlbGrdbnVRk_JYp5@infradead.org>
Date: Tue, 28 May 2024 23:09:49 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Yu Kuai <yukuai1@...weicloud.com>
Cc: Christoph Hellwig <hch@...radead.org>,
Li Nan <linan666@...weicloud.com>, song@...nel.org,
linux-raid@...r.kernel.org, linux-kernel@...r.kernel.org,
yi.zhang@...wei.com, houtao1@...wei.com, yangerkun@...wei.com,
"yukuai (C)" <yukuai3@...wei.com>
Subject: Re: [PATCH v2] md: make md_flush_request() more readable
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)
Powered by blists - more mailing lists