This is the order of the largest possible permission. Signed-off-by: Fam Zheng <[email protected]> --- include/block/block.h | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/include/block/block.h b/include/block/block.h
index eb0565d..a798f10 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -224,6 +224,8 @@ enum {
BLK_PERM_ALL = 0x1f,
};
+#define BLK_PERM_MAX (64 - clz64((uint64_t)BLK_PERM_ALL))
+
char *bdrv_perm_names(uint64_t perm);
/* disk I/O throttling */
--
2.9.3
