[Devel] [PATCH RHEL7 COMMIT] fs/fuse kio_pcs: bugs in integrity protocol for fallocate

Konstantin Khorenko khorenko at virtuozzo.com
Mon Jul 9 17:29:37 MSK 2018


The commit is pushed to "branch-rh7-3.10.0-862.6.3.vz7.62.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-862.6.3.vz7.62.1
------>
commit a0f61f72a61aff6b24c40b99040eb0f5c867df4a
Author: Pavel Butsykin <pbutsykin at virtuozzo.com>
Date:   Mon Jul 9 17:29:37 2018 +0300

    fs/fuse kio_pcs: bugs in integrity protocol for fallocate
    
    Without this patch files will not not be marked dirty after PUNCH_HOLE
    and ZERO_RANGE. So, fsync will be skipped, holes will not be committed
    even after fsync.
    
    (Backport from user-space 949e4b5f).
    
    Affects: https://jira.sw.ru/browse/PSBM-68465
    
    Signed-off-by: Alexey Kuznetsov <kuznet at virtuozzo.com>
    Signed-off-by: Pavel Butsykin <pbutsykin at virtuozzo.com>
---
 fs/fuse/kio/pcs/pcs_map.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/fuse/kio/pcs/pcs_map.c b/fs/fuse/kio/pcs/pcs_map.c
index 0416f5689983..c61d68152003 100644
--- a/fs/fuse/kio/pcs/pcs_map.c
+++ b/fs/fuse/kio/pcs/pcs_map.c
@@ -2560,7 +2560,8 @@ static int commit_cs_record(struct pcs_map_entry * m, struct pcs_cs_record * rec
 
 	BUG_ON(srec->dirty_integrity && srec->dirty_integrity != sync->integrity_seq);
 
-	dirtify = (op_type == PCS_CS_WRITE_SYNC_RESP || op_type == PCS_CS_WRITE_RESP);
+	dirtify = (op_type == PCS_CS_WRITE_SYNC_RESP || op_type == PCS_CS_WRITE_RESP ||
+		   op_type == PCS_CS_WRITE_HOLE_RESP || op_type == PCS_CS_WRITE_ZERO_RESP);
 	/* The following looks scary, could be more clear.
 	 * The goal is to update sync seq numbers:
 	 *


More information about the Devel mailing list