From nobody Sat Apr 26 15:14:00 2025 X-Original-To: freebsd-arch@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 4ZlCsy33xdz5vK3B; Sat, 26 Apr 2025 15:14:14 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) (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 4ZlCsx5DZgz3hVD; Sat, 26 Apr 2025 15:14:13 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=JRYJmqyU; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of rick.macklem@gmail.com designates 2a00:1450:4864:20::536 as permitted sender) smtp.mailfrom=rick.macklem@gmail.com Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-5e8be1bdb7bso5150472a12.0; Sat, 26 Apr 2025 08:14:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745680452; x=1746285252; 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=dbg0Qr6FMEja6aAhz5OvXIIIOunroMN9zmtJLljYap4=; b=JRYJmqyUj7oHUEywP7KDTj9UgpKsTEf9iMjF+qIEbfWjMG56x2bLK4/IcPjEaWDH0Q assZgGoIAzDH96MUxehVLY6HErLOnmXeHN6pX/H4g45AKqgxWeO2SObxJNJyNDjHLf7Y gJThB+ju2XHndQF2pSCzFnXKP9cIgBhnmtqVD2FeAhIDhyUKpV/irZv+M3k+xPWFm1K0 +d+wAx+8uo8bZpxjzqAQM2xKYvCbq2KOGzr1FkejDke4hTCOB6HiIhyM7GoqN8wwpQRo aLlZyboqZG+MeKYmyo/lN7okfMxdvwG2xHesFtGs2bn1Ftt9yEV0rLqE2f1mUKZn6++u INzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745680452; x=1746285252; 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=dbg0Qr6FMEja6aAhz5OvXIIIOunroMN9zmtJLljYap4=; b=twWwNybtSk2lVGlrVRkjXo86swYWs93Jt2GoXafCUL/d6iGcpSAfpKvsg3jCQ+y6xu fOZ+N5C3afVoIHlMY4Nfgv27jmVSCWUxHPoggDnrmYxJyqXnkiAX5Z8ENgNsEHSVOMkn PZgox/uJiiwXpYZCpVfJil81JKB7L9JJmZauP+a4JObR1wvDo+tolE6tWaH0O85ByqvI KisQjXXQZfFKDJEwVANbKgVNEc3r11wm9av21Pzzmzk+c4S4siSvtVjoa2NTJqUr+w9Y H19aTGXyNIVe12uIUjLfC/yUeN0v0pyMJPrR8MkRJYHcOLVqG5+tRzItkJm1bb16AnjW BUIg== X-Forwarded-Encrypted: i=1; AJvYcCWHiJv5I2qK2FLk5ciCcDs/DVTMZDA/VFtmAjcb2JDL0vA53/gHnLjgVge9h+FXaRIZ6DPn35C/qyx72edcM4s=@freebsd.org X-Gm-Message-State: AOJu0YztxXRh6H1RV/UR75vOlDi6JllSQW5LpLlUlepXkkVuwFejJIOY lNkIBHZSK7d9xuD3arjRD+WdKjtU7FvRMdU/s8/v80sPm3wOrhP0s/igIlQmlgIpPsODeJYu4QG iKCqq7bAZt3kjAUCWbsDGMHOPXaRj+Ag= X-Gm-Gg: ASbGncuX7sr73UfrBN8sEDnby0An9YAuFiUYFlDaImIm6eBKZfYsluG0F/Td5Tut1n9 gP6L0yeXCMVFs7vdqjlVBKE2nYH6kKy9XyI4m91U4M3D3pk/zcEvDuFsONvt6lt8tqETZ4U05SO 5tHdkFV0YPyzWx/XCG1+pn9aKi/0iyLf3ZMUQhsevqQB6gOqDjmEX6Sg== X-Google-Smtp-Source: AGHT+IFo9x1RR8QNzpwa0xsogDhALwSwrLkUIKkxSowO/Ok53Qzr7yO1XMkWpoO98tpgGaVIO0Xtb8lQMS8i8dLcy/8= X-Received: by 2002:a05:6402:5249:b0:5ed:2e84:4f1f with SMTP id 4fb4d7f45d1cf-5f72352b03bmr5201572a12.22.1745680452008; Sat, 26 Apr 2025 08:14:12 -0700 (PDT) List-Id: Discussion related to FreeBSD architecture List-Archive: https://lists.freebsd.org/archives/freebsd-arch List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arch@FreeBSD.org MIME-Version: 1.0 References: In-Reply-To: From: Rick Macklem Date: Sat, 26 Apr 2025 08:14:00 -0700 X-Gm-Features: ATxdqUF4nP120f8X46blOBV5vaCRz-zdyUxWIofRFV5oIKGkmSVbodpLQXG0Ox4 Message-ID: Subject: Re: RFC: Solaris style extended attributes for FreeBSD To: Cedric Blancher Cc: freebsd-arch@freebsd.org, FreeBSD CURRENT , Lionel Cons Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-3.91 / 15.00]; NEURAL_HAM_LONG(-1.00)[-0.995]; NEURAL_HAM_SHORT(-0.99)[-0.994]; NEURAL_HAM_MEDIUM(-0.92)[-0.920]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_TO(0.00)[gmail.com]; TAGGED_FROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; FREEMAIL_CC(0.00)[freebsd.org,gmail.com]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::536:from]; MID_RHS_MATCH_FROMTLD(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; 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] X-Rspamd-Queue-Id: 4ZlCsx5DZgz3hVD X-Spamd-Bar: --- On Tue, Apr 22, 2025 at 3:34=E2=80=AFAM Cedric Blancher wrote: > > On Sun, 9 Mar 2025 at 00:02, Rick Macklem wrote: > > > > First off, I cross posted because I don't think many read freebsd-arch@= . > > There seems to be a nice market for Solaris style extended attributes. > > Since ZFS is already wired for them, adding the basics is pretty > > straightforward. I am not suggesting that they should replace the > > current FreeBSD extended attributes. > > > > For those not familiar with them (I am not very familiar myself;-), > > a Solaris style extended attribute is in a directory that hangs off > > the file object and the entries in the directory (the attributes) can > > be manipulated with open/read/write/lseek just like a regular file. > > (They can be as large as a regular file, but there is no atomicity > > guarantees.) > > > > At this point I have a couple of rough patches: > > https://people.freebsd.org/~rmacklem/xattr.patch - the VFS/ZFS part > > https://people.freebsd.org/~rmacklem/nfs-xattr.patch - the NFSv4 part > > Any timeframe when > https://people.freebsd.org/~rmacklem/nfs-xattr.patch will land in > FreeBSD? Should be in main in a week or so. I have already done one patch commit, but there are a few more needed. On the bigger picture... I have finally gotten Solaris going in a VM so that I could test stuff on it and have found a couple of incompatibilities: - I required O_CREAT for nameddir_fd =3D openat(file_fd, ".", O_NAMEDATTR, 0); to create the named attribute if it did not already exist. Solaris does not require O_CREAT for this case (when used with O_XATTR) and actually returns EINVAL. Solaris just creates the directory if it does not already exist. Changing this is a trivial 2 line patch and I think being Solaris compatible makes sense. I required the O_CREAT, since I was thinking the syscall without it could be used to test to see if the named attribute directory exists, but I am not sure if that is useful? Do others think I should change the behavior to be Solaris compatible? - Solaris allows hard links to be created to a named attribute. I did not allow this, since I was concerned that having links to the same attribute for multiple file objects might be confusing. Do others think I should allow them? Thanks for any input, rick > > Ced > -- > Cedric Blancher > [https://plus.google.com/u/0/+CedricBlancher/] > Institute Pasteur