[Devel] [PATCH VZ9] fs: fuse: kio: port new fatal errors from userspace
Alexey Kuznetsov
kuznet at virtuozzo.com
Tue Oct 29 22:43:26 MSK 2024
Otherwise we enter lockup instead of IO error.
Signed-off-by: Alexey Kuznetsov <kuznet at virtuozzo.com>
---
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 b0a5e14..c64668a 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 cbf5c15..ecb1c89 100644
--- a/fs/fuse/kio/pcs/pcs_error.h
+++ b/fs/fuse/kio/pcs/pcs_error.h
@@ -62,7 +62,10 @@
*/
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 @@
[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",
--
1.8.3.1
More information about the Devel
mailing list