]> www.infradead.org Git - users/jedix/linux-maple.git/commit
dm cache: only allow a single io_mode cache feature to be requested
authorJohn Pittman <jpittman@redhat.com>
Thu, 21 Jun 2018 21:35:33 +0000 (17:35 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Sep 2018 20:43:43 +0000 (22:43 +0200)
commite85940a5bb5fe04dc5b241dd6f6ba7ce43ab13d9
tree688e169a4429f6768a88a105ffaae091f3f06501
parent94f885db2a18b9c6d36b31f1f4af7c1c820fac60
dm cache: only allow a single io_mode cache feature to be requested

[ Upstream commit af9313c32c0fa2a0ac3b113669273833d60cc9de ]

More than one io_mode feature can be requested when creating a dm cache
device (as is: last one wins).  The io_mode selections are incompatible
with one another, we should force them to be selected exclusively.  Add
a counter to check for more than one io_mode selection.

Fixes: 629d0a8a1a10 ("dm cache metadata: add "metadata2" feature")
Signed-off-by: John Pittman <jpittman@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-cache-target.c