diff options
author | Pankaj Gupta <pagupta@redhat.com> | 2019-07-05 17:03:22 +0300 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2019-07-06 01:19:10 +0300 |
commit | c5d4355d10d414a96ca870b731756b89d068d57a (patch) | |
tree | 9796dcbf336da17f018db742bd0f7e33ada85b2c /drivers/nvdimm/nd.h | |
parent | db5d00c93edc0afba1027e51ff3b38dc0e5f7728 (diff) | |
download | linux-c5d4355d10d414a96ca870b731756b89d068d57a.tar.xz |
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.h | 1 |
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]; }; |