Re: [PATCH 2/2] block: loop: delete partitions after clearing & changing fd

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

 



On Tue, Jul 07, 2020 at 04:45:52PM +0800, Ming Lei wrote:
> After clearing fd or changing fd, we have to delete old partitions,
> otherwise they may become ghost partitions.
> 
> Fix this issue by clearing GENHD_FL_NO_PART_SCAN during calling
> bdev_disk_changed() which won't drop old partitions if GENHD_FL_NO_PART_SCAN
> isn't set.

I don't think messing with GENHD_FL_NO_PART_SCAN is a good idea, as
that will also cause an actual partition scan.  But except for historic
reasons I can't think of a good idea to even check for
GENHD_FL_NO_PART_SCAN in blk_drop_partitions.



[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