[PATCH 2/4] 9pfs: Don't use file descriptors in core code

2025-03-11 Thread Greg Kurz
v9fs_getattr() currently peeks into V9fsFidOpenState to know if a fid has a valid file descriptor or directory stream. Even though the fields are accessible, this is an implementation detail of the local backend that should not be manipulated directly by the server code. Abstract that with a new h

Re: [PATCH 2/4] 9pfs: Don't use file descriptors in core code

2025-03-11 Thread Greg Kurz
On Tue, 11 Mar 2025 15:03:13 +0100 Greg Kurz wrote: > On Tue, 11 Mar 2025 12:13:06 +0100 > Christian Schoenebeck wrote: > > > On Monday, March 10, 2025 6:10:59 PM CET Greg Kurz wrote: > > > v9fs_getattr() currently peeks into V9fsFidOpenState to know if a fid > > > has a valid file descriptor o

Re: [PATCH 2/4] 9pfs: Don't use file descriptors in core code

2025-03-11 Thread Christian Schoenebeck
On Tuesday, March 11, 2025 3:03:13 PM CET Greg Kurz wrote: > On Tue, 11 Mar 2025 12:13:06 +0100 > Christian Schoenebeck wrote: > > > On Monday, March 10, 2025 6:10:59 PM CET Greg Kurz wrote: [...] > > Follow-up on previous patch, this could be reduced to: > > > > static int local_fid_fd(int fid_

Re: [PATCH 2/4] 9pfs: Don't use file descriptors in core code

2025-03-11 Thread Greg Kurz
On Tue, 11 Mar 2025 12:13:06 +0100 Christian Schoenebeck wrote: > On Monday, March 10, 2025 6:10:59 PM CET Greg Kurz wrote: > > v9fs_getattr() currently peeks into V9fsFidOpenState to know if a fid > > has a valid file descriptor or directory stream. Even though the fields > > are accessible, thi

Re: [PATCH 2/4] 9pfs: Don't use file descriptors in core code

2025-03-11 Thread Christian Schoenebeck
On Monday, March 10, 2025 6:10:59 PM CET Greg Kurz wrote: > v9fs_getattr() currently peeks into V9fsFidOpenState to know if a fid > has a valid file descriptor or directory stream. Even though the fields > are accessible, this is an implementation detail of the local backend > that should not be ma