Re: [PATCH 2/2] Revert "ublk_drv: fix request queue leak"

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

 



On Wed, Jul 20, 2022 at 03:08:45PM +0200, Christoph Hellwig wrote:
> On Wed, Jul 20, 2022 at 06:23:22PM +0800, Ming Lei wrote:
> > Even though alloc_disk and add_disk is paired here, GD_OWNS_QUEUE still
> > can't be set because request queue has to be workable for the new alloc/
> > added disk, just like scsi.
> 
> How so?  dm has totally normall disk/request_queue lifetimes.  The only
> caveat is that the blk-mq bits of the queue are added after the initial
> non-mq disk allocation.  There is no newly added disk after the disk
> and queue are torn down.

I meant that request queue is supposed to be low level stuff for implementing
disk function, and request queue hasn't to be released and re-allocated
after each disk whole lifetime(alloc disk, add disk, del_gendisk, release disk).

IMO, the limit is just from GD_OWNS_QUEUE which moves releasing some queue
resource into del_gendisk or disk release(as the fixes you posted), and this
way is fragile, frankly speaking. In theory, allocating queue and releasing
queue should be completely symmetrical, but GD_OWNS_QUEUE does change this way.

And GD_OWNS_QUEUE can't be set for SCSI, so the two modes have to be
supported by block layer.

Thanks,
Ming




[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