diff options
author | Sagi Grimberg <sagi@grimberg.me> | 2020-04-01 22:44:43 -0700 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2020-04-02 10:51:46 +0200 |
commit | 74e4d20e2f43cf09a35543d960ac8f7a1ffcbbb5 (patch) | |
tree | 3d7d23e4ea273befd1ac2a4a0323688be660de0e /drivers | |
parent | 39d06079a50fe2a651091b38e311e605de0788cb (diff) | |
download | linux-74e4d20e2f43cf09a35543d960ac8f7a1ffcbbb5.tar.gz linux-74e4d20e2f43cf09a35543d960ac8f7a1ffcbbb5.tar.bz2 linux-74e4d20e2f43cf09a35543d960ac8f7a1ffcbbb5.zip |
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 <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/nvme/host/core.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 2db8563aeb2d..91c1bd659947 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -1897,6 +1897,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 |