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

2018-03-02 Thread Johannes Thumshirn
On Fri, Mar 02, 2018 at 02:11:02PM +, Jeremy Cline wrote: > Sure, I'll take care of it. Thanks a lot. Johannes -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5,

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

2018-03-02 Thread Jeremy Cline
On 03/02/2018 07:00 AM, Johannes Thumshirn wrote: > On Thu, Mar 01, 2018 at 02:08:10PM +, Jeremy Cline wrote: >> 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

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

2018-03-02 Thread Johannes Thumshirn
On Thu, Mar 01, 2018 at 02:08:10PM +, Jeremy Cline wrote: > 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

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

2018-03-01 Thread Martin K. Petersen
Jeremy, Thanks for looking into this! > This commit reads the disk's old state and combines it with the device > disk-reported state rather than unconditionally marking it as RW. Applied to 4.16/scsi-fixes with a few minor tweaks. Thank you! -- Martin K. Petersen Oracle Linux

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

2018-03-01 Thread Andy Shevchenko
On Thu, Mar 1, 2018 at 4:08 PM, Jeremy Cline wrote: > 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.