Re: [PATCHv2] block: fix leaking minors of hidden disks

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

 



On Fri, Oct 07, 2022 at 12:38:25PM -0700, Keith Busch wrote:
> From: Keith Busch <kbusch@xxxxxxxxxx>
> 
> The major/minor of a hidden gendisk is not propagated to the block
> device. This is required to suppress it from being visible. For these
> disks, we need to handle freeing the dynamic minor directly when it's
> released since bdev_free_inode() won't be able to.
> 
> Cc: Christoph Hellwig <hch@xxxxxx>
> Reported-by: Daniel Wagner <dwagner@xxxxxxx>
> Signed-off-by: Keith Busch <kbusch@xxxxxxxxxx>

Thanks for the quick fix!

Tested-by: Daniel Wagner <dwagner@xxxxxxx>

# ls -l /dev/nvme*
crw------- 1 root root  10, 124 Oct 10 08:39 /dev/nvme-fabrics
crw------- 1 root root 243,   0 Oct 10 08:38 /dev/nvme0
brw-rw---- 1 root disk 259,   0 Oct 10 08:38 /dev/nvme0n1
crw------- 1 root root 243,   2 Oct 10 08:41 /dev/nvme2
brw-rw---- 1 root disk 259,   2 Oct 10 08:41 /dev/nvme2n1
brw-rw---- 1 root disk 259,   3 Oct 10 08:41 /dev/nvme2n1p1
brw-rw---- 1 root disk 259,   5 Oct 10 08:41 /dev/nvme2n2
brw-rw---- 1 root disk 259,   7 Oct 10 08:41 /dev/nvme2n3
brw-rw---- 1 root disk 259,   9 Oct 10 08:41 /dev/nvme2n4
crw------- 1 root root 243,   3 Oct 10 08:41 /dev/nvme3
crw------- 1 root root 243,   4 Oct 10 08:41 /dev/nvme4
crw------- 1 root root 243,   5 Oct 10 08:41 /dev/nvme5
# nvme disconnect-all
# nvme connect-all
# ls -l /dev/nvme*
crw------- 1 root root  10, 124 Oct 10 08:39 /dev/nvme-fabrics
crw------- 1 root root 243,   0 Oct 10 08:38 /dev/nvme0
brw-rw---- 1 root disk 259,   0 Oct 10 08:38 /dev/nvme0n1
crw------- 1 root root 243,   2 Oct 10 08:41 /dev/nvme2
brw-rw---- 1 root disk 259,   2 Oct 10 08:41 /dev/nvme2n1
brw-rw---- 1 root disk 259,   3 Oct 10 08:41 /dev/nvme2n1p1
brw-rw---- 1 root disk 259,   5 Oct 10 08:41 /dev/nvme2n2
brw-rw---- 1 root disk 259,   7 Oct 10 08:41 /dev/nvme2n3
brw-rw---- 1 root disk 259,   9 Oct 10 08:41 /dev/nvme2n4
crw------- 1 root root 243,   3 Oct 10 08:41 /dev/nvme3
crw------- 1 root root 243,   4 Oct 10 08:41 /dev/nvme4
crw------- 1 root root 243,   5 Oct 10 08:41 /dev/nvme5




[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