On 3/7/22 21:54, Uday Shankar wrote:
On Mon, Mar 07, 2022 at 07:39:39AM +0100, Hannes Reinecke wrote:
Why not add the 'DISK_RO=1' setting directly to the 'add' event?
That would be the logical thing to do, no?
I agree, and initially had a patch that did just this. However, for SCSI
disks the DISK_RO property is only ever announced via change uevents,
and applications such as dm-multipath may not pick up on DISK_RO if it
shows up in an add uevent instead. This patch maintains compatibility
with SCSI in that sense.
Most rules relating to storage devices test for both, 'add' _and_
'change' as DM devices are only usable after a 'change' event.
In particular multipath has been coded with that in mind, so I don't see
any issues with just adding the RO setting to the 'add' event.
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@xxxxxxx +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer