[Devel] [PATCH RHEL8 COMMIT] cbt: Rename misc commands names

Konstantin Khorenko khorenko at virtuozzo.com
Fri Oct 25 19:15:18 MSK 2019


The commit is pushed to "branch-rh8-4.18.0-80.1.2.vz8.2.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-80.1.2.vz8.2.3
------>
commit 2d20eea24560488c37f2e65987c47413dce6b339
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Fri Oct 25 19:15:17 2019 +0300

    cbt: Rename misc commands names
    
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 block/blk-cbt.c         | 20 ++++++++++----------
 include/uapi/linux/fs.h |  6 +++---
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/block/blk-cbt.c b/block/blk-cbt.c
index f5205a8b7387..093c029d169f 100644
--- a/block/blk-cbt.c
+++ b/block/blk-cbt.c
@@ -327,8 +327,8 @@ static int copy_cbt_to_user(struct page **map, unsigned long npages, void *user_
         return 0;
 }
 
-static int blk_cbt_snp_create(struct request_queue *q, __u8 *uuid,
-			      struct blk_user_cbt_snp_create __user *arg)
+static int blk_cbt_snap_create(struct request_queue *q, __u8 *uuid,
+			       struct blk_user_cbt_snp_create __user *arg)
 {
 	struct cbt_info *cbt;
 	struct page **map;
@@ -407,7 +407,7 @@ static int blk_cbt_snp_create(struct request_queue *q, __u8 *uuid,
 	return -ENOMEM;
 }
 
-static int blk_cbt_snp_drop(struct request_queue *q, __u8 *uuid)
+static int blk_cbt_snap_drop(struct request_queue *q, __u8 *uuid)
 {
 	struct cbt_info *cbt;
 	unsigned long npages;
@@ -456,7 +456,7 @@ static void blk_cbt_page_merge(struct page *pg_from, struct page *pg_to)
 	}
 }
 
-static int blk_cbt_snp_merge_back(struct request_queue *q, __u8 *uuid)
+static int blk_cbt_snap_merge_back(struct request_queue *q, __u8 *uuid)
 {
 	struct cbt_info *cbt;
 	blkcnt_t block_max;
@@ -931,12 +931,12 @@ static int cbt_ioc_misc(struct block_device *bdev, void __user *arg)
 		return -EFAULT;
 
 	switch (cmi.action) {
-	case CMI_SNP_CREATE:
-		return blk_cbt_snp_create(q, cmi.uuid, arg);
-	case CMI_SNP_DROP:
-		return blk_cbt_snp_drop(q, cmi.uuid);
-	case CMI_SNP_MERGE_BACK:
-		return blk_cbt_snp_merge_back(q, cmi.uuid);
+	case CBT_SNAP_CREATE:
+		return blk_cbt_snap_create(q, cmi.uuid, arg);
+	case CBT_SNAP_DROP:
+		return blk_cbt_snap_drop(q, cmi.uuid);
+	case CBT_SNAP_MERGE_BACK:
+		return blk_cbt_snap_merge_back(q, cmi.uuid);
 	default:
 		return -ENOTSUPP;
 	}
diff --git a/include/uapi/linux/fs.h b/include/uapi/linux/fs.h
index f30b87dc0c31..afa59636e244 100644
--- a/include/uapi/linux/fs.h
+++ b/include/uapi/linux/fs.h
@@ -263,11 +263,11 @@ enum CI_FLAGS
 struct blk_user_cbt_misc_info {
 	__u8 uuid[16]; /* Bitmap UUID */
 /* Allocate and move pending map to CBT snapshot */
-#define CMI_SNP_CREATE		0
+#define CBT_SNAP_CREATE		0
 /* Drop CBT snapshot */
-#define CMI_SNP_DROP		1
+#define CBT_SNAP_DROP		1
 /* Merge CBT snapshot bits back and drop CBT snapshot */
-#define CMI_SNP_MERGE_BACK	2
+#define CBT_SNAP_MERGE_BACK	2
 	__u64 action;
 	__u8 data[0];
 };



More information about the Devel mailing list