From nobody Fri Apr 04 14:25:39 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 4ZTgrK00tdz5sMHN for ; Fri, 04 Apr 2025 14:25:52 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) (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 4ZTgrH2whYz47Z0 for ; Fri, 04 Apr 2025 14:25:51 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=N3wBLyaN; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of rick.macklem@gmail.com designates 2a00:1450:4864:20::535 as permitted sender) smtp.mailfrom=rick.macklem@gmail.com Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-5e6ff035e9aso4104532a12.0 for ; Fri, 04 Apr 2025 07:25:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743776750; x=1744381550; 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=Bxbo/uZj0wBMpH/oTna14hgt8z1Sbhv0tDT/+j7/MSI=; b=N3wBLyaNOOEoFlZiIyM/nxoOaSzGuaHijEGk4V6BBH4f3wy95k34kR+1blejzxrDWR qUerwrooxFA9mxzV50Wahg3NhEQWT3pWzFdRbgKf+ukJ5nkVh40tTAo1P0ZhJ8hFqXIO caGVHflJS2htHKHAxDCYsOFr5/vnZvWDuV38rsmRjW0raUVSUzlYJc0QT3PxgtwLu0E5 e8ljY0CuBe1IBcGEqBdTXAKjDoSZ2q8IgX7dNRp5TcTP41dqR9isbsnEKDlTpz9ji1Uj 9K82c9+BGUlr50tMI8x7jovVZwiH/URSAw4H8Q/3HiX+vLzcXrNzeSbEOV80uWPi083L 30WA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743776750; x=1744381550; 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=Bxbo/uZj0wBMpH/oTna14hgt8z1Sbhv0tDT/+j7/MSI=; b=qU3qzA+lC7ZhbH5aQadImAUtP+cY/7jUQoeN4bAD6W3nZauGazZUL7onW0K2xglTLK MZqbI87GRKmV3QlrZpTzd2BsogPK/q9LwJCkWM4nEgJSGNXhX+zLPuDc/8SV/oidE6Qo Z6ibpbjKtY2eSVbVTdjRzx/Tqipd+480BmtrT9Jn8OF8lBtZoA9SaN8hnC+TDhFa14cs RW7k7qlEX2i4tFsC5eBl9oh7TmAfijUxk3eSpjD42hazbLw/QZrU6PC5kbq5/bS7HzkT lDG6CG/D10U3m2JM0fTqssNaFL906GkorvnEJOTXHrx8yxzlaSaIjFyCiKO3c/MmeW9w VBHQ== X-Gm-Message-State: AOJu0YzdLx+5WEgH9vVyp6keDOm8vr0YjnjSVaKyh9AA6/s5XkYwxulX KvHJd7dc6vk1ZzEWjtsraWd346CpvUJzem5jEJYXjJqK5ulUPybdrIPS61uPsPgAtfHj3bayyZY n3NQ4HBvym3UmA1U6IctjJ6+683ktidM= X-Gm-Gg: ASbGnctsGSUS3W5+diQFBV+lWbP0r/8rineR/hudklF8mQTo2o+0AnHRYz/FTIHUM/V 9HmRNPh1OrdP90pbi/FFFQPL29pHsEDcc4esUwGOyzKKb0CTRuecfE4QguapdzJD09TTgcirhdQ ftMluRkADV5vmp8gx/QlyCzfan5Q3Xdd560Ub4L1Tdr3/DoR8fz7cnkF4Kgg== X-Google-Smtp-Source: AGHT+IE9ccJnRTPT9u/ftDUMWu/iOoDldnZIagXJeRrEQZkPuIlSR+DjsgCX719GvtxBPbJoD1FAI8FyCbFpYYlJ2yE= X-Received: by 2002:a05:6402:34cd:b0:5e7:c773:ae35 with SMTP id 4fb4d7f45d1cf-5f0b3b6089dmr2784107a12.5.1743776749468; Fri, 04 Apr 2025 07:25:49 -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: Fri, 4 Apr 2025 07:25:39 -0700 X-Gm-Features: ATxdqUGXW6mWSxdn210X6MUb2DQBoramjG5W80tviwAbJzqJzsag1dSN8gIBQCU Message-ID: Subject: Re: Heads Up: commit 2ec2ba7e232d just hit main To: Dennis Clarke Cc: freebsd-current@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-3.73 / 15.00]; NEURAL_HAM_LONG(-1.00)[-0.999]; NEURAL_HAM_MEDIUM(-1.00)[-0.997]; NEURAL_HAM_SHORT(-0.74)[-0.736]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; TAGGED_FROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; MID_RHS_MATCH_FROMTLD(0.00)[]; MISSING_XM_UA(0.00)[]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; RCVD_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::535:from] X-Rspamd-Queue-Id: 4ZTgrH2whYz47Z0 X-Spamd-Bar: --- On Fri, Apr 4, 2025 at 6:37=E2=80=AFAM Rick Macklem wrote: > > On Fri, Apr 4, 2025 at 1:48=E2=80=AFAM Dennis Clarke wrote: > > > > On 4/3/25 19:52, Shawn Webb wrote: > > > On Wed, Apr 02, 2025 at 01:51:26PM -0700, Rick Macklem wrote: > > >> The commit 2ec2ba7e232d just hit main. I do not think it will > > >> cause problems, but it is fairly large. > > >> > > >> Man page updates will be done as separate commits. > > >> > > >> Hopefully this will not cause grief, rick > > > > > > Hey Rick, > > > > > > The patch review test plan mentions a patch to ZFS itself to support > > > named attributes. Is that patch available somewhere? > > > > > > Thanks, > > > > > > > I am a little confused but the features seem to be there even if I do > > not recall how to test : > > > > titan# uname -apKU > > FreeBSD titan 15.0-CURRENT FreeBSD 15.0-CURRENT #0 > > main-n276246-628d1501f7ec: Fri Apr 4 06:57:29 GMT 2025 > > root@titan:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 amd64 1500035 > > 1500035 > > titan# > > > > > > Create a new ZPool and then a ZFS filesystem with xattr=3Don : > > > > titan# camcontrol devlist > > at scbus0 target 0 lun 0 (pass0,ada0= ) > > at scbus1 target 0 lun 0 (pass1,ada1= ) > > at scbus2 target 0 lun 0 (ses0,pass2= ) > > at scbus6 target 0 lun 0 (ses1,pass3= ) > > at scbus7 target 0 lun 1 (pass4,= nda0) > > titan# > > > > titan# gpart create -s GPT /dev/ada0 > > ada0 created > > titan# gpart create -s GPT /dev/ada1 > > ada1 created > > titan# > > titan# gpart show /dev/ada0 > > =3D> 40 39063650224 ada0 GPT (18T) > > 40 39063650224 - free - (18T) > > > > titan# > > titan# gpart show /dev/ada1 > > =3D> 40 39063650224 ada1 GPT (18T) > > 40 39063650224 - free - (18T) > > > > titan# > > titan# gpart add -t freebsd-zfs -l fbsd15zfs0 /dev/ada0 > > ada0p1 added > > titan# gpart add -t freebsd-zfs -l fbsd15zfs1 /dev/ada1 > > ada1p1 added > > titan# > > titan# gpart show -l /dev/ada0 > > =3D> 40 39063650224 ada0 GPT (18T) > > 40 39063650224 1 fbsd15zfs0 (18T) > > > > titan# > > titan# gpart show -l /dev/ada1 > > =3D> 40 39063650224 ada1 GPT (18T) > > 40 39063650224 1 fbsd15zfs1 (18T) > > > > titan# > > titan# zpool create -O compression=3Dzstd -O checksum=3Dsha512 \ > > > -O atime=3Doff -O xattr=3Don \ > > > -o autoexpand=3Doff -o autoreplace=3Don -o failmode=3Dcontinue \ > > > -o listsnaps=3Doff \ > > > -m none tank mirror /dev/ada0p1 /dev/ada1p1 > > titan# zpool list > > NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP > > HEALTH ALTROOT > > tank 18.2T 588K 18.2T - - 0% 0% 1.00x > > ONLINE - > > titan 460G 44.7G 415G - - 0% 9% 1.00x > > ONLINE - > > titan# > > > > titan# zfs create -o mountpoint=3D/opt/xattr -o canmount=3Don \ > > > -o checksum=3Dsha512 -o compression=3Dzstd \ > > > -o atime=3Don -o exec=3Don -o setuid=3Don -o xattr=3Don -o copies=3D= 1 \ > > > tank/xattr > > titan# > > titan# zfs list -r tank > > NAME USED AVAIL REFER MOUNTPOINT > > tank 696K 18.1T 96K none > > tank/xattr 96K 18.1T 96K /opt/xattr > > titan# > > titan# zfs set quota=3D64G tank/xattr > > titan# zfs list -r tank > > NAME USED AVAIL REFER MOUNTPOINT > > tank 756K 18.1T 96K none > > tank/xattr 96K 64.0G 96K /opt/xattr > > titan# mkdir /opt/xattr/test > > titan# getfacl /opt/xattr/test > > # file: /opt/xattr/test > > # owner: root > > # group: wheel > > owner@:rwxp--aARWcCos:-------:allow > > group@:r-x---a-R-c--s:-------:allow > > everyone@:r-x---a-R-c--s:-------:allow > > titan# > > titan# chgrp devl /opt/xattr/test > > titan# getfacl /opt/xattr/test > > # file: /opt/xattr/test > > # owner: root > > # group: devl > > owner@:rwxp--aARWcCos:-------:allow > > group@:r-x---a-R-c--s:-------:allow > > everyone@:r-x---a-R-c--s:-------:allow > > titan# This ACL did not change because "group@" refers to the group owner of the file. Since you changed the group owner, "group@" now refers to "devl". If you want to see this ACL change, you could "chmod 400 /opt/xattr/test" and then getfacl it again. > > > > titan# setfacl -m group:devl:rwx /opt/xattr/test > > setfacl: /opt/xattr/test: branding mismatch; existing ACL is NFSv4, > > entry to be merged is POSIX.1e > > titan# > > titan# > > > > well ooops .... what was the idea here again ?? > Well, this has nothing to do with my recent commit. > > ZFS has always supported NFSv4 ACLs (and not POSIX draft ACLs) > on FreeBSD. (I actually am planning on a ZFS patch to add POSIX > draft ACL support, but I haven't even started to work on it. I do have > an IETF draft that adds POSIX draft ACL support to NFSv4.2.) > > If you look at the setfacl man page, it shows you how to set NFSv4 > ACLs. Oh, and to clarify it, ACLs are stored as "system" extended attributes, which this new syscall/KAPI does not access and, in general, anything else can be stored in extended attributes as well. rick > > ZFS has also always also supported extended attributes on FreeBSD. > They are currently accessed via getextattr(1) and friends. > The patch I just committed to main adds a different syscall/KAPI > that allows manipulation of the extended attributes in a Solaris-like > way, which is what NFSv4 calls "named attributes". > Since the ZFS patch in not there yet, you cannot actually use this > new syscall/KAPI (it will just fail with errors like ENOATTR). > > rick > > > > > > > > -- > > -- > > Dennis Clarke > > RISC-V/SPARC/PPC/ARM/CISC > > UNIX and Linux spoken > >