]> git.baikalelectronics.ru Git - kernel.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)
committerMike Snitzer <snitzer@redhat.com>
Fri, 27 Jul 2018 19:24:18 +0000 (15:24 -0400)
commit4c6f6d5ee2f945ce449b61988bda3b3cada9cf59
tree4adfc242b5c53974fe4b6a07fa50eaab1a89da03
parentd60241a56a8ab881b57c5cf32a9991f8fdddcef7
dm cache: only allow a single io_mode cache feature to be requested

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: 83c72fe5982b ("dm cache metadata: add "metadata2" feature")
Signed-off-by: John Pittman <jpittman@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-cache-target.c