On 7/9/25 9:46 PM, Damien Le Moal wrote:
On 7/9/25 7:07 AM, Bart Van Assche wrote:
Move the following code into the only caller of disk_zone_wplug_add_bio():
- bio->bi_opf &= ~REQ_NOWAIT
- wplug->flags |= BLK_ZONE_WPLUG_PLUGGED
- The disk_zone_wplug_schedule_bio_work() call.
Please make sentences instead of copy-pasting code. We can see that in the
patch itself.
Is this good enough?
Move the following code into the only caller of disk_zone_wplug_add_bio():
- The code for clearing the REQ_NOWAIT flag.
- The code that sets the BLK_ZONE_WPLUG_PLUGGED flag.
- The disk_zone_wplug_schedule_bio_work() call.
/* If the zone is already plugged, add the BIO to the plug BIO list. */
if (zwplug->flags & BLK_ZONE_WPLUG_PLUGGED)
- goto plug;
+ goto queue_bio;
"queue_bio" is not a good name. Please make that "add_bio" or "plug_bio" to
match the call to disk_zone_wplug_add_bio() done.
bio_list_add() adds BIOs at the end of zwplug->bio_list and
bio_list_pop() removes BIOs from the front of zwplug->bio_list. Hence,
zwplug->bio_list is used as a queue, isn't it? This is why I chose the
name "queue_bio". Anyway, if that label name isn't considered
good enough, how about changing it into "add_to_bio_list"?
Thanks,
Bart.