* Wed Apr 22 2026 Miroslav Rezanina <mrezanin@redhat.com> - 1.13.3-2

- Fixing README file [RHEL-169757]
- Resolves: RHEL-169757
  (Fix the README file: --announce-submounts is enabled by default)
This commit is contained in:
Miroslav Rezanina 2026-04-22 16:09:20 +02:00
parent 7d072fdb20
commit 46f693414e
2 changed files with 105 additions and 1 deletions

View File

@ -0,0 +1,97 @@
From 80783db4428a758e6b5fac1eef21a2a0655d8282 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
Date: Wed, 11 Jun 2025 21:13:16 +0200
Subject: [PATCH] README: --announce-submounts is enabled by default
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: German Maglione <gmaglione@redhat.com>
---
README.md | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/README.md b/README.md
index 2a4c843..3200259 100644
--- a/README.md
+++ b/README.md
@@ -94,7 +94,7 @@ Honor the `O_DIRECT` flag passed down by guest applications.
```shell
--announce-submounts
```
-Tell the guest which directories are mount points.
+Tell the guest which directories are mount points [enabled by default].
If multiple filesystems are mounted in the shared directory,
virtiofsd passes inode IDs directly to the guest, and because such IDs
are unique only on a single filesystem, it is possible that the guest
@@ -110,6 +110,12 @@ On the other hand, when running without `--announce-submounts`,
the client only sends a `SYNCFS` request for the root mount,
this may lead to data loss/corruption.
+```shell
+--no-announce-submounts
+```
+Disable announce-submounts mode. This flag overrides the default behavior
+of announcing submounts to the guest.
+
```shell
--no-killpriv-v2
```
@@ -495,7 +501,7 @@ Export `/mnt` on vhost-user UNIX domain socket `/tmp/vfsd.sock`:
```shell
host# virtiofsd --socket-path=/tmp/vfsd.sock --shared-dir /mnt \
- --announce-submounts --inode-file-handles=mandatory &
+ --inode-file-handles=mandatory &
host# qemu-system \
-blockdev file,node-name=hdd,filename=<your image> \
@@ -547,14 +553,14 @@ mapped in as themselves with the help of the `newuidmap(1)` and `newgidmap(1)` h
```shell
host$ podman unshare -- virtiofsd --socket-path=/tmp/vfsd.sock --shared-dir /mnt \
- --announce-submounts --sandbox chroot &
+ --sandbox chroot &
```
Alternatively we can also achieve the same effect without Podman by relying on `unshare(1)` included in
`util-linux` which has the benefit that it should already be installed for most users. Use it like so:
```shell
host$ unshare -r --map-auto -- virtiofsd --socket-path=/tmp/vfsd.sock --shared-dir /mnt \
- --announce-submounts --sandbox chroot &
+ --sandbox chroot &
```
Using `lxc-usernsexec(1)`, we could leave the invoking user outside the mapping, having
@@ -562,14 +568,14 @@ the root user inside the user namespace mapped to the user and group 100000:
```shell
host$ lxc-usernsexec -m b:0:100000:65536 -- virtiofsd --socket-path=/tmp/vfsd.sock \
- --shared-dir /mnt --announce-submounts --sandbox chroot &
+ --shared-dir /mnt --sandbox chroot &
```
In order to have the same behavior as `podman-unshare(1)`, we need to run
```shell
host$ lxc-usernsexec -m b:0:1000:1 -m b:1:100000:65536 -- virtiofsd --socket-path=/tmp/vfsd.sock \
- --shared-dir /mnt --announce-submounts --sandbox chroot &
+ --shared-dir /mnt --sandbox chroot &
```
We could also select `--sandbox none` instead of `--sandbox chroot`.
@@ -610,9 +616,9 @@ exporting `share0`, `share1`:
mkdir -p share/{sh0,sh1}
mount -o bind share0 share/sh0
mount -o bind share1 share/sh1
-virtiofsd --announce-submounts --shared-dir share ...
+virtiofsd --shared-dir share ...
```
-Note the use of `--announce-submounts` to prevent data loss/corruption.
+Note: announce-submounts is enabled by default to prevent data loss/corruption.
- How to add virtiofs devices to an existing qemu command-line:
--
2.49.0

View File

@ -1,6 +1,6 @@
Name: virtiofsd
Version: 1.13.3
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Virtio-fs vhost-user device daemon (Rust version)
License: Apache-2.0 AND BSD-3-Clause
@ -11,6 +11,8 @@ Source: %{crates_source}
# cargo vendor && tar Jcvf ../%%{name}-%%{version}-vendor.tar.xz vendor/ ; popd
Source1: %{name}-%{version}-vendor.tar.gz
Patch1: 0001-README-announce-submounts-is-enabled-by-default.patch
ExclusiveArch: %{rust_arches}
# Some of our deps (i.e. vm-memory) are not available on 32 bits targets.
# In addition, there's no ppc64 qemu-kvm available for RHEL.
@ -76,6 +78,11 @@ install -D -p -m 0644 50-virtiofsd.json %{buildroot}%{_datadir}/qemu/vhost-user/
%{_datadir}/qemu/vhost-user/50-qemu-virtiofsd.json
%changelog
* Wed Apr 22 2026 Miroslav Rezanina <mrezanin@redhat.com> - 1.13.3-2
- Fixing README file [RHEL-169757]
- Resolves: RHEL-169757
(Fix the README file: --announce-submounts is enabled by default)
* Thu Dec 04 2025 Miroslav Rezanina <mrezanin@redhat.com> - 1.13.3-1
- Rebase to 1.13.3 [RHEL-133034]
- Resolves: RHEL-133034