Received: by 10.223.185.116 with SMTP id b49csp8976851wrg; Fri, 2 Mar 2018 11:06:58 -0800 (PST) X-Google-Smtp-Source: AG47ELu/Y58uyRuNrF8CUA4YYyXFvQjAFTmVmmGHXovfI6ZOAKfe/fvzgOSvH+0++e54xlWV2Ua3 X-Received: by 10.98.194.87 with SMTP id l84mr6636006pfg.6.1520017618031; Fri, 02 Mar 2018 11:06:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520017617; cv=none; d=google.com; s=arc-20160816; b=dc1i8WeLgG/uCqoaWYv1N/KJRVmp0kgB2zvGCMS7pNXZHL3MFIIsVVgZm3jN2qLJEd MOLFLVIuLbh3O6tFTl7hMmL8maai1j8VHHWZ3lGx0hFvEv/QsZNHcR1Whv+cyHR9QRO0 +74n86Ofqbxdwzx2g9BmlzpCf2TOFn2ztlLCfBabhyZ5FOg1Z0TxV9lf19u/3RBAYZR4 1WGEtVJOTwmEQZrEmhyX8JC3vCaCyCYxGSxo4H7AOtmsBXGzK1D2b+8n7dC0XL+vStDj 9kspCbPFhcJdG9erTMUZA6re9AO4GwtPif2qSiBJcUVyazyazNibrIh7GmouJbCfoqJZ 5kIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:feedback-id:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :dkim-signature:arc-authentication-results; bh=/gp1ENFW37HwYbtnbqn8IGfBl8XqxXEbERx9eHDwOcg=; b=cV9+amR82f6bWnsXnUs+m6RaUPxcTu7v6phDBsLuZow+axm82SXiJq3P4QfDcPndSH NM6RuO1geJ098K5BnRAKIbbmOnq2Ij+RXR0+GoKq/hGsGVvhZ+b0+pH+bHPMTuvkhQe2 FhBSujBRxlRby5PMQwlQu/fbs2x85S5uskl2AkHVUxKD7XeKNi1kNJ0+F3NFZSk6HAMl 8TcSezFS/s/TXDhmmQPW0NNZDryRojdva1hvViZ9wB01FUt9xDgU9iN7uRY+UZD8YdSk T2RKQJhQRSfGRHfd7AtyL58K4R4Wv1zYVMEGKqEZXeZGJUBwRoMUyXUkGVB0GQhwU97h tkaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@jcline.org header.s=rdybrs3533vx7mghocfwl3vdwgpl2v5u header.b=QtSk5sPS; dkim=pass header.i=@amazonses.com header.s=224i4yxa5dv7c2xz3womw6peuasteono header.b=kS00FXM+; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b65si4351196pgc.567.2018.03.02.11.06.43; Fri, 02 Mar 2018 11:06:57 -0800 (PST) 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=@jcline.org header.s=rdybrs3533vx7mghocfwl3vdwgpl2v5u header.b=QtSk5sPS; dkim=pass header.i=@amazonses.com header.s=224i4yxa5dv7c2xz3womw6peuasteono header.b=kS00FXM+; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1428527AbeCBOLH (ORCPT + 99 others); Fri, 2 Mar 2018 09:11:07 -0500 Received: from a8-62.smtp-out.amazonses.com ([54.240.8.62]:44130 "EHLO a8-62.smtp-out.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1425035AbeCBOLD (ORCPT ); Fri, 2 Mar 2018 09:11:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=rdybrs3533vx7mghocfwl3vdwgpl2v5u; d=jcline.org; t=1519999862; h=Subject:To:Cc:References:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=582DNgXFcQ5SxCnzxNBV5JrTRcMfXky45kY7SXXFItk=; b=QtSk5sPSgM62TwYJTMgfNzScHeias859J/HXzth09AEh3d8mMLOsVKfq/L4kSCM7 e7S2HiiirRhuCracHhA75KPcwot4dfHUCpJgGtAOWSfimP5dby0nRXNQG69xS14627b GAhg+XRgFangE/IuDTy1Z67d334w/aKDIXFYY3F0= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=224i4yxa5dv7c2xz3womw6peuasteono; d=amazonses.com; t=1519999862; h=Subject:To:Cc:References:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding:Feedback-ID; bh=582DNgXFcQ5SxCnzxNBV5JrTRcMfXky45kY7SXXFItk=; b=kS00FXM+7gl+y2k7CCBSug66aMIpFgCF/VrpN3nkS/EgSLWNNqHNyu+dsxIeaVgU uhm5YpxeZSRjMxWVWA9xHfh/lrJx7ZWg9QG4vnK6R5BWJVL0ITK8g3RQ/b1BcLT+fX6 KClokPn4zML2R8bRiWrNePfRFxLvKS47gPqJMUAU= X-Virus-Scanned: amavisd-new at jcline.org Subject: Re: [PATCH] scsi: sd: Keep disk read-only when re-reading partition To: Johannes Thumshirn Cc: "James E . J . Bottomley" , "Martin K . Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org References: <01000161e1e448a5-d54e05d2-58f2-4480-b05b-67185d4ffae7-000000@email.amazonses.com> <20180302120038.4mgcn2lmft4ygqz4@linux-x5ow.site> From: Jeremy Cline Message-ID: <01000161e70d459d-67080961-ba28-43ff-b519-2432ce5313f7-000000@email.amazonses.com> Date: Fri, 2 Mar 2018 14:11:02 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180302120038.4mgcn2lmft4ygqz4@linux-x5ow.site> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-SES-Outgoing: 2018.03.02-54.240.8.62 Feedback-ID: 1.us-east-1.z18Isoc/FaoPOvCyJyi1mnTt8STwoRuibXVNoUcvG6g=:AmazonSES Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/02/2018 07:00 AM, Johannes Thumshirn wrote: > On Thu, Mar 01, 2018 at 02:08:10PM +0000, 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 --getro /dev/sda > > hi Jeremy, > > Do you mind wiring up a testcase in blktest [1] for this? Given that > you already have a rather trivial reproducer. > > [1] https://github.com/osandov/ Hi Johannes, Sure, I'll take care of it. Regards, Jeremy