[Devel] [PATCH RH8 4/8] ploop: Pass @ploop to md_page_cluster_is_in_top_delta()

Kirill Tkhai ktkhai at virtuozzo.com
Tue May 11 11:46:05 MSK 2021


Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 drivers/md/dm-ploop-cmd.c |    6 +++---
 drivers/md/dm-ploop.h     |    4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/md/dm-ploop-cmd.c b/drivers/md/dm-ploop-cmd.c
index f259ff5d7652..3961155cf4fd 100644
--- a/drivers/md/dm-ploop-cmd.c
+++ b/drivers/md/dm-ploop-cmd.c
@@ -46,7 +46,7 @@ static void ploop_advance_holes_bitmap(struct ploop *ploop,
 		init_bat_entries_iter(ploop, md->id, &i, &end);
 		bat_entries = kmap_atomic(md->page);
 		for (; i <= end; i++) {
-			if (!md_page_cluster_is_in_top_delta(md, i))
+			if (!md_page_cluster_is_in_top_delta(ploop, md, i))
 				continue;
 			dst_cluster = bat_entries[i];
 			/* This may happen after grow->shrink->(now) grow */
@@ -138,7 +138,7 @@ static unsigned int ploop_find_bat_entry(struct ploop *ploop,
 		for (; i <= end; i++) {
 			if (bat_entries[i] != dst_cluster)
 				continue;
-			if (md_page_cluster_is_in_top_delta(md, i)) {
+			if (md_page_cluster_is_in_top_delta(ploop, md, i)) {
 				cluster = page_clu_idx_to_bat_clu(md->id, i);
 				break;
 			}
@@ -728,7 +728,7 @@ static void process_notify_delta_merged(struct ploop *ploop,
 		init_bat_entries_iter(ploop, md->id, &i, &end);
 		bat_entries = kmap_atomic(md->page);
 		for (; i <= end; i++) {
-			if (md_page_cluster_is_in_top_delta(md, i) ||
+			if (md_page_cluster_is_in_top_delta(ploop, md, i) ||
 			    delta_bat_entries[i] == BAT_ENTRY_NONE ||
 			    md->bat_levels[i] < level)
 				continue;
diff --git a/drivers/md/dm-ploop.h b/drivers/md/dm-ploop.h
index 45db3ec67950..3a64522187a8 100644
--- a/drivers/md/dm-ploop.h
+++ b/drivers/md/dm-ploop.h
@@ -410,8 +410,8 @@ static inline bool cluster_is_in_top_delta(struct ploop *ploop,
 	return true;
 }
 
-static inline bool md_page_cluster_is_in_top_delta(struct md_page *md,
-						   unsigned int cluster)
+static inline bool md_page_cluster_is_in_top_delta(struct ploop *ploop,
+			      struct md_page *md, unsigned int cluster)
 {
 	unsigned int count, *bat_entries;
 	bool ret = true;




More information about the Devel mailing list