From nobody Wed Nov 5 16:10:06 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 4d1qzl5hHYz6GXVK for ; Wed, 05 Nov 2025 16:10:27 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) (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 4d1qzl59GMz3RJW for ; Wed, 05 Nov 2025 16:10:27 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-640c1fda178so5423678a12.1 for ; Wed, 05 Nov 2025 08:10:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1762359021; x=1762963821; 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=8L1q4GVOcBs9yA6YtQh1cgngjmKTW7DqtyhB2YHZa7w=; b=eCBvyd0zdnEvQfUBPZp2xHQjD7lP6cSE9HGYbRvv9Y1mA+FDFsPA02gci/wOpHt9wD 0PPSYs625NrTLxbTlrPrFOpRVZGVYCMa4pQzA6zPt0mTsGeT3lC1TegpHqk3AdnxaSW1 stTJm42t2esHZ89KZGl3jD9AxDl+g5kE2Q+b8/9ZSbyoHdPbOoAN301ni4DlBVkhW9VC UpcKxBcfQI3sVZLZ0nd2S1qYKy8wOGKCnsRjTAZD8vbY/1Ro2679ZAOFoz1EmOlZbOnq wSpKUgPqyDcpM5bVxSAWlJoEjycMTfKOAjbNenlwU5EuEskObG+2gS01C8Q8XTFUIvxe ZFng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762359021; x=1762963821; 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=8L1q4GVOcBs9yA6YtQh1cgngjmKTW7DqtyhB2YHZa7w=; b=S4B2nbgPSfZ4dr/TW3HU+qZtOKJdLNNUZ+rOUTiTSEgAtbtf6bm6IM0b8k5ULUmLRN RucrRF9xwhzDykWDGshGVA+ls3he8bR3Y3Y5ZXMDdyHhJklukvCG2/RmILPXelmkosgc ScmQ7qftWH2oa16Zzrm1eCfpAIp5VViMheOXzJMUFrXFGbBzDTZex4Az/Wr7I0mKi2Ja iYLt9WI66zzzebmh6g+TVtn9gqmk7Qi1slaia3PQPuKHjyQtO9qfloxSp+CUoKpo8bVK +M0f69RpGMXMVQJ/GanfbFMcAj4+4D4hxDGqoj4jffjt6XPfc4SjrEUfsQlcSAiWoL+j xvYQ== X-Gm-Message-State: AOJu0YzAODzH30gV/mLMPS0FlFv752uny/shJ7wOHVlD/NuUKzoqsmOm Tu+mHgojyEXZcjDMfVt2DiRLtS5eLuf4iv1hDeDEocw0FNTgwvevqkwOYP+KIKAX47MTpOBl70Q 4PUZVApTuEu0r883fDJfhXW9jfmSNQQ== X-Gm-Gg: ASbGncv1oQAZvNXzGdodlX+3Njs7ccfvGsUJnRlsPsTVjuqk7wT7B/+7oylLcczBuml XZeA3kbspmDZxFEU9AtDkZt8EfqdWrVxMWowdS6+JEE1qQiBO6KDawXtdJyxfj8QzAlf79j+l7L WTcB5ut4tfG1KYe3W4pTk85tb55Uc6C0/jYaQKsRGUr9K+loKB9eT7gmxg87S436Fyr43d7bVyI 0efvycTuj2MSGS3cyemtfBuMaYpS8gEKqP/1vFTkuunNxT+EmYgm2B0ds7vbtu93t6WMwaGBJl6 meDGu/DI54DX/z41 X-Google-Smtp-Source: AGHT+IGmcAfIgszEngSGGTDThLJstpoJXEfglbYC/Fc4FR7KI0NYM4oEXPKvxWfXYC5mRLp4V/2OXSr40pdUZ+Yw+i8= X-Received: by 2002:a05:6402:20c6:10b0:640:8222:ed1a with SMTP id 4fb4d7f45d1cf-64105b8e639mr2738543a12.31.1762359021243; Wed, 05 Nov 2025 08:10:21 -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: Wed, 5 Nov 2025 08:10:06 -0800 X-Gm-Features: AWmQ_bkIUL4PdZKZv6ZWhK9RSz_vP8AWMT1LxAAJ6eTBvT1xDBJGjeI6fv5XAD4 Message-ID: Subject: Re: NFSv4 server sets/gets FATTR4_HIDDEN, FATTR4_SYSTEM, FATTR4_ARCHIVE attributes from FreeBSD XATTR "user.DOSATTRIB"? To: Lionel Cons Cc: Freebsd hackers list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- 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-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4d1qzl59GMz3RJW On Wed, Nov 5, 2025 at 6:49=E2=80=AFAM Lionel Cons wrote: > > Is it feasibe that the FreeBSD NFSv4 server sets/gets FATTR4_HIDDEN, > FATTR4_SYSTEM, FATTR4_ARCHIVE attributes from Linux "user.DOSATTRIB" > XATTR used by SMB/CIFS - except on ZFS, which directly supports these > attributes. > > This is for MacOS, MacOS X and Windows client support. If FreeBSD, the attributes are handled by chflags ("man 2 chflags") called UF_HIDDEN, UF_SYSTEM and UF_ARCHIVE. The NFS server now know about these (added recently) and the file systems that can be exported and know about them are: ZFS, UFS, tmpfs and msdosfs (Full disclosure, for ZFS there is a patch that still needs to be upstreamed into ZFS for NFS to handle the archive flag over NFS. This will happen soon.) As for Samba, I do not know if Samba knows about chflags(2) on FreeBSD, but if it does not, that is probably how it should handle these. (Samba is waaayy out of my wheelhouse, so someone else would need to investigate this.) To handle them via an extended attribute would be less efficient than what is done now, since acquiring extended attributes often involves reading a block they are stored in on the fs. rick > > Lionel >