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.27
------>
commit 601fa248a691297c2bce038a2e2af48adf11afdd
Author: Kirill Tkhai <ktk...@virtuozzo.com>
Date:   Tue May 11 18:31:01 2021 +0300

    ploop: Make fields in dm_ploop_endio_hook separate
    
    Signed-off-by: Kirill Tkhai <ktk...@virtuozzo.com>
    
    =====================
    Patchset description:
    
    ploop: Preparation to kill-loop from dm-ploop (series 4)
    
    Currently, ploop requires underlining loop for top delta. This is overkill,
    since we may submit bios directly to fs, without using it.
    
    Initially there was a possibility, we may use device-mapper format snapshots
    instead of ploop-based. But we don't do that, so we have to use loop for top
    delta and directly submit bios to the rest of deltas. So, these two ways to 
do
    the same actions are wrong.
    
    This is preparations #3 for further series.
    Let's this goes to testing earlier.
    
    Kirill Tkhai (8):
          ploop: Fix prealloc_md_pages() defaults
          ploop: Move alloc wq up
          ploop: Pass nr_deltas to parse_bat_entries()
          ploop: Pass @ploop to md_page_cluster_is_in_top_delta()
          ploop: Kill "message snapshot" interface
          ploop: Introduce top_level()
          ploop: Do not try to track bios on resize
          ploop: Make fields in dm_ploop_endio_hook separate
    
    https://jira.sw.ru/browse/PSBM-123654
    
    Signed-off-by: Kirill Tkhai <ktk...@virtuozzo.com>
---
 drivers/md/dm-ploop-map.c | 6 ++----
 drivers/md/dm-ploop.h     | 8 ++++----
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index 4ad950afdda3..b643a4380fab 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -77,7 +77,7 @@ static void __ploop_init_end_io(struct ploop *ploop,
        h->action = PLOOP_END_IO_NONE;
        h->ref_index = PLOOP_REF_INDEX_INVALID;
        h->piwb = NULL;
-       memset(&h->list, 0, sizeof(h->list));
+       INIT_LIST_HEAD(&h->list);
        h->endio_bio_list = NULL;
        /* FIXME: assign real cluster? */
        h->cluster = UINT_MAX;
@@ -1499,9 +1499,7 @@ void unlink_postponed_backup_endio(struct ploop *ploop,
        unlink_endio_hook(ploop, &pb->rb_root, h, bio_list);
 
        /* Unlink from pb->pending */
-       list_del(&h->list);
-       /* Zero {list,piwb} union as it may be used later in further */
-       memset(&h->list, 0, sizeof(h->list));
+       list_del_init(&h->list);
 
        /* Queue relared bio itself */
        bio = dm_bio_from_per_bio_data(h, sizeof(*h));
diff --git a/drivers/md/dm-ploop.h b/drivers/md/dm-ploop.h
index 6644ef391791..93a902d66acf 100644
--- a/drivers/md/dm-ploop.h
+++ b/drivers/md/dm-ploop.h
@@ -229,10 +229,8 @@ struct ploop {
 };
 
 struct dm_ploop_endio_hook {
-       union {
-               struct ploop_index_wb *piwb;
-               struct list_head list;
-       };
+       struct list_head list;
+
        struct rb_node node;
        /* List of bios, which will be queued from this bio end */
        struct bio *endio_bio_list;
@@ -250,6 +248,8 @@ struct dm_ploop_endio_hook {
         */
 #define PLOOP_REF_INDEX_INVALID        2
        unsigned int ref_index:2;
+
+       struct ploop_index_wb *piwb;
 };
 
 struct ploop_iocb {
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to