From nobody Thu Aug 07 21:15:29 2025 X-Original-To: dev-commits-src-main@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 4byg1G2cncz63VnY; Thu, 07 Aug 2025 21:15:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4byg1G0KHNz47cT; Thu, 07 Aug 2025 21:15:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1754601330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kbguCeWxyTRe3n8lIWWAi71Mq3Z/5pUZvbghMm2gxt8=; b=PWyqG2koxbwCZlnLhAj9cU5Iy1Ha675Iw0oL+xgz2fkTg3ejz479OfNwhbKt035cVDAl0R YvlQ0N3EkEHwBe5Zr3EfHSv5BHdoaUNyabcceIX/oGjrhr7o77pNP2WaL7h2ZW9cKf4Iq5 FXoKWesbDAE/OTkX+Q02406+p/4rTmB0uRisoOsUlapEV5RSD0Qt5vZCL6WBs4ut7uuz+v bIUz2ZwkpDhudlMnPclGW3jTgc7mgLSl3eGR4joWUPjtDSfYQ6mxfla4aEZZFZg4Nd7LCm 6cy4Dq/Fh7RvcImzkeSgpB4gIafysNC+EwQKAzl/RBVzAnhyh9Gfuj9XILJqPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1754601330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kbguCeWxyTRe3n8lIWWAi71Mq3Z/5pUZvbghMm2gxt8=; b=kwaJgUvZ7BJi6fLf12Ga/CCf8ZjYT21r224h4bn+rRcfcQ1dgQ0ugoBZlFolcC5fIBMKF4 oHNsgxKHpr3P7lMX2z+EjiD0RmfrAPoP27a/SNBSLKmB6bM+xjS9I8QTdVxtlqOOtTtHhn 6eLMaEsv+KhtWYUPqHYGyJnrj2Gmymhs/76y4Iq485HmxABx2FuVB34zHtWq94D84WKYs5 FyXDbwy197J/4DYkMPi1cUFBP3ysMs+aq7fvJMMo+bI3r7m97t8KS1iTI1Oezt4HrPFYiX 3Pjjr9zjSeiQoiL/46yiMIyTFrsH/wlsa1hslG4kpFbIrTRzmvWx15dAoELqNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1754601330; a=rsa-sha256; cv=none; b=wov//XROYI1yrm7GNbjh+Z4fRDO9iG1waWV4mMmmChe4tluZ4DFKRVgh2mxweg3dFqdc4p eEOc3PMhOtWq0jrSowvXyq13NN1t0+CglTNsVvlSLQ41WSc9Qv5JTFn5ey9qcv9GKlVk/f KPySvpgUcq/wZ2P+jKiiCpx/9Ptm4pLJAV72OkHxQDqivOntWX3vEKU98X5SKNDaALJ3iX aDjxnM9343qNphBzk7kCXY9mRyjpA5Jnaz2xtG7Yr+7vF5+0fHm78kZirrU0ij+Y5ub784 FRDAWp0nwEhPUL2MjadbItA5aVdpClF9a0pvBddDG1qVH300CNKoxLJhSsjyUw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4byg1F6FbSz1LqP; Thu, 07 Aug 2025 21:15:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 577LFT6S099471; Thu, 7 Aug 2025 21:15:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 577LFTTK099468; Thu, 7 Aug 2025 21:15:29 GMT (envelope-from git) Date: Thu, 7 Aug 2025 21:15:29 GMT Message-Id: <202508072115.577LFTTK099468@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 3a6c62e69597 - main - named_attribute.7: Add an explanation for a quirk List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3a6c62e69597b012589e1f2f5465747e37ab0f13 Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=3a6c62e69597b012589e1f2f5465747e37ab0f13 commit 3a6c62e69597b012589e1f2f5465747e37ab0f13 Author: Rick Macklem AuthorDate: 2025-08-07 21:12:37 +0000 Commit: Rick Macklem CommitDate: 2025-08-07 21:12:37 +0000 named_attribute.7: Add an explanation for a quirk I thought I would be able to come up with a ZFS patch to avoid the possibility of there being two attributes with the same name for a file. This can only occur if the two attributes are created when xattr=sa and xattr=dir respectively. I have not been able to fix this, so this patch documents this quirk. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D51751 --- share/man/man7/named_attribute.7 | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/share/man/man7/named_attribute.7 b/share/man/man7/named_attribute.7 index 4080dfce2fab..a0599ef71496 100644 --- a/share/man/man7/named_attribute.7 +++ b/share/man/man7/named_attribute.7 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: BSD-2-Clause .\" -.Dd July 20, 2025 +.Dd August 5, 2025 .Dt NAMED_ATTRIBUTE 7 .Os .Sh NAME @@ -153,6 +153,31 @@ property to will make the attribute(s) visible as both named attributes and via .Xr extattr 2 . +.It +For ZFS, it is also possible to create two attributes with the same +name by creating one when the ZFS +.Dv xattr +property is set to +.Dq sa +and then creating another one with the same name after the ZFS +property +.Dv xattr +has been changed to +.Dq dir . +The one created when the ZFS +.Dv xattr +property is set to +.Dq sa +may be removed via +.Xr rmextattr 8 . +.It +To avoid these issues for ZFS, it is strongly recommended that the ZFS +property +.Dv xattr +be set to +.Dq dir +as soon as the file system is created, if named attributes +are to be used on the file system. .El .Pp The named attribute mechanism/system call interface provides certain @@ -288,7 +313,8 @@ enters the named attribute directory for the file object .Xr truncate 2 , .Xr unlinkat 2 , .Xr write 2 , -.Xr zfsprops 7 +.Xr zfsprops 7 , +.Xr rmextattr 8 .Sh HISTORY This interface first appeared in .Fx 15.0 .