From nobody Tue May 6 21:05:23 2025 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 4ZsWBp1DKRz5vRCs; Tue, 06 May 2025 21:05:38 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsWBn37yLz3jgM; Tue, 06 May 2025 21:05:37 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=UlaCnXN9; spf=pass (mx1.freebsd.org: domain of rick.macklem@gmail.com designates 2a00:1450:4864:20::52a as permitted sender) smtp.mailfrom=rick.macklem@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-5fbcc5aa54aso1360383a12.0; Tue, 06 May 2025 14:05:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1746565536; x=1747170336; darn=freebsd.org; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=gfuOzrdI0ouC39MCphqT2czr3ReeuTDBYzE5+31/fHw=; b=UlaCnXN9eFk645DlSWetnFvjFrCyoyCLXDCOAQwD0z1s8H2XI9E9jO1jJx7w6E/u7L CbXlDr3fEagUFDeY5q3YiBLkxNqv2dSUgIRaZuHBelTwoeJseSv+9tws2eEFN3dAfes2 7DAt42SuFcR3gtSO4gV39/VyAEMv73pnsZzymOfpB26THtzzW13kQZCU83JyknzeZ26C rG1HlKl7VMg9JkViWxYn6cT4K+bkyt6oE60EKSHM3dus87I44dA0tcbhKGvhXb0wyiFS EbkzcTq7qzTOpsd7m8CW1UlB4a5nKj32L0O3YNWtbjYr/z3wDQo2S0gw6+L+mjiCm21K ABKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746565536; x=1747170336; h=content-transfer-encoding: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=gfuOzrdI0ouC39MCphqT2czr3ReeuTDBYzE5+31/fHw=; b=Cf1+Fcr7djaK/tbxmEFbkPPYtRBefwJDdQ1pLKfGTiBDDybsAY7araCP12gM64e/eB AE8pVP/+zUDd0smJQlDx6oDwIGxfF4qo+fG6Y2CdeMjLr20DrN2eezNBX+j5B+yYMgnw bly7K1ncAy/s5veTBMDC3O6SzcJ5HVZ2E+LA/aVxZhPFdvd7K3KkEICrPNHUp5Pd+/xv mUuipzJms16hxGRYj9WcIodmoLk76TJLY/sKdxGqcUawGWeXAwrMFDFqhpSg+NtR8vBK TNJiItqQhe0SjRAWNYCwcxiqRA+gIRChzdCm5y6zFRKkSxlyueWy/MNgB/Tkhm+btvk5 JUxg== X-Forwarded-Encrypted: i=1; AJvYcCVWL4IykvNskrcUOMk+CRbJK28hXriKZmuHNX55rI1Bo+T5398SOfYUCJYpywobFUciOT9LaoPP1tzxSU+awIKS@freebsd.org, AJvYcCX5VV/TJxHkDsNyz8NF4Axj/MHzMUV0plYwOPwpKsjkcYnMaConLG5gr1aXDZRdGau6ckdj6AUZ9NIQIcw=@freebsd.org X-Gm-Message-State: AOJu0YwgAuG63t9k8wdbRndSMvSGybPWUA/X6p1QdzlKZuQQC4gi9+Ut 2zQWPPZw9zyZlpjXBpbYy/hMSzia46p568RGHXkOfbRyHdsJl7do/nmOvxWr1i0MKF3tDT+TBcW JoUOim6XVest43DQP9eQEW9d8Rw== X-Gm-Gg: ASbGncsVUgj/I1ky9SbgdV24ZxWIw4W7AnvLtWtFD6A+5iY+ko23C/biOkokHRHwAoe OiXyLh72mAVQ55m4xVygoZUWeEiy/YJgFw4QKJrNV4IehdLS+ncQbJp1G0rindfVNjavbamKeKk RmpYFN8ccE3XGIW41e6kgJTSOVJ3j6y/FHgGlya3OmvlePpkXzqnI= X-Google-Smtp-Source: AGHT+IFcXrdhuXZg6OemXGisJm/zSD8CzD3MM4uAnkh56C7wtJQfapD+h+RDersYsj0DFbvUJXADSW15E2UiVIkqLsE= X-Received: by 2002:a05:6402:524b:b0:5fb:d4a5:a3c2 with SMTP id 4fb4d7f45d1cf-5fbe9df633emr633794a12.10.1746565535566; Tue, 06 May 2025 14:05:35 -0700 (PDT) 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: Tue, 6 May 2025 14:05:23 -0700 X-Gm-Features: ATxdqUHCS3xadkg23j-IZHwiIZAcTpQBXpqesH7bKwb2DxvrUWyjqyz96X0yg5g Message-ID: Subject: Re: RFC: Solaris style extended attributes for FreeBSD To: Rick Macklem , Lionel Cons , Cedric Blancher , freebsd-arch@freebsd.org, FreeBSD CURRENT Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4ZsWBn37yLz3jgM X-Spamd-Bar: / X-Spamd-Result: default: False [-0.60 / 15.00]; SUSPICIOUS_RECIPS(1.50)[]; NEURAL_HAM_SHORT(-1.00)[-0.998]; NEURAL_HAM_MEDIUM(-0.98)[-0.984]; NEURAL_SPAM_LONG(0.89)[0.886]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; TAGGED_FROM(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::52a:from]; FREEMAIL_TO(0.00)[gmail.com,freebsd.org]; ARC_NA(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; MID_RHS_MATCH_FROMTLD(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; MLMMJ_DEST(0.00)[freebsd-arch@freebsd.org,freebsd-current@freebsd.org]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_RCPT(0.00)[]; MISSING_XM_UA(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; FREEMAIL_ENVFROM(0.00)[gmail.com] On Sun, May 4, 2025 at 3:28=E2=80=AFPM Lexi Winter 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 >=3D 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 < # make buildkernel # make installkernel # zfs set xattr=3Ddir - 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, rick