[Devel] [PATCH RHEL7 COMMIT] ploop: Refactoring in ploop1_open()

Vasily Averin vvs at virtuozzo.com
Fri Aug 28 07:38:00 MSK 2020


The commit is pushed to "branch-rh7-3.10.0-1127.18.2.vz7.163.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1127.18.2.vz7.163.13
------>
commit c47bfbf418f5191f9f2271c64dce61b9af504bec
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Fri Aug 28 07:38:00 2020 +0300

    ploop: Refactoring in ploop1_open()
    
    This is not refactoring for external modules only,
    if there is one.
    
    https://jira.sw.ru/browse/PSBM-105347
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 drivers/block/ploop/fmt_ploop1.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/block/ploop/fmt_ploop1.c b/drivers/block/ploop/fmt_ploop1.c
index 0036e09..29c3166 100644
--- a/drivers/block/ploop/fmt_ploop1.c
+++ b/drivers/block/ploop/fmt_ploop1.c
@@ -334,8 +334,8 @@ ploop1_open(struct ploop_delta * delta)
 		delta->flags |= PLOOP_FMT_PREALLOCATED;
 
 	/* FIXME: is there a better place for this? */
-	if (delta->io.ops->id != PLOOP_IO_DIRECT &&
-	    delta->io.files.inode->i_sb->s_magic != EXT4_SUPER_MAGIC)
+	if (delta->io.ops->id == PLOOP_IO_KAIO &&
+	    delta->io.files.inode->i_sb->s_magic == FUSE_SUPER_MAGIC)
 		set_bit(PLOOP_S_NO_FALLOC_DISCARD, &delta->plo->state);
 
 	return 0;


More information about the Devel mailing list