From nobody Tue Dec 07 06:31:28 2021 X-Original-To: freebsd-fs@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 503B318D7DE3 for ; Tue, 7 Dec 2021 06:31:42 +0000 (UTC) (envelope-from luoqi.chen@gmail.com) Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J7VnT2s5xz3JRs for ; Tue, 7 Dec 2021 06:31:41 +0000 (UTC) (envelope-from luoqi.chen@gmail.com) Received: by mail-lf1-x136.google.com with SMTP id b40so31069224lfv.10 for ; Mon, 06 Dec 2021 22:31:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=WMUNQxV/a+XEWpGzHdreKNVwH56ckc7gR0S8y0lCf0g=; b=k2eoopFjhDWGyfiIMuSIHo933Y5tclJMcrOso+Vrfn4jGO9TXPjt8sGFxocI4V/Lx3 rM7J7fWa+riUX+ZaXHbTaeglHEKzlrCoKP1RrpR5Tg9FAnrlFYw12p6vVp5syRDBy+x5 q9fOpHXhWujbGQzFsnCLKbi4Ixz+YtayKkXt8O+stUCnUmmYYcKx6nmvqtyDjxe2a25O s657Zd3V8b5885ZPhjfQlCvsxt8bJANMaxdxXQ4rYoSR/lvn1Rc38d+mHZife+uCPzzx iBScz5bM/RFkYZXp3CBPj8SHb+C8WlF8vuqZ/gzWERNpajJ4CxFfYMvrZzK+A7RrebO3 pp5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=WMUNQxV/a+XEWpGzHdreKNVwH56ckc7gR0S8y0lCf0g=; b=Jpp6T3nFzVwiCw2PhI2zZf8lhoyxto80BgdGY45vYkkOshzI7Gjuj/mJicOSRsSpxh nCk3ZytXAPpVBmszjQVoj1HiwfR5+suZXxaSxtA84inqfH+Kj0huH9O29GwxTEkHCvQg 9Ia6fMw5SRh/4fpijc8VcwRlzArRegQ43719ycO0ApayoMr86MkoQU8BZwxUacTIpcOz iKhOZVzd75iEKr6okYhydAs1AMBKqV5sfh+4bli8xrOwOqubHgDLVSVOIHXljfXWSKWr +sfkJQs2/OJxRmWuw8nRmbdhNUgdzANVmfpzFgDry9VEOOzpwTFdSnb+PIeawEAFCWjJ yxNQ== X-Gm-Message-State: AOAM532UcpQdugk8s/sYTalpC+3iBPrLiLAFZyCjxnyOXBaeRqp0TSUj h881pMnpQCD+q8ie4Gbz40Ts/34ML6uMesbNKUgeqcox3cVk8g== X-Google-Smtp-Source: ABdhPJy2mN/VprThR/SxyEI7xOApLSr6/QnO/I05GgEjQPjwnNYtt10kAcYGiNJYn0NJze2izWCPjpOctNf5nga6RLo= X-Received: by 2002:a05:6512:1506:: with SMTP id bq6mr40320637lfb.444.1638858699861; Mon, 06 Dec 2021 22:31:39 -0800 (PST) List-Id: Filesystems List-Archive: https://lists.freebsd.org/archives/freebsd-fs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-fs@freebsd.org MIME-Version: 1.0 From: Luoqi Chen Date: Mon, 6 Dec 2021 22:31:28 -0800 Message-ID: Subject: nullfs traversing mount points (with working code) To: freebsd-fs Content-Type: multipart/alternative; boundary="000000000000a46f6105d2888661" X-Rspamd-Queue-Id: 4J7VnT2s5xz3JRs X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=k2eoopFj; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of luoqichen@gmail.com designates 2a00:1450:4864:20::136 as permitted sender) smtp.mailfrom=luoqichen@gmail.com X-Spamd-Result: default: False [-3.44 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.44)[-0.438]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-fs@freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCPT_COUNT_ONE(0.00)[1]; MID_RHS_MATCH_FROMTLD(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::136:from]; NEURAL_HAM_SHORT(-1.00)[-0.999]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: Y --000000000000a46f6105d2888661 Content-Type: text/plain; charset="UTF-8" Hi, Recently I had the need to access nfs automounts (for example /net) from within jails, I searched everywhere but couldn't find any suitable solution. It seems we still don't support mount point traversal in nullfs, even though many people have asked for it. I had no choice so I spent a bit of time adding the support myself, which worked satisfactorily for my own purpose. I wonder if anyone's interested in taking the code, polishing it and eventually checking it in. The patch against 13.0-RELENG is at https://people.freebsd.org/~luoqi/nullxmnt.diff Best -luoqi --000000000000a46f6105d2888661--