[PATCH v3 04/10] block: introduce dma map backed bio type
Christoph Hellwig
hch at lst.de
Mon May 18 05:54:39 PDT 2026
On Mon, May 18, 2026 at 11:29:54AM +0100, Pavel Begunkov wrote:
> On 5/13/26 09:19, Christoph Hellwig wrote:
>>> + if (!bio_flagged(bio_src, BIO_DMABUF_MAP)) {
>>> + bio->bi_io_vec = bio_src->bi_io_vec;
>>> + } else {
>>> + bio->dmabuf_map = bio_src->dmabuf_map;
>>> + bio_set_flag(bio, BIO_DMABUF_MAP);
>>> + }
>>
>> This is backwards, please avoid pointless negations:
>
> I can flip it, but compilers tend to prefer the true branch. E.g. this
What kind of compiler optimization do you expect from code where
both sides of the conditional assign different arms of the same union
and just propagate the bit that was set?
More information about the Linux-nvme
mailing list