NetBSD Problem Report #60026

From www@netbsd.org  Sun Feb 22 04:14:38 2026
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "mail.netbsd.org", Issuer "R13" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 32BDC1A9239
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 22 Feb 2026 04:14:38 +0000 (UTC)
Message-Id: <20260222041437.358AB1A923C@mollari.NetBSD.org>
Date: Sun, 22 Feb 2026 04:14:37 +0000 (UTC)
From: imuwoto@gmail.com
Reply-To: imuwoto@gmail.com
To: gnats-bugs@NetBSD.org
Subject: zfs mount issues
X-Send-Pr-Version: www-1.0
X-From4GNATS: "imuwoto@gmail.com via gnats" <gnats-admin@NetBSD.org>

>Number:         60026
>Category:       kern
>Synopsis:       zfs mount issues
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 22 04:15:00 +0000 2026
>Last-Modified:  Tue Mar 17 02:20:01 +0000 2026
>Originator:     YAMAMOTO Takashi
>Release:        NetBSD 10.1
>Organization:
>Environment:
amd64
>Description:
* zmount() in libzfs always passes 0 to mount(2) 'flags' argument
* zmount() always sets 'uap->flags' to 0.
* zmount() stores something in uap->mflag. but no one seems to use it.
* zmount() sets up uap->optptr, but it doesn't set MS_OPTIONSTR.
* we don't implement MS_OPTIONSTR anyway.
* because zmount() effectively discards most of options,
  it's a bit adventurous to use -o in "zfs mount" and mount_zfs.

>How-To-Repeat:
eg.
zfs mount -o remount y/tmp
>Fix:
a. implement MS_OPTIONSTR in our vfs (not zfs, because some options would need to be cared before getting into zfs)

b. or implement it in libzfs (eg. translate them to our MNT_UPDATE etc.)

either ways, mount ABI changes, at least for zfs.

>Audit-Trail:
From: "YAMAMOTO Takashi" <yamt@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/60026 CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs
Date: Tue, 17 Mar 2026 02:19:51 +0000

 Module Name:	src
 Committed By:	yamt
 Date:		Tue Mar 17 02:19:51 UTC 2026

 Modified Files:
 	src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_vfsops.c

 Log Message:
 zfs: reject all mount op flags for now

 - our logic in zfs_vfsops.c is inconsistent. sometimes it checks
   uap->flags, sometimes vfsp->vfs_flag. (aka mnt_flag)

 - our userland tools (zfs, mount_zfs) currently don't seem to have
   a way to pass these flags anyway. (zmount in libzfs always passes
   0 to both of mount(2) 'flags' argument and 'uap->flags'. although
   it stores something in uap->mflag and uap->optptr, nothing uses
   them. it doesn't even set MS_OPTIONSTR. we don't implement
   MS_OPTIONSTR anyway.)

 this commit simply rejects them for safety. as these operations have
 never been implemented in NetBSD, it shouldn't have any impact to users.

 maybe someday we should fix these, but i guess it involves some
 ABI changes, which i'm not in a mood to do right now.

 related to PR/60026
 https://gnats.netbsd.org/60026


 To generate a diff of this commit:
 cvs rdiff -u -r1.31 -r1.32 \
     src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.