From nobody Fri Apr 4 13:37:41 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 4ZTfmx5p94z5sHnc for ; Fri, 04 Apr 2025 13:37:53 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) (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 4ZTfmx3zsdz43GY for ; Fri, 04 Apr 2025 13:37:53 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-5ec9d24acfbso5780900a12.0 for ; Fri, 04 Apr 2025 06:37:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743773872; x=1744378672; 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=WCTGY8/a7kZe4m0qvhIMHjMhBOg1GkoJ2iFs5WzcOII=; b=e1XDpR/nfqdEpDkPzeuAom/TQEH97PP7Qga3LidYOGpUw1UEsXYGszzSXdO3VqlHZ+ 9gMV7lgQuY6sWdVWYObGlTFBORLTqxPaf6Ah6xg1NqrPnVdHpfsB/NZC5bMvSKEi8LW2 gG8t87cft56TAyGqMEhbT95HLuZKD/4T8nvOQ+Tbl8F4v6YxU/EhIkcoSP2Pukqz7Wuy VbljK4qiJD+LkJ/8904tKmmItBr8Ko9rZFXEZ57ftVAtwMbM54UWPL/NgjeU9a0/k90y bin+j7h4VxW2rj1j/piJNeRwOkJ4Xdt96lXfiZEs3SzcGbOdbB0w0/+hY/TpX306v1aq zn5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743773872; x=1744378672; 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=WCTGY8/a7kZe4m0qvhIMHjMhBOg1GkoJ2iFs5WzcOII=; b=CUNz3knT9J3MM8pMiHrBDyywP3JzEeq+pnFVG0fgRQqxBc3ppeI2767coRDfdX94Ax HP1Skz3VZkAVprmt/Qls1OMahKWrS/m8YMMjwiZJkH3lVpacYQ8b4cx0Wl7NPYDnoq0I 4IItOmA2H3zfQuc1hiCUZCatYLhc23JCqSewIZ56+SDcIc/EQ6/O/Y17HHhweV5CMNn9 vLo3MdJebYgEykOyYmU3fCjzsI9xKffs68LlrtRNXO74qrQ9miaia6g90n+wjZeiD5U0 hfeOPp6PrlwptJE5EQPP1rXcbc2Ilq/X/d03CBrXvF1ZtZYvzghK7TGnxoa4EojNK78b R2+g== X-Gm-Message-State: AOJu0YwtghFXR42E8xGUPCFFWMSliV3zeMwBE7hysCcm0BP474dETS5x lwj3krL3NL51A3IcqMjO3jP8ZIj5iUhfSunGCpTx/nYEYcLJAJMOGxdOUXYFPsh2hLjEZ1JhUGs KDYvWq76HDLNKs1sF/fsz7BgwuaN+wjE= X-Gm-Gg: ASbGncsbJjOBs23jyH/Mw9Y0VjCJNtGMz3LC51DM4iwXYuK5laM/YE4GsqldURh9ft5 TQaRte5Sx5JTW9fMYOfb7Irtd7k63O/msOPV+cEIRDYMN/P+0Bb1JlO7clkd+4DE/n+iJDboVUb breDn5rxkYJkGtcmc5ANONDy+kOjI5osfP42gN9qqdDrXrJxF6/ejt0RwMzD0cXBqT0ak8 X-Google-Smtp-Source: AGHT+IFHoN3fWYlmQOubeCFYbNbhUIrD1mMB5CqsWKrqckeSlph0L7o04FNH6rFST6Ut8GnNHQv8lAA3bUVd3RtOFN4= X-Received: by 2002:a05:6402:1ed5:b0:5e0:752a:1c7c with SMTP id 4fb4d7f45d1cf-5f08412c7bfmr6341349a12.1.1743773871770; Fri, 04 Apr 2025 06:37:51 -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 06:37:41 -0700 X-Gm-Features: ATxdqUF0oESy-x0utIAbtNm7lZp3Zm_Xex755Tb_8XmyRGJxIbpWUWvEkkxv4Ag 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-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4ZTfmx3zsdz43GY X-Spamd-Bar: ---- 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,nd= a0) > 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=3D1 = \ > > 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# > > 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. 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 >