]> www.infradead.org Git - users/jedix/linux-maple.git/commit
fuse: make args->in_args[0] to be always the header
authorBernd Schubert <bschubert@ddn.com>
Mon, 20 Jan 2025 01:28:58 +0000 (02:28 +0100)
committerMiklos Szeredi <mszeredi@redhat.com>
Fri, 24 Jan 2025 10:54:02 +0000 (11:54 +0100)
commit7ccd86ba3a485a8bc33478776eb7053d9adb7816
tree46af828b2e5efcc0cd98562348cadee14243b125
parenta7040a06e4bc6a550ddb2078d59fad311dc0ee3b
fuse: make args->in_args[0] to be always the header

This change sets up FUSE operations to always have headers in
args.in_args[0], even for opcodes without an actual header.
This step prepares for a clean separation of payload from headers,
initially it is used by fuse-over-io-uring.

For opcodes without a header, we use a zero-sized struct as a
placeholder. This approach:
- Keeps things consistent across all FUSE operations
- Will help with payload alignment later
- Avoids future issues when header sizes change

Op codes that already have an op code specific header do not
need modification.
Op codes that have neither payload nor op code headers
are not modified either (FUSE_READLINK and FUSE_DESTROY).
FUSE_BATCH_FORGET already has the header in the right place,
but is not using fuse_copy_args - as -over-uring is currently
not handling forgets it does not matter for now, but header
separation will later need special attention for that op code.

Correct the struct fuse_args->in_args array max size.

Signed-off-by: Bernd Schubert <bschubert@ddn.com>
Reviewed-by: Joanne Koong <joannelkoong@gmail.com>
Reviewed-by: Luis Henriques <luis@igalia.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/dax.c
fs/fuse/dev.c
fs/fuse/dir.c
fs/fuse/fuse_i.h
fs/fuse/xattr.c