Date: Tue, 6 May 2025 14:05:23 -0700 From: Rick Macklem <rick.macklem@gmail.com> To: Rick Macklem <rick.macklem@gmail.com>, Lionel Cons <lionelcons1972@gmail.com>, Cedric Blancher <cedric.blancher@gmail.com>, freebsd-arch@freebsd.org, FreeBSD CURRENT <freebsd-current@freebsd.org> Subject: Re: RFC: Solaris style extended attributes for FreeBSD Message-ID: <CAM5tNy780RyypcDiPAYpUOaHNfApftHRVNtZrEQAhQUdCZTuoQ@mail.gmail.com> In-Reply-To: <aBfqDCVTD3FTQF8J@ragweed.eden.le-fay.org> References: <CAM5tNy6wkfPRUpkyHB3h6=fhJHf-eFSWWNdeHV5VLA_xG7pGDA@mail.gmail.com> <CALXu0Ud3zmq_19BqcZpTOhOzLCcoG5ix3eq8pxU1r_xUgA-s3Q@mail.gmail.com> <CAM5tNy7QsM9t8xqrvyw1HicKrc1wpkyxTgfLBoVnP%2B1x99jn7g@mail.gmail.com> <CAPJSo4Xu4aCtOh5krcM%2Brw3yNj1vsMSaHPQQ-HQ=2QC-jjScng@mail.gmail.com> <CAM5tNy7gati2fmVrnnnqvyy6B6p5AzVbsThWn8AOXbUkkiLedA@mail.gmail.com> <aBfqDCVTD3FTQF8J@ragweed.eden.le-fay.org>
index | next in thread | previous in thread | raw e-mail
On Sun, May 4, 2025 at 3:28 PM Lexi Winter <ivy@freebsd.org> wrote: > > Rick Macklem: > > I have coded this, but having a pathconf name for something that is > > specific to a file is a bit weird. kib@ has suggested that it might be > > better to do it as an ioctl(). > > > > So, do you think a pathconf variable is preferred, since it is > > "Solaris compatible" or an ioctl()? > > ioctl() on a regular file to discover its attributes sounds rather odd > to me. all else being equal, i would vote for the Solaris-compatible > method in the name of compatibility, since Solaris has supported this > for >= 20 years and i imagine a lot of third-party software has adopted > that API. That was kib@'s opinion too, so that is what I have done. In general, all source changes except for ZFS are now in main. (I still have some man page patches under review.) If you start with an up-to-date main based system (a new snapshot should be available in a couple of days), all you need to do for testing is add the ZFS patch found here: https://people.freebsd.org/~rmacklem/zfs-xattr.patch or https://reviews.freebsd.org/D49654 For those not familiar with FreeBSD: # cd /usr/src # patch -p0 < <above patch file> # make buildkernel # make installkernel # zfs set xattr=dir <file system> - Reboot and you should be able to test things. main now has a Solaris like runat(1) and there are also these little test programs: https://people.freebsd.org/~rmacklem/xattrtest.c https://people.freebsd.org/~rmacklem/xattrtest1.c https://people.freebsd.org/~rmacklem/xattrtest2.c I have not yet put aliases for the Solaris arguments in the .h files (I'll propose a patch soon). Until then, for Solaris software that uses Solaris style extended attributes, you will need to replace.. O_XATTR --> O_NAMEDATTR _PC_XATTR_ENABLED --> _PC_NAMEDATTR_ENABLED _PC_XATTR_EXISTS --> _PC_HAS NAMEDATTR Good luck with any testing you might do, rickhome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAM5tNy780RyypcDiPAYpUOaHNfApftHRVNtZrEQAhQUdCZTuoQ>
