Re: [PATCH] block: Prevent potential deadlock in blk_revalidate_disk_zones()

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

 



On 11/26/24 19:33, Christoph Hellwig wrote:
> On Tue, Nov 26, 2024 at 05:53:42PM +0900, Damien Le Moal wrote:
>> in disk_update_zone_resources(). disk_free_zone_resources() is also
>> modified to operate with the queue frozen as before by adding calls to
>> blk_mq_freeze_queue() and blk_mq_unfreeze_queue().
> 
> This now adds a queue freeze to disk_release for zoned device, which
> previously didn't have it.  Given that at this point no I/O on the
> disk is possible, and the freezes are quite expensive that's probably
> not a good idea.
> 
>> -	blk_mq_freeze_queue(q);
>>  	if (ret > 0)
>>  		ret = disk_update_zone_resources(disk, &args);
>>  	else
>>  		pr_warn("%s: failed to revalidate zones\n", disk->disk_name);
>>  	if (ret)
>>  		disk_free_zone_resources(disk);
>> -	blk_mq_unfreeze_queue(q);
> 
> So for a minimal version you could keep the freezing here.

Good point. Sending V2 with that fixed.


-- 
Damien Le Moal
Western Digital Research




[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