[Devel] [PATCH vz9 v1 26/63] dm-ploop: do not use a wrapper for set_bit to make a page writeback
Alexander Atanasov
alexander.atanasov at virtuozzo.com
Fri Jan 24 18:36:00 MSK 2025
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.
Remove the lock and rely on atmoic bitops to make a further
lock reorganization easier.
https://virtuozzo.atlassian.net/browse/VSTOR-91817
Signed-off-by: Alexander Atanasov <alexander.atanasov at virtuozzo.com>
---
drivers/md/dm-ploop-cmd.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/drivers/md/dm-ploop-cmd.c b/drivers/md/dm-ploop-cmd.c
index 649e9de029bf..26dc1ff04e8e 100644
--- a/drivers/md/dm-ploop-cmd.c
+++ b/drivers/md/dm-ploop-cmd.c
@@ -278,13 +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)
-{
- write_lock_irq(&ploop->bat_rwlock);
- set_bit(MD_WRITEBACK, &md->status);
- write_unlock_irq(&ploop->bat_rwlock);
-}
-
static int ploop_grow_relocate_cluster(struct ploop *ploop,
struct ploop_cmd *cmd)
{
@@ -335,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 = ∁
piwb->comp_bi_status = &bi_status;
@@ -400,7 +393,7 @@ static int ploop_grow_update_header(struct ploop *ploop,
offset = hdr->m_FirstBlockOffset = cpu_to_le32(first_block_off);
kunmap_local(hdr);
- ploop_make_md_wb(ploop, md);
+ set_bit(MD_WRITEBACK, &md->status);
init_completion(&comp);
piwb->comp = ∁
piwb->comp_bi_status = &bi_status;
--
2.43.0
More information about the Devel
mailing list