Re: [PATCH v20 05/13] blk-zoned: Move code from disk_zone_wplug_add_bio() into its caller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux