Skip to content

Commit c392fce

Browse files
authored
Merge branch 'master' into async-runtime-takeover
2 parents 3ffc7cd + 8e7406a commit c392fce

19 files changed

Lines changed: 630 additions & 349 deletions

File tree

‎.github/workflows/rust.yml‎

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,53 @@ jobs:
5959
sudo -E CARGO=${CARGO_BIN} make smoke-all
6060
sudo chown -R $(id -u):$(id -g) "${HOME}/.cargo"
6161
62+
MSRV:
63+
# `CI` builds on `stable` only, so nothing notices when a change quietly
64+
# needs a newer rustc than the declared `rust-version`; the
65+
# trait-object-upcasting requirement slipped in exactly that way. Check
66+
# with the declared MSRV instead, on a native runner: `--all-features
67+
# --all-targets` covers the async-io paths that needed the bump, plus the
68+
# drivers, transports and persist stack on top. The dev-only binaries
69+
# under tests/ declare no `rust-version` and track the latest
70+
# dev-dependencies, whose MSRV is not ours to promise (today
71+
# `simple_logger` 5.2 floors `time` at a release needing rustc 1.88), so
72+
# they are excluded; the stable-toolchain jobs still build them (`CI`
73+
# runs the benchmark smoke, `xfstests` and `benchmark` build the daemons).
74+
runs-on: ubuntu-latest
75+
timeout-minutes: 30
76+
steps:
77+
- uses: actions/checkout@v3
78+
- name: Cache cargo
79+
uses: Swatinem/rust-cache@v2.2.0
80+
with:
81+
cache-on-failure: true
82+
key: ${{ runner.os }}-cargo-msrv
83+
- name: Read declared MSRV
84+
# Take the MSRV from the root manifest instead of pinning a second
85+
# copy here: a pin left behind by a later bump would quietly check a
86+
# version nobody declares anymore. Cargo still rejects a member whose
87+
# own rust-version exceeds the toolchain, so the crate manifests
88+
# cannot drift past what this job checks.
89+
id: msrv
90+
run: |
91+
msrv=$(sed -n 's/^rust-version = "\(.*\)"/\1/p' Cargo.toml | head -1)
92+
echo "version=$msrv" >> "$GITHUB_OUTPUT"
93+
- name: Install Rust
94+
uses: actions-rs/toolchain@v1
95+
with:
96+
profile: minimal
97+
toolchain: ${{ steps.msrv.outputs.version }}
98+
override: true
99+
- name: Check
100+
# No Cargo.lock is tracked, so dependencies are resolved fresh here.
101+
# The resolver's default (`allow`) keeps picking versions that need a
102+
# newer rustc than the declared MSRV; `fallback` prefers versions the
103+
# MSRV can compile, so the job survives a dependency raising its own
104+
# rust-version.
105+
env:
106+
CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS: fallback
107+
run: cargo check --workspace --all-features --all-targets --exclude passthrough --exclude overlay --exclude fuse-backend-rs-benchmark
108+
62109
Macos-CI:
63110
runs-on: macos-latest
64111
steps:

‎CHANGELOG.md‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Changelog
22
## [Unreleased]
33
### Added
4+
- `uring_available()` tells whether the kernel lets the process serve FUSE over io_uring: the
5+
fuse module's `enable_uring` parameter is on and the process may create an io_uring. Checking
6+
it before mounting saves a mount that would fall back to `/dev/fuse`.
47
- [254](https://github.com/cloud-hypervisor/fuse-backend-rs/pull/254): Split the library into a layered Cargo workspace and break the layers out into
58
their own crates — `fuse-backend-core` (ABI, API/server, buffers),
69
`fuse-backend-fusedev` and `fuse-backend-virtiofs` (transports), and
@@ -35,8 +38,20 @@
3538
- `Server::init_state()` and `Server::restore_init()` let a new server take over a connection
3639
that another server initialized. `abi::fuse_abi::UNIQUE_RESEND` is the bit that the kernel
3740
sets in requests it sends again after `notify_resend()`.
41+
- [269](https://github.com/cloud-hypervisor/fuse-backend-rs/pull/269): `AsyncFileSystem` methods default to calling their `FileSystem`
42+
counterparts, so a file system only implements the handlers it serves asynchronously.
43+
- [269](https://github.com/cloud-hypervisor/fuse-backend-rs/pull/269): `FuseSession::detach()` lazily unmounts a Linux session through `&self`,
44+
so the owner of a serving layer can start the teardown while another thread waits in
45+
`FuseServing::wait()`.
3846

3947
### Changed
48+
- Bump the declared minimum supported Rust version (MSRV) from 1.80 to 1.86.
49+
Trait-object upcasting (stabilized in Rust 1.86) is required by the default
50+
`AsyncFileSystem` read/write handlers and by the passthrough O_DIRECT relay,
51+
so with the `async-io` feature enabled the workspace has not built on older
52+
toolchains for a while — the 1.80 declaration was already inaccurate. CI
53+
gains an MSRV job that checks the crates declaring `rust-version` with the
54+
declared version, so the next accidental bump is caught.
4055
- The FUSE-over-io_uring transport answers opcodes it doesn't know with ENOSYS instead of EIO.
4156
Kernels that send `FUSE_STATX` only fall back to `FUSE_GETATTR` after ENOSYS, so `statx()`
4257
calls that ask for more than the basic fields, like the birth time `stat(1)` shows, failed.
@@ -82,11 +97,16 @@
8297
and no code in the workspace relied on it.
8398

8499
### Fixed
100+
- READDIR and READDIRPLUS answer ENOMEM when the reply can't hold the reply header plus the
101+
requested size. The check left out the header, so a writer short by up to 16 bytes started the
102+
listing and failed partway.
85103
- [278](https://github.com/cloud-hypervisor/fuse-backend-rs/pull/278): Treat `EOPNOTSUPP`/`ENOTSUP` and `ENOSYS` from `getxattr` as "not opaque"
86104
in `Layer::is_opaque()`, so `OverlayFs::import()` no longer aborts when a layer's
87105
backing filesystem has no xattr support at all (tmpfs answers `EOPNOTSUPP` to
88106
`user.*` xattrs before Linux 6.12, and a `PassthroughFs` layer with `xattr`
89107
disabled answers `ENOSYS`).
108+
- [269](https://github.com/cloud-hypervisor/fuse-backend-rs/pull/269): For a session mounted with `set_target_mntns()`,
109+
`FuseSession::umount()` unmounts in that mount namespace. It no longer follows a symlink at the mountpoint.
90110

91111
### Removed
92112
- [254](https://github.com/cloud-hypervisor/fuse-backend-rs/pull/254): Drop the vestigial `vhost` and `virtio-bindings` dependencies that the

‎Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ authors = [
1212
readme = "README.md"
1313
license = "Apache-2.0 AND BSD-3-Clause"
1414
edition = "2018"
15-
rust-version = "1.80"
15+
rust-version = "1.86"
1616
repository = "https://github.com/cloud-hypervisor/fuse-backend-rs"
1717
homepage = "https://github.com/cloud-hypervisor/"
1818

‎Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ smoke-macos: check-macos
146146
${CARGO} test --features="fusedev,fuse-t" -- --nocapture
147147

148148
docker-smoke:
149-
docker run --env RUST_BACKTRACE=1 --rm --privileged --volume ${current_dir}:/fuse-rs rust:1.68 sh -c "rustup component add clippy rustfmt; cd /fuse-rs; make smoke-all"
149+
docker run --env RUST_BACKTRACE=1 --rm --privileged --volume ${current_dir}:/fuse-rs rust:1.86 sh -c "rustup component add clippy rustfmt; cd /fuse-rs; make smoke-all"
150150

151151
testoverlay:
152152
${CARGO} build -p overlay

‎crates/fuse-backend-core/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ authors = [
1111
]
1212
license = "Apache-2.0 AND BSD-3-Clause"
1313
edition = "2018"
14-
rust-version = "1.80"
14+
rust-version = "1.86"
1515
repository = "https://github.com/cloud-hypervisor/fuse-backend-rs"
1616
homepage = "https://github.com/cloud-hypervisor/"
1717
readme = "README.md"

0 commit comments

Comments
 (0)