Support new DM_GET_TARGET_VERSION ioctl.

This way we can load kernel device-mapper target module before
table create ioctl.

Target version is available since kernel 5.4.
This commit is contained in:
Milan Broz
2019-10-08 13:48:50 +02:00
parent 21edd66892
commit 15f5126296
3 changed files with 41 additions and 0 deletions

View File

@@ -63,6 +63,7 @@ static inline uint32_t act2dmflags(uint32_t act_flags)
#define DM_DEFERRED_SUPPORTED (1 << 15) /* deferred removal of device */
#define DM_INTEGRITY_RECALC_SUPPORTED (1 << 16) /* dm-integrity automatic recalculation supported */
#define DM_INTEGRITY_BITMAP_SUPPORTED (1 << 17) /* dm-integrity bitmap mode supported */
#define DM_GET_TARGET_VERSION_SUPPORTED (1 << 18) /* dm DM_GET_TARGET version ioctl supported */
typedef enum { DM_CRYPT = 0, DM_VERITY, DM_INTEGRITY, DM_LINEAR, DM_ERROR, DM_UNKNOWN } dm_target_type;
enum tdirection { TARGET_SET = 1, TARGET_QUERY };