[PATCH v4 10/33] dm: blk: Add a function to return the device type