Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Nov 2023 19:27:47 -0800
From:      Rick Macklem <rick.macklem@gmail.com>
To:        Warner Losh <imp@bsdimp.com>
Cc:        Martin Matuska <mm@freebsd.org>, Alexander Motin <mav@freebsd.org>,  FreeBSD CURRENT <freebsd-current@freebsd.org>, Garrett Wollman <wollman@bimajority.org>,  Mike Karels <mike@karels.net>
Subject:   Re: RFC: #f FreeBSD_version of #ifdef <feature> for OpenZFS pull request
Message-ID:  <CAM5tNy5UbgOUbhGWA49v9iv%2B2fbBrUgfs-nnKvMZMr=Lf7DzOA@mail.gmail.com>
In-Reply-To: <CANCZdfpevtaY_tGbCdHyRgb5GfYthvqAoy2QO5ySfdX2_3JHrg@mail.gmail.com>
References:  <CAM5tNy7rJfEzMBoHe6UGLAZfpgpE-0KMsRjOkJhg1UaiAWt_vw@mail.gmail.com> <CANCZdfpevtaY_tGbCdHyRgb5GfYthvqAoy2QO5ySfdX2_3JHrg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Thanks, I've gone with B, rick

On Wed, Nov 22, 2023 at 1:30=E2=80=AFPM Warner Losh <imp@bsdimp.com> wrote:
>
>
>
> On Wed, Nov 22, 2023, 1:24 PM Rick Macklem <rick.macklem@gmail.com> 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
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAM5tNy5UbgOUbhGWA49v9iv%2B2fbBrUgfs-nnKvMZMr=Lf7DzOA>