ACK/APPLIED [OEM-5.10] Re: [PATCH 0/1][SRU][OEM-5.10/H/U] Fix regression for disk media removal

Timo Aaltonen tjaalton at ubuntu.com
Wed Mar 24 07:27:06 UTC 2021


On 24.3.2021 8.49, chris.chiu at canonical.com wrote:
> From: Chris Chiu <chris.chiu at canonical.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/1920874
> 
> [Impact]
> Memory card removal event can not be reflected via uevent on some card
> readers Ex. Realtek card readers 0bda:0328 and 0bda:0158. Thus the file
> browser still see the ghost disk even it's already removed.
> 
> [Fix]
> Found the commit 6540fbf6b643 in 5.9.0-rc3 introduces this regression.
> Make sure the partition scan will never be skipped for each vfs_open
> until the partition scan is really done.
> 
> 
> [Test]
> Verified on the Realtek card reader 0bda:0328 on Dell Precision 7820
> and the external Realtek usb interface card reader 0bda:0158.
> 
> Insert the SD card in the card reader
>    $ udevadm monitor
> Remove the SD card and check the udevadm monitor output
> 
> KERNEL[188.377042] change /devices/pci0000:00/0000:00:14.0/usb2/2-9/2-9:1.0/host5/target5:0:0/5:0:0:0/block/sdc (block)
> UDEV [188.383261] remove /devices/pci0000:00/0000:00:14.0/usb2/2-9/2-9:1.0/host5/target5:0:0/5:0:0:0/block/sdc (block)
> KERNEL[188.390887] change /devices/pci0000:00/0000:00:14.0/usb2/2-9/2-9:1.0/host5/target5:0:0/5:0:0:0/block/sdc (block)
> UDEV [188.396012] remove /devices/pci0000:00/0000:00:14.0/usb2/2-9/2-9:1.0/host5/target5:0:0/5:0:0:0/block/sdc (block)
> 
> The remove event should be observed from the output messages. On the
> affected card reader, only change event would be observed.
> 
> [Where problem could occur]
> These kind of card readers doesn't send remove event of scsi_disk and
> scsi_device like others so they only depend on the block subsystem to
> detect the media change and relect the removal event by partition scan.
> The behavior related to media removal is changed after 5.9.0-rc3.
> The remove event is not able to be correcly reflected since then, the
> device node of the media will remain there until next card insertion.
> 
> Chris Chiu (1):
>    block: clear GD_NEED_PART_SCAN later in bdev_disk_changed
> 
>   fs/block_dev.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 

ACK

and applied to oem-5.10, thanks

-- 
t



More information about the kernel-team mailing list