Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Oct 2018 19:02:28 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 232748] inconsistent handling of zfs filesystem native property xattr
Message-ID:  <bug-232748-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D232748

            Bug ID: 232748
           Summary: inconsistent handling of zfs filesystem native
                    property xattr
           Product: Base System
           Version: CURRENT
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: dclarke@blastwave.org

This is seen on 11.2 and 12.0 beta 2.

Where zfs man page clearly says "The xattr property is currently not
supported on FreeBSD" and that is fine.  However filesystem creation
silently accepts the option and even warns the user if xattr is
mentioned as a duplicate option. However the option is silently accepted.=20

hydra# uname -a=20
FreeBSD hydra 12.0-BETA2 FreeBSD 12.0-BETA2 r339753 GENERIC  amd64

hydra# zfs create -o checksum=3Dsha256 -o compression=3Dlz4 -o atime=3Don \
? -o devices=3Don -o exec=3Don -o setuid=3Don -o snapdir=3Dhidden \
? -o aclmode=3Ddiscard -o aclinherit=3Drestricted -o xattr=3Don \
? -o utf8only=3Doff -o casesensitivity=3Dsensitive -o primarycache=3Dall \
? -o secondarycache=3Dall -o logbias=3Dlatency -o dedup=3Don -o sync=3Dstan=
dard \
? -o mountpoint=3D/foo hydra/foo

hydra# zfs get xattr hydra/foo
NAME       PROPERTY  VALUE  SOURCE
hydra/foo  xattr     off    temporary

One may see xattr set to "on" in some filesystems and that seems odd :=20

hydra# uname -a=20
FreeBSD hydra 12.0-BETA2 FreeBSD 12.0-BETA2 r339753 GENERIC  amd64

hydra# zfs get xattr hydra/usr
NAME       PROPERTY  VALUE  SOURCE
hydra/usr  xattr     on     default

hydra# zfs get xattr hydra/usr/home
NAME            PROPERTY  VALUE  SOURCE
hydra/usr/home  xattr     off    temporary

hydra# zfs set xattr=3Don hydra/usr/home
property 'xattr' not supported on FreeBSD: permission denied
hydra#=20

hydra# zfs list -t filesystem -o name,xattr,mountpoint=20
NAME                XATTR  MOUNTPOINT
hydra                 off  /hydra
hydra/ROOT             on  none
hydra/ROOT/default    off  /
hydra/foo             off  /foo
hydra/tmp             off  /tmp
hydra/usr              on  /usr
hydra/usr/home        off  /usr/home
hydra/usr/ports       off  /usr/ports
hydra/usr/src         off  /usr/src
hydra/var              on  /var
hydra/var/audit       off  /var/audit
hydra/var/crash       off  /var/crash
hydra/var/log         off  /var/log
hydra/var/mail        off  /var/mail
hydra/var/tmp         off  /var/tmp

Yet clearly xattr is enabled within zfs filesystem hydra/usr and one must
wonder if a zfs send with capital R will result in dataset information
that can be later received with xattr enabled ?  Yes.=20

hydra# zfs create -o checksum=3Dsha256 -o compression=3Dlz4 -o atime=3Don \
? -o devices=3Don -o exec=3Don -o setuid=3Don -o snapdir=3Dhidden \
? -o aclmode=3Ddiscard -o aclinherit=3Drestricted -o xattr=3Don \
? -o utf8only=3Doff -o casesensitivity=3Dsensitive -o primarycache=3Dall \
? -o secondarycache=3Dall -o logbias=3Dlatency -o dedup=3Don -o sync=3Dstan=
dard \
? -o mountpoint=3D/foo/bar hydra/foo/bar=20

hydra# zfs snapshot -r hydra/usr@`(date '+%Y%m%d%H%M%S')`

hydra# zfs list -r -t all hydra/usr
NAME                             USED  AVAIL  REFER  MOUNTPOINT
hydra/usr                       1.35G  55.2G    88K  /usr
hydra/usr@20181027185424            0      -    88K  -
hydra/usr/home                   172K  55.2G   172K  /usr/home
hydra/usr/home@20181027185424       0      -   172K  -
hydra/usr/ports                  704M  55.2G   704M  /usr/ports
hydra/usr/ports@20181027185424      0      -   704M  -
hydra/usr/src                    682M  55.2G   682M  /usr/src
hydra/usr/src@20181027185424        0      -   682M  -

hydra# zfs send -R hydra/usr@20181027185424 > /var/tmp/usr_20181027185424.c=
apR=20

hydra# zfs receive -uvF hydra/foo/bar < /var/tmp/usr_20181027185424.capR
receiving full stream of hydra/usr@20181027185424 into
hydra/foo/bar@20181027185424
received 46.6KB stream in 1 seconds (46.6KB/sec)
receiving full stream of hydra/usr/ports@20181027185424 into
hydra/foo/bar/ports@20181027185424
received 561MB stream in 15 seconds (37.4MB/sec)
receiving full stream of hydra/usr/src@20181027185424 into
hydra/foo/bar/src@20181027185424
received 1.25GB stream in 19 seconds (67.3MB/sec)
receiving full stream of hydra/usr/home@20181027185424 into
hydra/foo/bar/home@20181027185424
received 84.6KB stream in 1 seconds (84.6KB/sec)

hydra#=20
hydra# zfs list -t all -o name,used,available,xattr,mountpoint -r hydra/foo
NAME                                 USED  AVAIL  XATTR  MOUNTPOINT
hydra/foo                           1.40G  53.1G    off  /foo
hydra/foo/bar                       1.40G  53.1G     on  /usr
hydra/foo/bar@20181027185424            0      -     on  -
hydra/foo/bar/home                   172K  53.1G     on  /usr/home
hydra/foo/bar/home@20181027185424       0      -     on  -
hydra/foo/bar/ports                  739M  53.1G     on  /usr/ports
hydra/foo/bar/ports@20181027185424      0      -     on  -
hydra/foo/bar/src                    695M  53.1G     on  /usr/src
hydra/foo/bar/src@20181027185424        0      -     on  -
hydra#=20

There we see a stack of xattr properties all enabled.=20

Seems inconsistent.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-232748-227>