[Devel] [PATCH RHEL9 COMMIT] fs: fuse: kio: port new fatal errors from userspace

Konstantin Khorenko khorenko at virtuozzo.com
Wed Oct 30 20:39:32 MSK 2024


The commit is pushed to "branch-rh9-5.14.0-427.37.1.vz9.78.x-ovz" and will appear at git at bitbucket.org:openvz/vzkernel.git
after rh9-5.14.0-427.37.1.vz9.78.2
------>
commit defc69cb67924947d46f93e5c86f6ea2be5f5a8e
Author: Alexey Kuznetsov <kuznet at virtuozzo.com>
Date:   Wed Oct 30 03:43:26 2024 +0800

    fs: fuse: kio: port new fatal errors from userspace
    
    Otherwise we enter lockup instead of IO error.
    
    Signed-off-by: Alexey Kuznetsov <kuznet at virtuozzo.com>
    
    Feature: vStorage
---
 fs/fuse/kio/pcs/pcs_cluster.c | 11 +++++++----
 fs/fuse/kio/pcs/pcs_error.h   | 10 ++++++++--
 2 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/fs/fuse/kio/pcs/pcs_cluster.c b/fs/fuse/kio/pcs/pcs_cluster.c
index b0a5e140faf8..c64668a2a121 100644
--- a/fs/fuse/kio/pcs/pcs_cluster.c
+++ b/fs/fuse/kio/pcs/pcs_cluster.c
@@ -525,17 +525,20 @@ static void ireq_on_error_(struct pcs_int_request *ireq)
 		if (!ireq->dentry->cluster->cfg.fail_on_nospace)
 			break;
 		fallthrough;
+	case PCS_ERR_LEASE_REQUIRED:
+	case PCS_ERR_LEASE_EXPIRED:
+	case PCS_ERR_INTEGRITY_FAIL:
+	case PCS_ERR_LEASE_CONFLICT:
 	case PCS_ERR_INV_PARAMS:
 	case PCS_ERR_NOT_FOUND:
 	case PCS_ERR_NON_EMPTY_DIR:
 	case PCS_ERR_NOT_DIR:
 	case PCS_ERR_IS_DIR:
+	case PCS_ERR_NOT_ALLOWED:
 	case PCS_ERR_NO_STORAGE:
 	case PCS_ERR_UNAVAIL:
-	case PCS_ERR_LEASE_REQUIRED:
-	case PCS_ERR_LEASE_EXPIRED:
-	case PCS_ERR_INTEGRITY_FAIL:
-	case PCS_ERR_LEASE_CONFLICT:
+	case PCS_ERR_BAD_FILE:
+	case PCS_ERR_NO_CHUNK:
 		TRACE("fatal error:%d ireq->type:%d nodeid:%llu\n",
 		      ireq->error.value, ireq->type,
 		      ireq->dentry->inode->nodeid);
diff --git a/fs/fuse/kio/pcs/pcs_error.h b/fs/fuse/kio/pcs/pcs_error.h
index cbf5c1532945..ecb1c8989bd9 100644
--- a/fs/fuse/kio/pcs/pcs_error.h
+++ b/fs/fuse/kio/pcs/pcs_error.h
@@ -62,7 +62,10 @@ typedef enum {
 					 */
 
 	PCS_ERR_NO_STORAGE	= 50,	/* The number of chunk servers in cluster is less than the required number of replicas */
-	PCS_ERR_NOT_ALLOWED	= 51,	/* Operation is not allowed due to licensing limitations */
+	PCS_ERR_NOT_ALLOWED	= 51,	/* Operation is not allowed */
+	PCS_ERR_IO_HOLE		= 52,	/* Read operation encountered a hole */
+	PCS_ERR_BAD_FILE	= 53,	/* Unrecoverable corruption happened */
+	PCS_ERR_NO_CHUNK	= 54,	/* Request is rejected, no chunk at this offset */
 	PCS_ERR_CFG_VERSION	= 60,	/* Configuration version mismatch */
 	PCS_ERR_CLNT_VERSION	= 61,	/* Client version is incompatible with sever version (outdated) */
 	PCS_ERR_EXISTS		= 70,	/* Specified object already exists */
@@ -144,7 +147,10 @@ static const char *const prot_err_list[] = {
 	[PCS_ERR_INTEGRITY_FAIL]	= "Fatal MDS integrity error",
 
 	[PCS_ERR_NO_STORAGE]		= "The number of chunk servers in cluster is less than the required number of replicas",
-	[PCS_ERR_NOT_ALLOWED]		= "Operation is not allowed due to licensing limitations",
+	[PCS_ERR_NOT_ALLOWED]		= "Operation is not allowed",
+	[PCS_ERR_IO_HOLE]		= "Read operation encountered a hole",
+	[PCS_ERR_BAD_FILE]		= "Unrecoverable corruption happened",
+	[PCS_ERR_NO_CHUNK]		= "Request is rejected, no chunk at this offset",
 	[PCS_ERR_CFG_VERSION]		= "Configuration version mismatch",
 	[PCS_ERR_CLNT_VERSION]		= "Client version is incompatible with server version (outdated)",
 	[PCS_ERR_EXISTS]		= "Specified object already exists",


More information about the Devel mailing list