diff options
author | Vaibhav Jain <vaibhav@linux.ibm.com> | 2021-04-02 14:55:55 +0530 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2021-04-09 21:56:01 -0700 |
commit | a2948b17f6b936fc52f86c0f92c46d2f91928b79 (patch) | |
tree | a3155898cd4806290ceb1fd9b2609003c0d6399f /lib/test_siphash.c | |
parent | 2361db89aaadfb671db6911b0063e01ec8922c28 (diff) |
libnvdimm/region: Fix nvdimm_has_flush() to handle ND_REGION_ASYNC
In case a platform doesn't provide explicit flush-hints but provides an
explicit flush callback via ND_REGION_ASYNC region flag, then
nvdimm_has_flush() still returns '0' indicating that writes do not
require flushing. This happens on PPC64 with patch at [1] applied, where
'deep_flush' of a region was denied even though an explicit flush
function was provided.
Fix this by adding a condition to nvdimm_has_flush() to test for the
ND_REGION_ASYNC flag on the region and see if a 'region->flush' callback
is assigned.
Link: http://lore.kernel.org/r/161703936121.36.7260632399582101498.stgit@e1fbed493c87 [1]
Fixes: c5d4355d10d4 ("libnvdimm: nd_region flush callback support")
Reported-by: Shivaprasad G Bhat <sbhat@linux.ibm.com>
Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com>
Link: https://lore.kernel.org/r/20210402092555.208590-1-vaibhav@linux.ibm.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'lib/test_siphash.c')
0 files changed, 0 insertions, 0 deletions