Re: [PATCH v2] scsi: sd: Keep disk read-only when re-reading partition

2018-03-06 Thread Martin K. Petersen
Jeremy, > Sorry about this, but there's a bug in the first version of this patch. > I'm not sure what the protocol is for sending revised patches when the > earlier version got accepted, but I don't see the first version in > 4.16/scsi-fixes yet. It's your lucky day! I botched fixing up somethin

[PATCH v2] scsi: sd: Keep disk read-only when re-reading partition

2018-03-06 Thread Jeremy Cline
If the read-only flag is true on a SCSI disk, re-reading the partition table sets the flag back to false. To observe this bug, you can run: 1. blockdev --setro /dev/sda 2. blockdev --rereadpt /dev/sda 3. blockdev --getro /dev/sda This commit reads the disk's old state and combines it with the de