Commit graph

30 commits

Author SHA1 Message Date
Antonio S. Musumeci
98648ae44b FUSE: require valid file/dir handle; drop open_files fallback
Several FUSE ops fell back to looking up a FileInfo via
state.open_files when the kernel-provided fh was zero, returning
-ENOENT if the lookup failed. This path papered over handle-tracking
bugs and added cost on every call. Use the handle directly and
return -EBADF when it is invalid - the kernel should always hand us
a valid fh for an open resource.

Also simplify FileInfo::from_fh / DirInfo::from_fh and their to_fh
helpers: callers now handle the null-pointer case explicitly so the
ASSERT_NOT_NULL checks are redundant.

Covers fallocate, fchmod, fchown, fgetattr, flock, ftruncate,
futimens, read, release, releasedir, write, statx, ioctl (file +
dir), readdir (sequential, concurrent-on-read,
concurrent-on-search), and the passthrough fast paths in
create/open.
2026-04-18 13:47:23 -05:00
Antonio SJ Musumeci
425e30b50f Use nanosleep rather than yield and return EINTR
Some checks failed
mkdocs / deploy (push) Has been cancelled
2026-04-11 11:30:57 -05:00
Antonio SJ Musumeci
6d218fa87f Misc updates and fixes
Some checks failed
mkdocs / deploy (push) Has been cancelled
2026-04-04 02:46:24 -05:00
Antonio SJ Musumeci
7fc20457ca Rework open file resource management 2026-03-31 19:53:17 -04:00
Antonio SJ Musumeci
511bf47af9 Convert stdint to short ints 2026-03-02 01:09:16 -05:00
Antonio SJ Musumeci
a5a6c892b9 Update copyright headers 2026-03-02 01:09:16 -05:00
trapexit
9b046d9a34
Rework credential handling to support chroot & idmap (#1595)
Some checks are pending
mkdocs / deploy (push) Waiting to run
Run in an elevated credential mode (root) and let the kernel manage
entitlements. Will result in slightly different behavior but should
not be noticed by most.
2025-12-05 21:03:48 -06:00
trapexit
37f10888a9
Add more debugging options to makefiles and cleanup (#1556)
Some checks failed
CodeQL / Analyze (push) Has been cancelled
mkdocs / deploy (push) Has been cancelled
2025-10-29 22:42:42 -05:00
trapexit
727c522fb8
Rework config, centralize fuse config (#1547)
Some checks are pending
CodeQL / Analyze (push) Waiting to run
mkdocs / deploy (push) Waiting to run
2025-10-24 08:20:29 -05:00
trapexit
0371f03def
Rework how fuse request context is handled (#1543)
Some checks are pending
CodeQL / Analyze (push) Waiting to run
mkdocs / deploy (push) Waiting to run
2025-10-12 23:21:36 -05:00
trapexit
8c649d33ee
Start using std::filesystem::path for fusepath (#1522)
Some checks are pending
CodeQL / Analyze (push) Waiting to run
mkdocs / deploy (push) Waiting to run
2025-09-17 22:51:16 -05:00
trapexit
f64ff9ca1e
Revert removal of readdir init setup, simplify cfg usage (#1520)
Some checks failed
CodeQL / Analyze (push) Has been cancelled
mkdocs / deploy (push) Has been cancelled
2025-09-06 11:03:51 -05:00
trapexit
e8cd74cab0
Move everything to negative errno return types (#1499)
Some checks failed
CodeQL / Analyze (push) Has been cancelled
mkdocs / deploy (push) Has been cancelled
2025-07-25 17:53:48 -05:00
trapexit
e310d24615
Add support for FUSE passthrough
Some checks are pending
CodeQL / Analyze (push) Waiting to run
mkdocs / deploy (push) Waiting to run
2025-06-05 23:47:42 -05:00
trapexit
86b50d2d4e
Rework policies to return branches rather than path strings 2025-05-17 16:35:18 -05:00
Antonio SJ Musumeci
77bf16e9ae Change the "devino" inode calculation
Use hashing of branch path rather than use st_dev.
2025-04-15 18:54:51 -05:00
Antonio SJ Musumeci
6aa6452d3e Add flushonclose feature 2023-10-28 19:47:23 -05:00
Antonio SJ Musumeci
707d298d7c Create functions can set branches RO on EROFS 2023-07-13 21:19:13 -05:00
Antonio SJ Musumeci
6a14a10e6c Fix read/write behavior and return value depending on direct_io
Also add parallel direct write option for 6.2+ kernels.
2023-06-24 23:06:14 -05:00
Antonio SJ Musumeci
9effeb6869 Add "per-process" file caching feature
Allows chosing page caching based on process name.
2023-02-18 01:16:36 -05:00
Antonio SJ Musumeci
538467b86d config: rework global config, remove rwlock, make branches RCU like
Also added unit tests. Should have done separately but found a number of bugs.
2021-01-14 21:02:10 -05:00
Antonio SJ Musumeci
1b26f4908e general cleanup, slight memory reduction 2020-11-19 22:58:52 -05:00
Antonio SJ Musumeci
fc3453932a branches: add per branch minfreespace w/ original value as default
example: /mnt/disk0=RW,1G:/mnt/disk1=RW,2G
2020-09-04 21:04:45 -04:00
Antonio SJ Musumeci
2fe20b888e clean up and separate out fs_* files 2020-08-18 19:28:36 -04:00
Antonio SJ Musumeci
15a0aedd25 cleanup: move some config data structures to separate files 2020-07-29 21:42:43 -04:00
Antonio SJ Musumeci
54c41c4994 rework config management
* Add standard way to do str2val and val2str conversion
* Add support for a config file
* Add support for reading and writing settings via ioctl
2020-06-18 18:54:25 -04:00
Antonio SJ Musumeci
576ff3694e add cache.writeback to xattrs 2020-02-12 19:48:37 -05:00
Antonio SJ Musumeci
903d39f968 add writeback caching 2020-02-09 21:08:53 -05:00
Antonio SJ Musumeci
529a953e30 add file caching across opens and runtime control 2019-05-30 00:10:08 -04:00
Antonio SJ Musumeci
9d9ee7b71d general code cleanup 2019-01-31 22:47:09 -05:00
Renamed from src/create.cpp (Browse further)