Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvme: revert commit 1293477f4f32 as it is breaking BLKROSET
@ 2020-11-06 17:18 Sagi Grimberg
  2020-11-06 17:59 ` Christoph Hellwig
  0 siblings, 1 reply; 6+ messages in thread
From: Sagi Grimberg @ 2020-11-06 17:18 UTC (permalink / raw)
  To: linux-nvme, Christoph Hellwig, Keith Busch, Chaitanya Kulkarni

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.

Fixes: 1293477f4f32 ("nvme: set gendisk read only based on nsattr")
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
---
 drivers/nvme/host/core.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 40ca71b29bb9..f5365672ca82 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -2057,11 +2057,6 @@ static void nvme_update_disk_info(struct gendisk *disk,
 
 	nvme_config_discard(disk, ns);
 	nvme_config_write_zeroes(disk, ns);
-
-	if (id->nsattr & NVME_NS_ATTR_RO)
-		set_disk_ro(disk, true);
-	else
-		set_disk_ro(disk, false);
 }
 
 static inline bool nvme_first_scan(struct gendisk *disk)
-- 
2.25.1


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-11-09 10:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-06 17:18 [PATCH] nvme: revert commit 1293477f4f32 as it is breaking BLKROSET Sagi Grimberg
2020-11-06 17:59 ` Christoph Hellwig
2020-11-06 19:02   ` Sagi Grimberg
     [not found]     ` <AEE672B4-1BEA-4DBF-9E86-0C443C10F842@wdc.com>
2020-11-06 19:52       ` Sagi Grimberg
2020-11-09  8:52     ` Christoph Hellwig
2020-11-09 10:29       ` Sagi Grimberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox