[Devel] [PATCH VZ9 2/3] fs: fuse: kio: one more overflow
Alexey Kuznetsov
kuznet at virtuozzo.com
Fri Oct 25 17:24:11 MSK 2024
Ancient bug, which was not caught only because nobody tried
to do a thing like:
fallocate -p -l 4g FILE
It is noop! Pretends to succeed but actually does nothing.
Signed-off-by: Alexey Kuznetsov <kuznet at virtuozzo.com>
---
fs/fuse/kio/pcs/pcs_cluster.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/fuse/kio/pcs/pcs_cluster.c b/fs/fuse/kio/pcs/pcs_cluster.c
index 0a1c8db..b0a5e14 100644
--- a/fs/fuse/kio/pcs/pcs_cluster.c
+++ b/fs/fuse/kio/pcs/pcs_cluster.c
@@ -347,8 +347,8 @@ static noinline void __pcs_cc_process_ireq_rw(struct pcs_int_request *ireq)
{
struct pcs_dentry_info *di = ireq->dentry;
u64 pos = ireq->apireq.req->pos;
- unsigned int sz = ireq->apireq.req->size;
- unsigned int dio_offset = 0;
+ u64 sz = ireq->apireq.req->size;
+ u64 dio_offset = 0;
struct pcs_flow_node *fl;
if (di->fileinfo.sys.map_type != PCS_MAP_PLAIN) {
@@ -368,7 +368,7 @@ static noinline void __pcs_cc_process_ireq_rw(struct pcs_int_request *ireq)
while (sz) {
struct pcs_int_request *sreq;
- unsigned int len;
+ u64 len;
u64 rpos, chunk, end_pos;
rpos = map_file_to_chunk(pos, di->fileinfo.sys.chunk_size_lo, di->fileinfo.sys.stripe_depth, di->fileinfo.sys.strip_width);
--
1.8.3.1
More information about the Devel
mailing list