Re: [PATCH v2] cdrom, scsi: sr: propagate read-only status to block layer via set_disk_ro()
From: Martin K. Petersen
Date: Sun Apr 26 2026 - 21:30:15 EST
Daan,
> Fix this by factoring the GET CONFIGURATION probing out of
> cdrom_open_write() into a new exported helper,
> cdrom_probe_write_features(), and having sr call it from sr_probe()
> right after get_capabilities() has populated the MODE SENSE bits.
> register_cdrom() then calls set_disk_ro() based on the full
> write-capability mask (CDC_DVD_RAM | CDC_MRW_W | CDC_RAM | CDC_CD_RW)
> so the block layer reflects the drive's actual write support.
LGTM.
Reviewed-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
--
Martin K. Petersen