Index | Thread | Search

From:
Kirill A. Korinsky <kirill@korins.ky>
Subject:
Re: fuse: allow control of the MNT_LOCAL flag
To:
Vitaliy Makkoveev <mvs@openbsd.org>
Cc:
OpenBSD tech <tech@openbsd.org>
Date:
Thu, 02 May 2024 17:28:47 +0200

Download raw body.

Thread
On Thu, 02 May 2024 16:58:31 +0200,
Vitaliy Makkoveev <mvs@openbsd.org> wrote:
>
> I see FreeBSD just clears [1] MNT_LOCAL flag and this looks reasonable
> to me.
>

Agreed and it make things simpler. Updated diff:

diff --git sys/miscfs/fuse/fuse_vfsops.c sys/miscfs/fuse/fuse_vfsops.c
index 5b30b1544aa..97bd929e0fd 100644
--- sys/miscfs/fuse/fuse_vfsops.c
+++ sys/miscfs/fuse/fuse_vfsops.c
@@ -114,7 +114,11 @@ fusefs_mount(struct mount *mp, const char *path, void *data,
 	fmp->allow_other = args->allow_other;

 	mp->mnt_data = fmp;
-	mp->mnt_flag |= MNT_LOCAL;
+	/*
+	 * I/O to a FUSE file system can be blocked indefinitely that makes
+	 * it non-local file system from kernel point of view.
+	 */
+	mp->mnt_flag &= ~MNT_LOCAL;
 	vfs_getnewfsid(mp);

 	memset(mp->mnt_stat.f_mntonname, 0, MNAMELEN);


--
wbr, Kirill