lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0f7345dd-8c6b-a75c-c234-2bb09f842069@huaweicloud.com>
Date: Wed, 3 Sep 2025 09:00:42 +0800
From: Yu Kuai <yukuai1@...weicloud.com>
To: Bart Van Assche <bvanassche@....org>, Yu Kuai <yukuai1@...weicloud.com>,
 hch@...radead.org, colyli@...nel.org, hare@...e.de, dlemoal@...nel.org,
 tieren@...as.com, axboe@...nel.dk, tj@...nel.org, josef@...icpanda.com,
 song@...nel.org, kmo@...erainc.com, satyat@...gle.com, ebiggers@...gle.com,
 neil@...wn.name, akpm@...ux-foundation.org
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
 cgroups@...r.kernel.org, linux-raid@...r.kernel.org, yi.zhang@...wei.com,
 yangerkun@...wei.com, johnny.chenyi@...wei.com,
 "yukuai (C)" <yukuai3@...wei.com>
Subject: Re: [PATCH RFC v3 14/15] block: fix disordered IO in the case
 recursive split

Hi,

在 2025/09/03 1:20, Bart Van Assche 写道:
> On 8/31/25 8:32 PM, Yu Kuai wrote:
>> -void submit_bio_noacct_nocheck(struct bio *bio)
>> +void submit_bio_noacct_nocheck(struct bio *bio, bool split)
>>   {
>>       blk_cgroup_bio_start(bio);
>>       blkcg_bio_issue_init(bio);
>> @@ -745,12 +745,16 @@ void submit_bio_noacct_nocheck(struct bio *bio)
>>        * to collect a list of requests submited by a ->submit_bio 
>> method while
>>        * it is active, and then process them after it returned.
>>        */
>> -    if (current->bio_list)
>> -        bio_list_add(&current->bio_list[0], bio);
>> -    else if (!bdev_test_flag(bio->bi_bdev, BD_HAS_SUBMIT_BIO))
>> +    if (current->bio_list) {
>> +        if (split && !bdev_is_zoned(bio->bi_bdev))
>> +            bio_list_add_head(&current->bio_list[0], bio);
>> +        else
>> +            bio_list_add(&current->bio_list[0], bio);
> 
> The above change will cause write errors for zoned block devices. As I
> have shown before, also for zoned block devices, if a bio is split
> insertion must happen at the head of the list. See e.g.
> "Re: [PATCH 1/2] block: Make __submit_bio_noacct() preserve the bio 
> submission order"
> (https://lore.kernel.org/linux-block/a0c89df8-4b33-409c-ba43-f9543fb1b091@acm.org/) 
> 

Do you mean we should remove the bdev_is_zoned() checking? I added this
checking because I'm not quite sure about details in zone device, and
this checking is aimed at prevent functional changes in zone device.

So I don't think this change will cause write errors, the write errors
should already exist before this set, right?

Thanks,
Kuai

> 
> Thanks,
> 
> Bart.
> .
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ