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>, OpenBSD tech <tech@openbsd.org>
Date:
Mon, 06 May 2024 21:26:32 +0100

Download raw body.

Thread
tech@,

may I ask you to review and possible commit this trivial changes?

I have using it for last couple of days with sshfs via fuse and hasn't
discovered any issues.

On Thu, 02 May 2024 16:28:47 +0100,
Kirill A. Korinsky <kirill@korins.ky> wrote:
> 
> 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