• Martin K. Petersen's avatar
    Revert "scsi: sd: Keep disk read-only when re-reading partition" · 204d5350
    Martin K. Petersen authored
    commit 8acf608e upstream.
    
    This reverts commit 20bd1d02.
    
    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: 20bd1d02 ("scsi: sd: Keep disk read-only when re-reading partition")
    Cc: <stable@vger.kernel.org>
    Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    204d5350
sd.c 98.9 KB