From nobody Fri Nov 24 13:02:42 2023 X-Original-To: dev-commits-src-main@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 4ScFWw3nT2z52DCQ; Fri, 24 Nov 2023 13:02:52 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ScFWw0V7Pz3QrT; Fri, 24 Nov 2023 13:02:51 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.17.1/8.17.1) with ESMTP id 3AOD2gQu038639; Fri, 24 Nov 2023 15:02:45 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 3AOD2gQu038639 Received: (from kostik@localhost) by tom.home (8.17.1/8.17.1/Submit) id 3AOD2gwM038638; Fri, 24 Nov 2023 15:02:42 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 24 Nov 2023 15:02:42 +0200 From: Konstantin Belousov To: Alexander Leidinger Cc: 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 Message-ID: References: <202311231525.3ANFPBo6039293@gitrepo.freebsd.org> <987d4593d50b9cbffb9b6443d3825499@Leidinger.net> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <987d4593d50b9cbffb9b6443d3825499@Leidinger.net> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on tom.home 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:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Queue-Id: 4ScFWw0V7Pz3QrT 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=f5f277728adec4c5b3e840a1fb16bd16f8cc956d > > > > 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 mounted > 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-copy > stuff enabled, but it doesn't work, as the jails can't access the snapshot. 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. You might try to set up something with autofs, no idea if it could be made to work usefully.