nvme: inherit stable pages constraint in the mpath stack device
Subsystems (2)
Sagi Grimberg
maintainerPATCH v2 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.
---
This time it even compiles :)
drivers/nvme/host/core.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/nvme/host/core.c +7 -0
@@ -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->capabilities |=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
Christoph Hellwig
maintainerQuoted 3 lines · Sagi Grimberg
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.
target?? Seems like this propagates it to the multipath node.
_______________________________________________
linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme
Sagi Grimberg
maintainerQuoted 6 lines
Quoted 4 lines
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.
target?? Seems like this propagates it to the multipath node.
typo..
_______________________________________________
linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme
Christoph Hellwig
maintainerdrivers/nvme/host/core.c static void __nvme_revalidate_disk(struct gendisk *disk, struct nvme_id_ns *id) · line 1915
Quoted 10 lines · Sagi Grimberg
drivers/nvme/host/core.c +6
-0@@ -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->capabilities |=BDI_CAP_STABLE_WRITES ; + }
I think this needs to go into blk_queue_stack_limits instead, otherwise we have the same problem with other stacking drivers.
_______________________________________________
linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme
Sagi Grimberg
maintainerQuoted 14 lines
drivers/nvme/host/core.c static void __nvme_revalidate_disk(struct gendisk *disk, struct nvme_id_ns *id) · line 1915
Quoted 11 lines
drivers/nvme/host/core.c +6
-0@@ -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->capabilities |=BDI_CAP_STABLE_WRITES ; + }I think this needs to go into
blk_queue_stack_limitsinstead, otherwise we have the same problem with other stacking drivers.
I thought about this, but the stack_limits has different variants (blk_stack_limits, bdev_stack_limits) but only the first takes a request_queue...
I see that dm-table does roughly the same thing, drbd ignores it. In general, dm is doing a whole bunch of stacking limits/capabilities related stuff that are not involved in blk_stack_limits...
I could theoretically add a flag to queue_limits to mirror this, is that what you are suggesting?
Christoph Hellwig
maintainerQuoted 7 lines · Sagi Grimberg
Quoted 2 lines
I think this needs to go into
blk_queue_stack_limitsinstead, otherwise we have the same problem with other stacking drivers.I thought about this, but the
stack_limitshas different variants (blk_stack_limits,bdev_stack_limits) but only the first takes arequest_queue...
Quoted 6 lines
I see that dm-table does roughly the same thing, drbd ignores it. In general, dm is doing a whole bunch of stacking limits/capabilities related stuff that are not involved in
blk_stack_limits...I could theoretically add a flag to
queue_limitsto mirror this, is that what you are suggesting?
I guess we'll just go with your v4 patch for now and I'll see if I can refactor this mess later..