Page MenuHomeFreeBSD

zfs: handle the `UF_NOUNLINK` chflags fflag
AbandonedPublic

Authored by ngie on Fri, Nov 29, 7:12 PM.

Details

Reviewers
None
Group Reviewers
ZFS
Summary

Prior to this change chflags uunlink <foo> would fail on FreeBSD with
EOPNOTSUPP since the necessary translation code had not been added for
UF_NOUNLINK. This change adds the missing glue for UF_NOUNLINK.

PR: 282981

Test Plan

Before

% chflags uunlink foo 
chflags: foo: Operation not supported
% chflags sunlink foo
chflags: foo: Operation not permitted
% sudo chflags sunlink foo
% uname -a
FreeBSD gilot.local 14.1-RELEASE-p4 FreeBSD 14.1-RELEASE-p4 GENERIC amd64

After

fbsd-current# mdconfig -a -t malloc -s 100m
md0
fbsd-current# mdconfig -a -t malloc -s 100m
md1
fbsd-current# zpool create howitzer md0 md1
fbsd-current# cd /howitzer
fbsd-current# : > foo
fbsd-current# chflags uunlink foo
fbsd-current# ls -l
total 1
-rw-r--r--  1 root wheel 0 Nov 29 10:44 foo
fbsd-current# rm foo
rm: foo: Operation not permitted
fbsd-current# chflags nouunlink foo
fbsd-current# rm foo
fbsd-current#

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 60879
Build 57763: arc lint + arc unit

Event Timeline

ngie requested review of this revision.Fri, Nov 29, 7:12 PM
ngie added a reviewer: ZFS.
ngie retitled this revision from Handle the `UF_NOUNLINK` chflags fflag to zfs: handle the `UF_NOUNLINK` chflags fflag.
ngie edited the test plan for this revision. (Show Details)
ngie edited the test plan for this revision. (Show Details)

Will go through openzfs first.