[Devel] [PATCH RHEL7 COMMIT] fs/fuse kio_pcs: add WARN_ON in fuse_size_grow_work() to investigate #PSBM-85945

Konstantin Khorenko khorenko at virtuozzo.com
Wed Jun 27 18:54:10 MSK 2018


The commit is pushed to "branch-rh7-3.10.0-862.3.2.vz7.61.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-862.3.2.vz7.61.5
------>
commit 3a13a493f5f87a4e82d52ecc910237c4a1019031
Author: Pavel Butsykin <pbutsykin at virtuozzo.com>
Date:   Wed Jun 27 18:54:10 2018 +0300

    fs/fuse kio_pcs: add WARN_ON in fuse_size_grow_work() to investigate #PSBM-85945
    
    Debug patch for https://jira.sw.ru/browse/PSBM-85945
    
    Signed-off-by: Pavel Butsykin <pbutsykin at virtuozzo.com>
    Reviewed-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 fs/fuse/kio/pcs/pcs_fuse_kdirect.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c b/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
index 6bc68e718d07..2f300d39d5b2 100644
--- a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
+++ b/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
@@ -678,9 +678,18 @@ static void fuse_size_grow_work(struct work_struct *w)
 			size = r->exec.size.required;
 	}
 	di->size.required = size;
+	if (di->fileinfo.attr.size > size) {
+		pr_info("attr.size: %llu, grow_size: %llu, grow_queue: %d\n",
+			di->fileinfo.attr.size, size, list_empty(&di->size.grow_queue));
+		spin_unlock(&di->lock);
+		WARN_ON(1);
+		err = PCS_ERR_IO;
+		goto fail;
+	}
 	spin_unlock(&di->lock);
 
 	err = submit_size_grow(inode, size);
+fail:
 	if (err) {
 		LIST_HEAD(to_fail);
 


More information about the Devel mailing list