summaryrefslogtreecommitdiffstats
path: root/drivers/nvdimm/nd.h
diff options
context:
space:
mode:
authorPankaj Gupta2019-07-05 16:03:22 +0200
committerDan Williams2019-07-06 00:19:10 +0200
commitc5d4355d10d414a96ca870b731756b89d068d57a (patch)
tree9796dcbf336da17f018db742bd0f7e33ada85b2c /drivers/nvdimm/nd.h
parentlibnvdimm, namespace: Drop uuid_t implementation detail (diff)
downloadkernel-qcow2-linux-c5d4355d10d414a96ca870b731756b89d068d57a.tar.gz
kernel-qcow2-linux-c5d4355d10d414a96ca870b731756b89d068d57a.tar.xz
kernel-qcow2-linux-c5d4355d10d414a96ca870b731756b89d068d57a.zip
libnvdimm: nd_region flush callback support
This patch adds functionality to perform flush from guest to host over VIRTIO. We are registering a callback based on 'nd_region' type. virtio_pmem driver requires this special flush function. For rest of the region types we are registering existing flush function. Report error returned by host fsync failure to userspace. Signed-off-by: Pankaj Gupta <pagupta@redhat.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/nvdimm/nd.h')
-rw-r--r--drivers/nvdimm/nd.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nvdimm/nd.h b/drivers/nvdimm/nd.h
index d24304c0e6d7..1b9955651379 100644
--- a/drivers/nvdimm/nd.h
+++ b/drivers/nvdimm/nd.h
@@ -155,6 +155,7 @@ struct nd_region {
struct badblocks bb;
struct nd_interleave_set *nd_set;
struct nd_percpu_lane __percpu *lane;
+ int (*flush)(struct nd_region *nd_region, struct bio *bio);
struct nd_mapping mapping[0];
};