[Devel] [PATCH RHEL8 COMMIT] ploop: Kill dead check in ploop_attach_end_action()
Konstantin Khorenko
khorenko at virtuozzo.com
Tue Jun 29 16:08:18 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.50
------>
commit 54e366c0ba9d9631a2642367e2f601404f421d86
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date: Tue Jun 29 16:08:18 2021 +0300
ploop: Kill dead check in ploop_attach_end_action()
It's never true
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
==========================
Preparation for #PSBM-124550 (part 2)
Kirill Tkhai (14):
ploop: Kill "get_delta_name" alias
ploop: Use initial pio for COW
ploop: Rename cluster_pio into aux_pio
ploop: Shorten variable names
ploop: Rename in submit_cluster_write()
ploop: Use defer_pios() instead of manual code
ploop: Use array of pios instead of separate lists
ploop: Generalize dispatch_pios usage
ploop: Unify process_delta_wb()
ploop: Remove unused struct member
ploop: Rename page_nr
ploop: Return md page from ploop_bat_entries()
ploop: Kill dead check in ploop_attach_end_action()
ploop: Delay bio if md page is BUSY
---
drivers/md/dm-ploop-map.c | 19 ++++---------------
1 file changed, 4 insertions(+), 15 deletions(-)
diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index 72aec0573ca3..ab23e10ead6b 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -988,16 +988,12 @@ static bool ploop_data_pio_end(struct pio *pio)
return completed;
}
-static bool ploop_attach_end_action(struct pio *pio, struct ploop_index_wb *piwb)
+static void ploop_attach_end_action(struct pio *pio, struct ploop_index_wb *piwb)
{
- /* Currently this can't fail. */
- if (!atomic_inc_not_zero(&piwb->count))
- return false;
-
pio->is_data_alloc = true;
pio->piwb = piwb;
- return true;
+ atomic_inc(&piwb->count);
}
static void ploop_queue_resubmit(struct pio *pio)
@@ -1347,15 +1343,8 @@ static bool locate_new_cluster_and_attach_pio(struct ploop *ploop,
goto error;
}
- attached = ploop_attach_end_action(pio, piwb);
- if (!attached) {
- /*
- * Could not prepare data pio to be submitted before index wb
- * batch? Delay submitting. Good thing, that clu allocation
- * has already made, and it goes in the batch.
- */
- dispatch_pios(ploop, pio, NULL);
- }
+ ploop_attach_end_action(pio, piwb);
+ attached = true;
out:
return attached;
error:
More information about the Devel
mailing list