10 Commits
Author SHA1 Message Date
Sang-Heon Jeon b773346540 fuse: use min_not_zero() in fuse_init_server_timeout()
fuse_init_server_timeout() limits timeout to fuse_max_req_timeout with
the same logic as min_not_zero(), and returns early exactly when the
computed timeout would be zero.

So use min_not_zero() instead and return when the computed timeout is
zero.

No functional change.

Signed-off-by: Sang-Heon Jeon <[email protected]>
Reviewed-by: Joanne Koong <[email protected]>
Signed-off-by: Miklos Szeredi <[email protected]>
2026-08-18 14:35:23 +02:00
Miklos Szeredi 4eeb5e6cb0 fuse: abort related layering cleanup
- rename fuse_abort_conn() to fuse_chan_abort(), pass fuse_chan pointer
   instead of fuse_conn

 - pass an abort_with_err argument that tells fuse_dev_(read|write) to
   return with ECONNABORTED instead of ENODEV

 - move fc->aborted to fch->abort_with_err

 - rename fuse_wait_aborted() to fuse_chan_wait_aborted()

Signed-off-by: Miklos Szeredi <[email protected]>
2026-06-15 14:06:17 +02:00
Miklos Szeredi a3a3e06bfb fuse: remove #include "fuse_i.h" from "req_timeout.c"
Just need to move fuse_abort_conn().

Signed-off-by: Miklos Szeredi <[email protected]>
2026-06-15 14:06:17 +02:00
Miklos Szeredi 56b4332e12 fuse: move request timeout to fuse_chan
Move:

 - timeout

Signed-off-by: Miklos Szeredi <[email protected]>
2026-06-15 14:06:16 +02:00
Miklos Szeredi bf9932623d fuse: split off fch->lock from fc->lock
And document which members they protect.

end_polls() is called with both, outer fch->lock is probably unnecessary,
but doesn't hurt for now.

Signed-off-by: Miklos Szeredi <[email protected]>
2026-06-15 14:06:16 +02:00
Miklos Szeredi 599ad4427b fuse: move request blocking related members to fuse_chan
Move:

 - initialized
 - blocked
 - blocked_waitq
 - connected
 - num_waiting

Signed-off-by: Miklos Szeredi <[email protected]>
2026-06-15 14:06:16 +02:00
Miklos Szeredi 2b07cbc4e4 fuse: move background queuing related members to fuse_chan
Move:

 - max_background
 - num_background
 - active_background
 - bg_queue
 - bg_lock

Signed-off-by: Miklos Szeredi <[email protected]>
2026-06-15 14:06:15 +02:00
Miklos Szeredi 4e0de84063 fuse: move 'devices' member from fuse_conn to fuse_chan
This belongs in the transport layer.

Signed-off-by: Miklos Szeredi <[email protected]>
2026-06-15 14:06:15 +02:00
Miklos Szeredi b88fb2b92b fuse: move fuse_iqueue to fuse_chan
Move the 'fiq' member from fuse_conn to fuse_chan.

Move iqueue related structure definitions and function declarations from
"fuse_i.h" to "fuse_dev_i.h".

Add a fuse_dev_chan_new() helper, that returns a fuse_chan initialized with
the fuse_dev_fiq_ops.

Add a fuse_chan_release() function, that calls fiq->ops->release().

Signed-off-by: Miklos Szeredi <[email protected]>
2026-06-15 14:06:15 +02:00
Miklos Szeredi f14348575d fuse: move request timeout code to a new source file
This marks the first step in cleanly separating the transport layer from
the filesystem layer.

Add "dev.h", which will contain the interface definition for the transport
layer.

Signed-off-by: Miklos Szeredi <[email protected]>
2026-06-15 14:06:15 +02:00