Skip to contentSkip to conversation

nvme: inherit stable pages constraint in the mpath stack device

PATCH Superseded Sagi Grimberg 1 participant 2 messages Apr 1, 2020 NVMe

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Sagi Grimberg

author maintainer
#0 lore raw

PATCH 1/1 nvme: inherit stable pages constraint in the mpath stack device

If the backing device require stable pages, we need to set it on the target as well. This applies to rdma/fc transports when doing data integrity and tcp transport calculating digests.

---
 drivers/nvme/host/core.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/nvme/host/core.c +7 -0
index 222925dfe364..fc76616e173a 100644
@@ -1907,6 +1907,13 @@ static void __nvme_revalidate_disk(struct gendisk *disk, struct nvme_id_ns *id)
 	if (ns->head->disk) {
 		nvme_update_disk_info(ns->head->disk, ns, id);
 		blk_queue_stack_limits(ns->head->disk->queue, ns->queue);
+		if (bdi_cap_stable_pages_required(ns->queue->backing_dev_info)) {
+			struct backing_dev_info *info =
+				ns->head->disk->queue->backing_dev_info;
+
+                        info->capabilites |= BDI_CAP_STABLE_WRITES;
+		}
+
 		revalidate_disk(ns->head->disk);
 	}
 #endif
Signature · 7 lines
2.20.1


_______________________________________________
linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme