[PATCH v3 09/31] dm: blk: Add a function to return the device type