[Devel] [RFC PATCH vz9 v4 29/33] dm-ploop: do not use a wrapper for set_bit to make a page writeback

Alexander Atanasov alexander.atanasov at virtuozzo.com
Mon Nov 4 13:59:24 MSK 2024


unify how MD_WRITEBACK bit is set across the code -
one of the files is using a wrapper the rest of the code
directly sets the bit. To avoid confusion remove the wrapper.

https://virtuozzo.atlassian.net/browse/VSTOR-91817
Signed-off-by: Alexander Atanasov <alexander.atanasov at virtuozzo.com>
---
 drivers/md/dm-ploop-cmd.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/md/dm-ploop-cmd.c b/drivers/md/dm-ploop-cmd.c
index ac477be0d2eb..b1ab296d91f8 100644
--- a/drivers/md/dm-ploop-cmd.c
+++ b/drivers/md/dm-ploop-cmd.c
@@ -278,11 +278,6 @@ static int ploop_write_zero_cluster_sync(struct ploop *ploop,
 	return ploop_write_cluster_sync(ploop, pio, clu);
 }
 
-static void ploop_make_md_wb(struct ploop *ploop, struct md_page *md)
-{
-	set_bit(MD_WRITEBACK, &md->status);
-}
-
 static int ploop_grow_relocate_cluster(struct ploop *ploop,
 				       struct ploop_cmd *cmd)
 {
@@ -333,7 +328,7 @@ static int ploop_grow_relocate_cluster(struct ploop *ploop,
 		goto out;
 	}
 
-	ploop_make_md_wb(ploop, md);
+	set_bit(MD_WRITEBACK, &md->status);
 	init_completion(&comp);
 	piwb->comp = &comp;
 	piwb->comp_bi_status = &bi_status;
@@ -397,7 +392,7 @@ static int ploop_grow_update_header(struct ploop *ploop,
 	sectors = hdr->m_SizeInSectors_v2 = cpu_to_le64(cmd->resize.new_sectors);
 	offset = hdr->m_FirstBlockOffset = cpu_to_le32(first_block_off);
 
-	ploop_make_md_wb(ploop, md);
+	set_bit(MD_WRITEBACK, &md->status);
 	init_completion(&comp);
 	piwb->comp = &comp;
 	piwb->comp_bi_status = &bi_status;
-- 
2.43.0



More information about the Devel mailing list