Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp216314imm; Thu, 14 Jun 2018 18:42:41 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKXaEGUhA9oXNnhKtkYpRXWgk6Mh5wNPXzRKnBfwLi1BCi/k3dV2U0CV4fVQFxGPYHL5ICg X-Received: by 2002:a17:902:206:: with SMTP id 6-v6mr5646530plc.294.1529026961072; Thu, 14 Jun 2018 18:42:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529026961; cv=none; d=google.com; s=arc-20160816; b=AlihfcwUtA8rrTIIVzq2rY5//f8VFAcJ9xzJxh+7gxJ0rtCB4cxFkz5QayLbtmgVLG h4m0QQAJhJo8iQXtce77m+53Jd2AR+cY1Tz27haf82r4Do6SiyXe9hlBq8cPqrT15tM9 D6c6/Fh+Lpw7Kc0j2jH6m+FhriNb1tw/nvPWZ1fuPGkt2bDiw+ZVDLk8XTjgmKUWxQ8f F8+xloUholImWXaMqYsskOicuac4W3kCgW9O5TpVVEQbqsf9XIfw04a491xwQEioS21u WTSQ7KGcd4I29thu74Crj8+SaemLOJyVIYUE+WikjkrSOwAKo+RkaidbuOSdcU+F44eO 5+ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:message-id:in-reply-to:date:references:organization:from :subject:cc:to:dkim-signature:arc-authentication-results; bh=KA1GKLcv1shouybnVBOti0n2P6plaNSDKgjoJdgw1CI=; b=Yq0JpYo0wwyuxcTSfpwL3FIk2nmL09leP+qOSfxY1Tr47nno1sfKlSgaYNwOiztkXp ao5IJTyxmuMvJaC385rNARCD4WxBEuimEnzxw0hDl6oxrDlyzjPvJ1QFVJCgdjCig3lS ly8DGhJeZttoAjddkoh96mYyjwmfGgb799sWRBcUT3g6OZzzih0A9QFkAlkw1/Lk3mWv 8tL3fNkXD5xLRLgEBu0yU7Wc5UW4p7hXzvTOfdz7orzXl52xdTfWzga0tO2/fsbyhzas Q5gOQjOb49NcFOPzYGRwfuYTxoYgpcgZzRtHyAz4kDDkwotjL15eOKQqdA9Lp+rUIWnL 902g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=oZcKKumP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n11-v6si6724640plg.230.2018.06.14.18.42.25; Thu, 14 Jun 2018 18:42:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=oZcKKumP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965123AbeFOBl6 (ORCPT + 99 others); Thu, 14 Jun 2018 21:41:58 -0400 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 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w5F1eTvJ158129; Fri, 15 Jun 2018 01:41:36 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=to : cc : subject : from : references : date : in-reply-to : message-id : mime-version : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=KA1GKLcv1shouybnVBOti0n2P6plaNSDKgjoJdgw1CI=; b=oZcKKumPQjXu8RlzNyi+HvRVG8mj1TjTy8fNF/kFOt37BGRozkbuSOvv7x66xgj7XnUP v2pkI7dKc+RKglil8Wimh/oQD0+V9U+ky5NAUjMxjFO3GgK0B7mBoxESSrwflSYjLDxo TZSjbKFN1sgD1r+SkSqwXAY65Ibk1TgZt0ZxC/rxixrfj/wmJiBug+kKHFx4rFW5G5El HTgirNAKJtVEmZTJyg4b5M6eRG73uNF+ED6lSdWsKLgyET9D4uhgHTgscnjSefSFBM/P bGvD5O+cCP2O/zXv5nVmYFSzKYv+n16J40Pn8AH/nN+1gJY+DAZbGAKjub4YmonGTS0W 9g== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2130.oracle.com with ESMTP id 2jk0xrf7pm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 15 Jun 2018 01:41:36 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w5F1faxR010928 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 15 Jun 2018 01:41:36 GMT Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w5F1fZfW013334; Fri, 15 Jun 2018 01:41:35 GMT Received: from ca-mkp.ca.oracle.com (/10.159.214.123) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 14 Jun 2018 18:41:34 -0700 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" Organization: Oracle Corporation 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: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8924 signatures=668702 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=532 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806150016 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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