Re: [PATCH 1/3] blk-zoned: Move locking into disk_zone_wplug_set_wp_offset()

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

 



On Tue, May 20, 2025 at 05:06:24PM -0700, Bart Van Assche wrote:
> Instead of holding zwplug->lock around disk_zone_wplug_set_wp_offset() calls,
> move zwplug->lock locking into disk_zone_wplug_set_wp_offset(). Prepare for
> reducing the amount of code protected by zwplug->lock. No functionality has
> been changed.

Please wrap your commit logs after 73 characters.

> +					  bool only_if_update_needed)

That would probably be a bit better with a bool force, that is inverted.

>  {
> -	lockdep_assert_held(&zwplug->lock);
> -
> -	/* Update the zone write pointer and abort all plugged BIOs. */
> -	zwplug->flags &= ~BLK_ZONE_WPLUG_NEED_WP_UPDATE;
> -	zwplug->wp_offset = wp_offset;
> -	disk_zone_wplug_abort(zwplug);
> +	scoped_guard(spinlock_irqsave, &zwplug->lock) {

And don't randomly mess up the code to new locking methods.  Please
stick to the lock/unlock helpers here instead of starting a grand
reformatting.





[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