From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from userp2130.oracle.com ([156.151.31.86]:58926 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964986AbeFOBl4 (ORCPT ); Thu, 14 Jun 2018 21:41:56 -0400 To: Ben Hutchings Cc: Jeremy Cline , "Martin K. Petersen" , stable@vger.kernel.org, Li Ning , Sasha Levin , Greg Kroah-Hartman , LKML Subject: Re: [PATCH 4.4 128/268] scsi: sd: Keep disk read-only when re-reading partition From: "Martin K. Petersen" References: <20180528100202.045206534@linuxfoundation.org> <20180528100216.627623125@linuxfoundation.org> <1528925110.2289.175.camel@codethink.co.uk> Date: Thu, 14 Jun 2018 21:41:30 -0400 In-Reply-To: <1528925110.2289.175.camel@codethink.co.uk> (Ben Hutchings's message of "Wed, 13 Jun 2018 22:25:10 +0100") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sender: stable-owner@vger.kernel.org List-ID: Hi Ben, > (The log message about Write Protect status also reports the > underlying SCSI device flag and not the combined ro flag, but maybe > that was intentional.) I'd prefer for the printk in question to reflect the device-reported state, not the state of the block device. > I think this commit should be reverted, both in stable and upstream. > A proper fix would involve splitting the ro flag into two flags=E2=80=94o= ne > controlled by user-space and one read from the device=E2=80=94with the > effective read-only status being the logical-or of those two. I don't have a problem with distinguishing between current state and an override flag in the block layer. However, I think an incremental patch to fix that up is fine. SCSI devices don't typically switch write protection state on a whim. --=20 Martin K. Petersen Oracle Linux Engineering