[PATCH] nvme: revert commit 1293477f4f32 as it is breaking BLKROSET

Christoph Hellwig hch at lst.de
Fri Nov 6 12:59:49 EST 2020


On Fri, Nov 06, 2020 at 09:18:35AM -0800, Sagi Grimberg wrote:
> The offending commit breaks BLKROSET ioctl because a device
> revalidation will blindly override BLKROSET setting.
> 
> The author should resubmit this commit in a way that does
> not break BLKROSET.

Let's fix this properly instead of a blind revert.

> -	if (id->nsattr & NVME_NS_ATTR_RO)
> -		set_disk_ro(disk, true);
> -	else
> -		set_disk_ro(disk, false);

Just dropping the else part is probably enough for now, although
as a follow on we should probably add a "hard read-only" state to
the block layer.



More information about the Linux-nvme mailing list