From nobody Fri Nov 24 13:18:08 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ScFsj1CsGz52JhX; Fri, 24 Nov 2023 13:18:17 +0000 (UTC) (envelope-from mike@karels.net) Received: from mail2.karels.net (mail2.karels.net [3.19.118.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "freebsd", Issuer "freebsd" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ScFsh5sxJz3TKM; Fri, 24 Nov 2023 13:18:16 +0000 (UTC) (envelope-from mike@karels.net) Authentication-Results: mx1.freebsd.org; none Received: from mail2.karels.net (localhost [IPv6:0:0:0:0:0:0:0:1]) by mail2.karels.net (8.17.1/8.17.1) with ESMTP id 3AODI91R097792; Fri, 24 Nov 2023 07:18:09 -0600 (CST) (envelope-from mike@karels.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=karels.net; s=mail2; t=1700831890; bh=aTIEwIGvVN+MNPhkX7gv+TRWLs1IOjLbEhhPlcSfrDg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=CNRrba0IZwMe8vzawbcubQvBoOcczgx10ub9CNSO1HdtXp+U1nkmrL8NW/jyHp/Bx ldJj4ZKMR7VsjuzG8pN55JhdBRveJ1mlaZCwFnL1q6vkUL5SuQeEOa2KrB3QpLLWow zO5xO7Vq4r848VcYKTB7FOmEZKXG984vGLPN8g+lDF1j2ZlslcuoWw3e8vlObaZXLz P1cHGy1pYoY6TyNyUx4zsVme4V5FL3O3aIeAxKMYlf8O3QLwbc+UuLd8x4jby3NlyN 1bwNDnAd8t91kz8Y22h7UvbSEpKUSx8FHSNCE/5WWWGeKak5zsxeb6nFGOa4Up/k3H CQuq19KwGpp+Q== Received: from [10.0.2.130] ([73.62.165.147]) by mail2.karels.net with ESMTPSA id KKGONZGiYGX+fQEAs/W3XQ (envelope-from ); Fri, 24 Nov 2023 07:18:09 -0600 From: Mike Karels To: Konstantin Belousov Cc: Alexander Leidinger , Rick Macklem , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: f5f277728ade - main - nfsd: Fix NFS access to .zfs/snapshot snapshots Date: Fri, 24 Nov 2023 07:18:08 -0600 X-Mailer: MailMate (1.14r5964) Message-ID: In-Reply-To: References: <202311231525.3ANFPBo6039293@gitrepo.freebsd.org> <987d4593d50b9cbffb9b6443d3825499@Leidinger.net> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.16.0.0/14, country:US] X-Rspamd-Queue-Id: 4ScFsh5sxJz3TKM On 24 Nov 2023, at 7:02, Konstantin Belousov wrote: > On Fri, Nov 24, 2023 at 08:50:22AM +0100, Alexander Leidinger wrote: >> Am 2023-11-23 16:25, schrieb Rick Macklem: >>> The branch main has been updated by rmacklem: >>> >>> URL: https://cgit.FreeBSD.org/src/commit/?id=3Df5f277728adec4c5b3e840= a1fb16bd16f8cc956d >>> >>> commit f5f277728adec4c5b3e840a1fb16bd16f8cc956d >>> Author: Rick Macklem >>> AuthorDate: 2023-11-23 15:23:33 +0000 >>> Commit: Rick Macklem >>> CommitDate: 2023-11-23 15:23:33 +0000 >>> >>> nfsd: Fix NFS access to .zfs/snapshot snapshots >>> >>> When a process attempts to access a snapshot under >>> //.zfs/snapshot, the snapshot is automounted. >>> However, without this patch, the automount does not >>> set mnt_exjail, which results in the snapshot not being >>> accessible over NFS. >>> >>> This patch defines a new function called vfs_exjail_clone() >>> which sets mnt_exjail from another mount point and >>> then uses that function to set mnt_exjail in the snapshot >>> automount. A separate patch that is currently a pull request >>> for OpenZFS, calls this function to fix the problem. >> >> May the same/similar fix like for ZFS be needed / useful for nullfs mo= unted >> stuff? >> >> I have a ZFS dataset which is mounted via nullfs into a jail. This >> nullfs-mount is then exported via samba. In samba I have the shadow-co= py >> stuff enabled, but it doesn't work, as the jails can't access the snap= shot. > > Jails cannot access snapshots because, as I understand, snapshots > are mounts. Nullfs does not provide an option to recursively bypass > into mounts. The patch you responded to does not automatically mounts > snapshots on clients, it only allows them to mount if wanted. It works for me, with main and this change, or 13.2 without a patch. I don't know the mechanics, but it doesn't use nullfs, and the snapshot does not show up as a separate filesystem with the mount command. Mike > You might try to set up something with autofs, no idea if it could be m= ade > to work usefully.