]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "scsi: sd: Keep disk read-only when re-reading partition"
authorMartin K. Petersen <martin.petersen@oracle.com>
Mon, 20 May 2019 14:57:18 +0000 (10:57 -0400)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 20 May 2019 14:57:18 +0000 (10:57 -0400)
commit9b9830f7ff4e82c39ed0234c64f62091871c3547
tree231add4abc463d299029c82bc4c2d9c54330085a
parent467e39c9fbc6c030018710d3371701a79cd72321
Revert "scsi: sd: Keep disk read-only when re-reading partition"

This reverts commit 5e29f7683cfba794a407ee99a789c7985134588f.

This patch introduced regressions for devices that come online in
read-only state and subsequently switch to read-write.

Given how the partition code is currently implemented it is not
possible to persist the read-only flag across a device revalidate
call. This may need to get addressed in the future since it is common
for user applications to proactively call BLKRRPART.

Reverting this commit will re-introduce a regression where a
device-initiated revalidate event will cause the admin state to be
forgotten. A separate patch will address this issue.

Fixes: 5e29f7683cfb ("scsi: sd: Keep disk read-only when re-reading partition")
Cc: <stable@vger.kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/sd.c