fuse: return -E2BIG for an oversized SETXATTR over io-uring

fuse_dev_do_read() returns -E2BIG when a SETXATTR does not fit the
server's buffer, since the value may legitimately be that large.  The
io-uring transport fails the copy with -EIO instead.  Map it so both
transports agree.

Assisted-by: Claude:claude-opus-4-8
Reviewed-by: Joanne Koong <joannelkoong@gmail.com>
Signed-off-by: Xiang Mei <xmei5@asu.edu>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
This commit is contained in:
Xiang Mei 2026-09-10 16:51:10 -07:00 committed by Miklos Szeredi
parent c1338aae7b
commit ab38882862

View File

@ -893,6 +893,12 @@ static int fuse_uring_args_to_ring(struct fuse_req *req,
fuse_copy_finish(&cs);
if (err) {
pr_info_ratelimited("%s fuse_copy_args failed\n", __func__);
/*
* fuse-uring does not use pipe buffers, so -EIO here can only
* mean the in-args did not fit ent->payload
*/
if (err == -EIO && args->opcode == FUSE_SETXATTR)
err = -E2BIG;
return err;
}