mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-13 14:14:37 +00:00
dm writecache: reject asynchronous pmem devices
commita466245803
upstream. DM writecache does not handle asynchronous pmem. Reject it when supplied as cache. Link: https://lore.kernel.org/linux-nvdimm/87lfk5hahc.fsf@linux.ibm.com/ Fixes:6e84200c0a
("virtio-pmem: Add virtio pmem driver") Signed-off-by: Michal Suchanek <msuchanek@suse.de> Acked-by: Mikulas Patocka <mpatocka@redhat.com> Cc: stable@vger.kernel.org # 5.3+ Signed-off-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
49a7ac29f6
commit
299ffecbd5
1 changed files with 6 additions and 0 deletions
|
@ -2104,6 +2104,12 @@ static int writecache_ctr(struct dm_target *ti, unsigned argc, char **argv)
|
|||
}
|
||||
|
||||
if (WC_MODE_PMEM(wc)) {
|
||||
if (!dax_synchronous(wc->ssd_dev->dax_dev)) {
|
||||
r = -EOPNOTSUPP;
|
||||
ti->error = "Asynchronous persistent memory not supported as pmem cache";
|
||||
goto bad;
|
||||
}
|
||||
|
||||
r = persistent_memory_claim(wc);
|
||||
if (r) {
|
||||
ti->error = "Unable to map persistent memory for cache";
|
||||
|
|
Loading…
Reference in a new issue