[Devel] [PATCH RHEL8 COMMIT] ploop: Kill dead check

Konstantin Khorenko khorenko at virtuozzo.com
Fri Jul 2 22:51:54 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.51
------>
commit 0d78069338e367dbe3281472bb7dfd12a06c91a8
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Fri Jul 2 22:51:54 2021 +0300

    ploop: Kill dead check
    
    Now we iter till size_in_clus - 1, so this check is impossible.
    
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
    
    ==========================
    ploop: Stop using kvec
    
    We can't read using kvec from file open with O_DIRECT.
    This makes ploop to stop use it.
    
    Kirill Tkhai (8):
          ploop: Read metadata page-aligned
          ploop: RAW image does not have header
          ploop: Introduce ploop_init_be_iter()
          ploop: Introduce rb_root_for_each_md_page()
          ploop: Introduce md helpers
          ploop: Stop using kvec
          ploop: Kill dead check
          ploop: Shorten delta_bat_entries
---
 drivers/md/dm-ploop-bat.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/md/dm-ploop-bat.c b/drivers/md/dm-ploop-bat.c
index 036edc317de3..17c2fe46ed57 100644
--- a/drivers/md/dm-ploop-bat.c
+++ b/drivers/md/dm-ploop-bat.c
@@ -491,11 +491,9 @@ static void apply_delta_mappings(struct ploop *ploop, struct ploop_delta *deltas
 
 			if (!is_raw)
 				dst_clu = delta_bat_entries[i];
-			else {
+			else
 				dst_clu = clu;
-				if (dst_clu >= size_in_clus)
-					dst_clu = BAT_ENTRY_NONE;
-			}
+
 			if (dst_clu == BAT_ENTRY_NONE)
 				continue;
 			md->bat_levels[i] = level;


More information about the Devel mailing list