This is ABI change, old userspace may come with old small structure and we would not be able to handle it correctly. Also new userspace running on old kernel is also a possible problem.

Normally this can be handled by structure size checking or version checking which we don't have.

On 1/20/25 16:34, Andrey Zhadchenko wrote:
diff --git a/include/uapi/linux/fs.h b/include/uapi/linux/fs.h
index a5c8a57d8f29..47efa7ef05a0 100644
--- a/include/uapi/linux/fs.h
+++ b/include/uapi/linux/fs.h
@@ -128,8 +128,10 @@ struct blk_user_cbt_extent {
        __u64 ce_reserved64[1];
  };
+
+#define CBT_NAME_LENGTH 128
  struct blk_user_cbt_info {
-       __u8  ci_uuid[16];      /* Bitmap UUID */
+       __u8  ci_name[CBT_NAME_LENGTH]; /* CBT name */
        __u64 ci_start;         /* start phisical range of mapping which
                                   userspace wants (in) */
        __u64 ci_length;        /* phisical length of mapping which
@@ -145,12 +147,12 @@ struct blk_user_cbt_info {
  enum CI_FLAGS
  {
        CI_FLAG_ONCE = 1, /* BLKCBTGET will clear bits */
-       CI_FLAG_NEW_UUID = 2 /* BLKCBTSET update uuid */
+       CI_FLAG_NEW_NAME = 2 /* BLKCBTSET update name */
  };
/* Extension of cbt ioctls: */
  struct blk_user_cbt_misc_info {
-       __u8 uuid[16]; /* Bitmap UUID */
+       __u8 name[CBT_NAME_LENGTH]; /* Bitmap name */
  /* Allocate and move pending map to CBT snapshot */
  #define CBT_SNAP_CREATE               0
  /* Drop CBT snapshot */

--
Best regards, Tikhomirov Pavel
Senior Software Developer, Virtuozzo.

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to