[Devel] [PATCH RHEL8 COMMIT] push-backup: Cleanup

Konstantin Khorenko khorenko at virtuozzo.com
Wed Jul 7 12:00:25 MSK 2021


The commit is pushed to "branch-rh8-4.18.0-240.1.1.vz8.5.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-240.1.1.vz8.5.52
------>
commit fe2bdfbdb7189ff91da93113f66a81c3fe72c218
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Wed Jul 7 12:00:24 2021 +0300

    push-backup: Cleanup
    
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 drivers/md/dm-push-backup.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/md/dm-push-backup.c b/drivers/md/dm-push-backup.c
index 88b17aaee474..8faf2228b624 100644
--- a/drivers/md/dm-push-backup.c
+++ b/drivers/md/dm-push-backup.c
@@ -28,7 +28,7 @@ struct pb_bio {
 struct push_backup {
 	struct dm_target *ti;
 	struct dm_dev *origin_dev;
-	u64 cluster_size;
+	u64 clu_size;
 	u64 nr_clus;
 
 	u8 uuid[33];
@@ -74,8 +74,8 @@ static int pb_bio_cluster(struct push_backup *pb, struct bio *bio, u64 *clu)
 	loff_t off = to_bytes(bio->bi_iter.bi_sector);
 	u64 start_clu, end_clu;
 
-	start_clu = off / pb->cluster_size;
-	end_clu = (off + bio->bi_iter.bi_size - 1) / pb->cluster_size;
+	start_clu = off / pb->clu_size;
+	end_clu = (off + bio->bi_iter.bi_size - 1) / pb->clu_size;
 
 	if (unlikely(start_clu != end_clu))
 		return -EIO;
@@ -647,7 +647,7 @@ static int pb_ctr(struct dm_target *ti, unsigned int argc, char **argv)
 		ti->error = "could not parse cluster size";
 		goto err;
 	}
-	pb->cluster_size = to_bytes(sectors);
+	pb->clu_size = to_bytes(sectors);
 	pb->nr_clus = DIV_ROUND_UP(ti->len, sectors);
 	/*
 	 * TODO: we may avoid splitting bio by cluster size.
@@ -722,7 +722,7 @@ static void pb_status(struct dm_target *ti, status_type_t type,
 		status = "active";
 	else if (pb->ppb_map)
 		status = "expired";
-	DMEMIT("%s %llu %llu %s", pb->origin_dev->name, to_sector(pb->cluster_size),
+	DMEMIT("%s %llu %llu %s", pb->origin_dev->name, to_sector(pb->clu_size),
 				  pb->timeout_in_jiffies / HZ, status);
 	spin_unlock_irq(&pb->lock);
 }


More information about the Devel mailing list