From nobody Sat Mar 08 15:42:42 2025 X-Original-To: freebsd-hackers@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 4Z96qs1YcXz5pMqM for ; Sat, 08 Mar 2025 15:43:05 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) (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 4Z96qr30R7z3Pqs for ; Sat, 08 Mar 2025 15:43:04 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=PyXX0FWI; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of rick.macklem@gmail.com designates 2a00:1450:4864:20::533 as permitted sender) smtp.mailfrom=rick.macklem@gmail.com Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-5e5bc066283so4347168a12.0 for ; Sat, 08 Mar 2025 07:43:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741448582; x=1742053382; 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=QPyqElymt5HQx9NHrd1SjGXuu1cerIAPkTlSa3CxSpA=; b=PyXX0FWIef/WA85qXTpcTQiYEc1Qdw1NtuKRlw6V6H5JBdmHoH4w0W+qKmAIWDtYDG /7MWcfJH8HdXNH3JPKVD5ktPkdNaiMsLce9M1s8ugtqvUO1WTG1mUCeECjcfzoOsnjyc +0ZxnBs1v9AaZIp6nWaFLplCfyE7susOPsk2otIs3di/5klVs/ycyyL8i/hQCU5mZSet U5HA8qDJtZKpPydu6q4QLsBhNY/au1MrIoG6s6jrx0VCjenclXfPa4schNVl+QR6H7Dk crwLR7F8WQp1/H+BoSl/61eIpb832ILXHY3+OW98HxFn/ZshXVpMuMCf0lUY9qqOQfUk 9VZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741448582; x=1742053382; 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=QPyqElymt5HQx9NHrd1SjGXuu1cerIAPkTlSa3CxSpA=; b=qkaX1FmyNOx60uQCAShsOuB15+udc0Kh93004WfJn1IcYMDYzTkREgpVLOcvT7tjh0 sjJA6aqE7IUrJkF3P4HHRbPbuB7fVxeQgSuLDmhXZD+br4F3DAEXme+9yX2XCX9jlMDI Q94Rhyuy1saG8f09ej/ML1Lf8EIokLyKaV798JiuQ7ooeMSJKEPA/l2Hk9ehKzzT8q6l 5kCEr6JXF8e/bEXh6LHTy7ObzMQbpP9DbzPtrDfE3Hoy6VKZLeUxuFc2v3jZj+8wRKxb wT1j3RoLVbiLHtN4r+7gv3BRpaon8hl8bSZlXqAJzXw5r7pEZGhpqnroSIkPzjQED3Ox 0qjw== X-Gm-Message-State: AOJu0YyKmwIRNMb0m2itLEr//viIbpZ+DCioqchr6PLRT817pbzuihYS xR8w1WTHxnqCN6WoHLp0y2dwCOIiRRN1k6fqJa3Afu/sLGbv6ea/fVcv9kMs3ZLQy8KwFpxw1S4 kldGrzfRm78sHpQfW7BiOmDdqEA== X-Gm-Gg: ASbGncvBQamTNDGtfWgkXFxQtmafeby7saKzVGmdE+MwflHY/MZVEvXK2WQU0mQP5v/ zXyLZXBWYdaVpEJfn/riwjWWOuklAO/nJytLczvGMNs/ZQ5ZePY9ZoRL+uP3vviSWImbw49egVI 93vO1ctT1lGDcgB8P5Ku/xGRPsMVQVTXSyiPV4pd8+ifNkWTgerITamAoOag== X-Google-Smtp-Source: AGHT+IHlVmWFISaNJ7zd9k4yBUVCsj0+CUPSoiuu7bxvo8YSsjS/n7eXuTLWcO8NLaFOMQnkB3cNurpjZGSHA29ql50= X-Received: by 2002:a05:6402:5207:b0:5d4:1ac2:277f with SMTP id 4fb4d7f45d1cf-5e5e22c98a2mr7905465a12.9.1741448580995; Sat, 08 Mar 2025 07:43:00 -0800 (PST) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org MIME-Version: 1.0 References: In-Reply-To: From: Rick Macklem Date: Sat, 8 Mar 2025 07:42:42 -0800 X-Gm-Features: AQ5f1JoJgUnNPf4D6J0JCWo6zMVQKsAp4yQyquOXl1HQjMulmkpsn_FVO48hfiQ Message-ID: Subject: Re: FreeBSD NFSv4.1 nfsd, named attribute support (OPENATTR)? To: Lionel Cons Cc: freebsd-hackers@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [2.87 / 15.00]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_SPAM_MEDIUM(1.00)[0.999]; NEURAL_SPAM_SHORT(0.97)[0.972]; NEURAL_SPAM_LONG(0.89)[0.893]; 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]; FREEMAIL_TO(0.00)[gmail.com]; RCPT_COUNT_TWO(0.00)[2]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; RCVD_TLS_LAST(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MISSING_XM_UA(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::533:from]; DKIM_TRACE(0.00)[gmail.com:+]; FROM_HAS_DN(0.00)[] X-Rspamd-Queue-Id: 4Z96qr30R7z3Pqs X-Spamd-Bar: ++ On Sun, Mar 2, 2025 at 3:48=E2=80=AFPM Rick Macklem wrote: > > On Tue, Feb 18, 2025 at 4:14=E2=80=AFPM Lionel Cons wrote: > > > > On Mon, 20 Jan 2025 at 13:15, Lionel Cons wr= ote: > > > > > > On Sun, 12 Jan 2025 at 16:50, Rick Macklem w= rote: > > > > > > > > On Sun, Jan 12, 2025 at 2:09=E2=80=AFAM Cedric Blancher > > > > wrote: > > > > > > > > > > Good morning! > > > > > > > > > > Does FreeBSD NFSv4.1 nfsd support named attributes (e.g. OPENATTR= ), > > > > > per https://datatracker.ietf.org/doc/html/rfc5661#section-5.3 > > > > > > > > > > ZFS and Solaris UFS support named attributes (via O_XATTR), does > > > > > FreeBSD do it too? > > > > No. fork files/resource forks (or whatever you choose to call them) > > > > have been discussed multiple times. > > > > > > > > If I recall correctly, one showstopper was fixing the archive tools= . > > > > There was also the generic argument that Linux doesn't support them= . > > > > Then there was the issue of what VFS/VOP changes were required. > > > > (The FreeBSD VFS carries vnode locks across VOP calls and is at > > > > what I would call a lower level than Solaris.) > > > > --> Which all comes down to who will do the work? > > > > > > > > If I recall correctly, there was a time when a group associated wit= h > > > > CERN needed them to transition away from Solaris. > > > > > > That was my team, and there is still the need to do it. What keeps us > > > FRUSTRATED is the lack of progress. Well, and "no", we cannot do it > > > ourselves, this is well beyond the expertise my team has. > > > > Does anyone have any suggestions on how to proceed? > The patch found here does the very basics for ZFS (no NFSv4 code yet). > https://people.freebsd.org/~rmacklem/xattr.patch I am updating this patch regularly. What is missing are mostly the "don't do this to named attributes" checks for other syscalls. I'll be adding those soon. I have done nothing for userland. I am hoping others might step in to help with that. --> I do need opinions w.r.t. what else is needed (if anything) syscall wis= e. If you want to see this proceed, please test/look at the patches. There is now also a patch for the NFSv4 client/server to use the above. https://people.freebsd.org/~rmacklem/nfs-xattr.patch. https://people.freebsd.org/~rmacklem/xattrtest.c is the simple program I am currently using for testing. rick > > It will only work for a ZFS file system and I think you need to set the > xattr property to dir. > Once you apply the patch to a kernel and rebuild/run that kernel, > you need to copy /usr/src/sys/sys/fcntl.h to /usr/include/sys. > The attached trivial test priogram should work. > (It uses O_NAMEDATTR in a manner similar to Solaris, although > I do not have a Solaris system to play with, so the semantics might > not be exactly the same?) > > If people pick this up and test it, I will be inspired to continue to > work on it. > > I will come up with NFSv4 code relatively soon and put this up > on github someday. I have no idea if this will ever make it into > FreeBSD's main? > > rick > ps: See the attached trivial test program for how to use it. > > > > > Lionel > >