From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Jeremy Cline <jeremy@jcline.org>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
linux-scsi@vger.kernel.org, linux-block@vger.kernel.org,
Oleksii Kurochko <olkuroch@cisco.com>,
stable@vger.kernel.org
Subject: Re: [PATCH] scsi: sd: block: Handle cases where devices come online read-only
Date: Tue, 12 Feb 2019 11:26:46 -0500 [thread overview]
Message-ID: <yq1h8d9ug55.fsf@oracle.com> (raw)
In-Reply-To: <01000168dd40a901-e418f724-3fe3-47e3-bbea-05fea79f169e-000000@email.amazonses.com> (Jeremy Cline's message of "Mon, 11 Feb 2019 15:50:28 +0000")
Jeremy,
> I noticed drivers/s390/block/dasd_ioctl.c calls set_disk_ro() to set the
> policy, where-as the policy is set with set_device_ro() in the generic
> ioctl.
There's a subtle distinction here:
- set_disk_ro() sets the policy for a whole disk
- set_device_ro() sets the policy for a block_device (typically
partition)
> It's not setting the policy to DISK_POLICY_USER_WRITE_PROTECT so I
> think it would only be a problem if the user set it to 2 instead of 1
> assuming any truthy value is acceptable. Then the user wouldn't be
> able to mark the disk as writable again since this would be
> true. Perhaps it's a somewhat far-fetched scenario.
OK, I missed that particular entry point. Will fix.
--
Martin K. Petersen Oracle Linux Engineering
next prev parent reply other threads:[~2019-02-12 16:26 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-08 23:38 [PATCH] scsi: sd: block: Handle cases where devices come online read-only Martin K. Petersen
2019-02-11 15:50 ` Jeremy Cline
2019-02-12 16:26 ` Martin K. Petersen [this message]
2019-02-12 8:03 ` Christoph Hellwig
2019-02-12 8:08 ` Hannes Reinecke
2019-02-12 16:50 ` Martin K. Petersen
2019-02-12 16:47 ` Martin K. Petersen
2019-02-13 2:57 ` [PATCH v2] scsi: sd: block: Fix regressions in read-only block device handling Martin K. Petersen
2019-02-13 7:13 ` Hannes Reinecke
2019-02-16 3:02 ` Martin K. Petersen
2019-02-19 1:36 ` Ming Lei
2019-02-19 23:26 ` Martin K. Petersen
2019-02-22 14:29 ` Christoph Hellwig
2019-02-27 4:19 ` [PATCH v3] " Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yq1h8d9ug55.fsf@oracle.com \
--to=martin.petersen@oracle.com \
--cc=jeremy@jcline.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=olkuroch@cisco.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).