Skip to content

Commit 74e4d20

Browse files
sagigrimbergChristoph Hellwig
authored andcommitted
nvme: inherit stable pages constraint in the mpath stack device
If the backing device require stable pages, we need to set it on the stack mpath device as well. This applies to rdma/fc transports when doing data integrity and tcp transport calculating digests. Signed-off-by: Sagi Grimberg <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
1 parent 39d0607 commit 74e4d20

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/nvme/host/core.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1897,6 +1897,13 @@ static void __nvme_revalidate_disk(struct gendisk *disk, struct nvme_id_ns *id)
18971897
if (ns->head->disk) {
18981898
nvme_update_disk_info(ns->head->disk, ns, id);
18991899
blk_queue_stack_limits(ns->head->disk->queue, ns->queue);
1900+
if (bdi_cap_stable_pages_required(ns->queue->backing_dev_info)) {
1901+
struct backing_dev_info *info =
1902+
ns->head->disk->queue->backing_dev_info;
1903+
1904+
info->capabilities |= BDI_CAP_STABLE_WRITES;
1905+
}
1906+
19001907
revalidate_disk(ns->head->disk);
19011908
}
19021909
#endif

0 commit comments

Comments
 (0)