[RHEL8,COMMIT] ploop: Check for disk-in-use signature

Submitted by Konstantin Khorenko on Dec. 10, 2019, 2:53 p.m.

Details

Message ID 201912101453.xBAEr5NN023480@finist_co8.work.ct
State New
Series "ploop: Check for disk-in-use signature"
Headers show

Commit Message

Konstantin Khorenko Dec. 10, 2019, 2:53 p.m.
The commit is pushed to "branch-rh8-4.18.0-80.1.2.vz8.2.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-80.1.2.vz8.2.6
------>
commit a865d6ab67eafb69ad2c9cbc76d6ab1aee9a8c3d
Author: Kirill Tkhai <ktkhai@virtuozzo.com>
Date:   Tue Dec 10 17:53:04 2019 +0300

    ploop: Check for disk-in-use signature
    
    After Igor implemented PSBM-98203, we may uncomment this check.
    
    Fixes: 4219d4d4b004 ("dm: Interpreter of ploop1 format (ploop driver)")
    
    https://jira.sw.ru/browse/PSBM-98203
    Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 drivers/md/dm-ploop-bat.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/md/dm-ploop-bat.c b/drivers/md/dm-ploop-bat.c
index 82b889ea1b0e..a4358e37982f 100644
--- a/drivers/md/dm-ploop-bat.c
+++ b/drivers/md/dm-ploop-bat.c
@@ -137,11 +137,9 @@  int ploop_read_metadata(struct dm_target *ti, struct ploop *ploop)
 		goto out;
 
 	ret = -ENOLCK;
-#if 0	/* Wait till Igor is implemented PSBM-98203 */
 	if (m_hdr->m_DiskInUse != cpu_to_le32(SIGNATURE_DISK_IN_USE) &&
-	    ploop_is_ro(ploop))
+	    !ploop_is_ro(ploop))
 		goto out;
-#endif
 
 	ret = -EINVAL;
 	if (le32_to_cpu(m_hdr->m_Sectors) != 1 << cluster_log)