{0, 2, "Invalid number of cache feature arguments"},
        };
 
-       int r;
+       int r, mode_ctr = 0;
        unsigned argc;
        const char *arg;
        struct cache_features *cf = &ca->features;
        while (argc--) {
                arg = dm_shift_arg(as);
 
-               if (!strcasecmp(arg, "writeback"))
+               if (!strcasecmp(arg, "writeback")) {
                        cf->io_mode = CM_IO_WRITEBACK;
+                       mode_ctr++;
+               }
 
-               else if (!strcasecmp(arg, "writethrough"))
+               else if (!strcasecmp(arg, "writethrough")) {
                        cf->io_mode = CM_IO_WRITETHROUGH;
+                       mode_ctr++;
+               }
 
-               else if (!strcasecmp(arg, "passthrough"))
+               else if (!strcasecmp(arg, "passthrough")) {
                        cf->io_mode = CM_IO_PASSTHROUGH;
+                       mode_ctr++;
+               }
 
                else if (!strcasecmp(arg, "metadata2"))
                        cf->metadata_version = 2;
                }
        }
 
+       if (mode_ctr > 1) {
+               *error = "Duplicate cache io_mode features requested";
+               return -EINVAL;
+       }
+
        return 0;
 }