From owner-freebsd-bugs@freebsd.org Sat Oct 27 19:02:30 2018 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF24D10D0845 for ; Sat, 27 Oct 2018 19:02:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 46AF177626 for ; Sat, 27 Oct 2018 19:02:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 09A8010D0841; Sat, 27 Oct 2018 19:02:30 +0000 (UTC) Delivered-To: bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C05CC10D083E for ; Sat, 27 Oct 2018 19:02:29 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6166677621 for ; Sat, 27 Oct 2018 19:02:29 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id A509C123FE for ; Sat, 27 Oct 2018 19:02:28 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w9RJ2S53011055 for ; Sat, 27 Oct 2018 19:02:28 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w9RJ2SpH011052 for bugs@FreeBSD.org; Sat, 27 Oct 2018 19:02:28 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 232748] inconsistent handling of zfs filesystem native property xattr Date: Sat, 27 Oct 2018 19:02:28 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: dclarke@blastwave.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Oct 2018 19:02:30 -0000 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.=