From nobody Thu Nov 23 03:27:47 2023 X-Original-To: freebsd-current@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 4SbNq75q1sz52KJZ for ; Thu, 23 Nov 2023 03:28:03 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) (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 4SbNq749Vyz4K1r; Thu, 23 Nov 2023 03:28:03 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pj1-x102e.google.com with SMTP id 98e67ed59e1d1-2856437b584so147246a91.3; Wed, 22 Nov 2023 19:28:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700710079; x=1701314879; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=VgvPyroddqXhXZrDPQ4Srfg7cFhswXMAOFXr5phXtpY=; b=QkPxzaUcQlZHxX8pCW4aPk1yXHOSCLTW/NbXKstMk4XfpXGz8z1w0ugouVFCnR6eVK SPKEjbta6GNu9vXKHYGEdA3YF40+CUiUhvrhFl6xExmXJEmowzLaAsExHbf/MYDOloFj 1g3dKLgp3oITDDM4XTeUJ5uEml1faBuWLFUX37zx2RGQil8ArQP6cFQeADVewTrJVNeI X5JjW8HXYwtKJ8HuYkcxy3wX73aWCxHx0y/S8H2rSGRbJZfL9nHtM1GqJ8i4HyA6w0sc aLcikW8Kj4SeYwlH+buw4xVCLsHt21AEWH8m7y1iyrwKtL+LRmjSSydd9AVvtNPNVwkA QBSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700710079; x=1701314879; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VgvPyroddqXhXZrDPQ4Srfg7cFhswXMAOFXr5phXtpY=; b=sfieF7Pr3xPx960+QY6f8Q5kjTg3UGs9JMe4s2xQk5fq4jfzf9q1wng+2CMHzQFtUt vG0uDVsce7MkcY34k6IVPTwUigkR8bE2BZlaXON1XMI/T8Cyk8HT4DdAZRqkZ0zskPRD Mm6LHDPwDaAxuIgAKb/VlyceN8jlUObg0XJpSEGc23qzwI/M89E7i432CvCs2ZtA7Qog 7jiKKlzSru17V7RpvhyLiHp3jtVEObP4XoVmYLEfGk9mBzSsXR3i4qxyQStQjzugU9Wy Kk4OO/mw+02XAefi/FbfwUcF2hyl8nZPyXJcAXzHmO7jO8aMFHedlcqQm6/87zIwn8wn JQyw== X-Gm-Message-State: AOJu0YxbxuWm4Qq2n6ZfI/vhz0Qz4TErh9qrGlrLBXYYjPobB3xr4ZZ0 BH+QWoUXE9NATjpSI3DA46iwrN8hVGwmXrUqXA6/D+0= X-Google-Smtp-Source: AGHT+IHlhG+03MqYQ1wYEiTy8p7bpEbaAQrzg6EfkwzTJtJo3CSa28UQpMpAyEBaj+r+XLwp/ilKrDHcqBFI48YmhqU= X-Received: by 2002:a17:90b:3595:b0:27d:1c70:23d4 with SMTP id mm21-20020a17090b359500b0027d1c7023d4mr4408170pjb.44.1700710079200; Wed, 22 Nov 2023 19:27:59 -0800 (PST) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Rick Macklem Date: Wed, 22 Nov 2023 19:27:47 -0800 Message-ID: Subject: Re: RFC: #f FreeBSD_version of #ifdef for OpenZFS pull request To: Warner Losh Cc: Martin Matuska , Alexander Motin , FreeBSD CURRENT , Garrett Wollman , Mike Karels Content-Type: text/plain; charset="UTF-8" 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:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[] X-Rspamd-Queue-Id: 4SbNq749Vyz4K1r Thanks, I've gone with B, rick On Wed, Nov 22, 2023 at 1:30=E2=80=AFPM Warner Losh wrote: > > > > On Wed, Nov 22, 2023, 1:24 PM Rick Macklem wrote= : >> >> Hi, >> >> I have a patch currently under review at D42672 that fixes visibility >> of snapshots under .zfs/snapshot for NFS clients. >> It adds a new function called vfs_exjail_clone(), which the ZFS >> code needs to use to fill in the mnt_exjail field. >> >> Since the OpenZFS code is supposed to build for 12.2 or later, >> I can see two ways of doing this: >> (A) #if on the FreeBSD_versions, which will look something like: >> >> #if (__FreeBSD_version >=3D 1300xxx && __FreeBSD_version < 1400000) || >> (__FreeBSD_version >=3D 1400yyy && __FreeBSD_version < 1400500) || >> (__FreeBSD_version >=3D 1400zzz && __FreeBSD_version < 1500000) || >> __FreeBSD_version >=3D 1500wwww >> vfs_exjail_clone(); >> #endif >> >> The problem with this one is I do not know what www, xxx, yyy and zzz ar= e >> until I have MFC'd the patch and bumped __FreeBSD_version. >> --> I cannot generate the OpenZFS pull request until after that and, >> since I am headed to Florida for a few weeks, it would be late Dece= mber >> at the earliest. >> OR >> (B) add a line like >> #define VFS_SUPPORTS_EXJAIL_CLONE 1 >> to mount.h in the patch and then: >> >> #ifdef VFS_SUPPORTS_EXJAIL_CLONE >> vfs_exjail_clone(); >> #endif >> >> The adavntage of (B) is that I can do the pull request on OpenZFS >> right away and commit the patch to main, etc as soon as possible, >> >> So, which do you think is preferred? rick >> ps: Unless D42672 gets reviewed soon, it won't really matter w.r.t. timi= ng. > > > I'd do B if I were doing this. With a comment for why I'm doing this defi= ne. Then version numbers don't matter unless we botch something badly and n= eed them as a fallback. > > Warner >