From owner-freebsd-fs@FreeBSD.ORG Tue Feb 8 10:12:51 2011 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EDAFB106564A for ; Tue, 8 Feb 2011 10:12:51 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta03.westchester.pa.mail.comcast.net (qmta03.westchester.pa.mail.comcast.net [76.96.62.32]) by mx1.freebsd.org (Postfix) with ESMTP id 9202A8FC0A for ; Tue, 8 Feb 2011 10:12:51 +0000 (UTC) Received: from omta03.westchester.pa.mail.comcast.net ([76.96.62.27]) by qmta03.westchester.pa.mail.comcast.net with comcast id 5NAq1g0010bG4ec53NCrLy; Tue, 08 Feb 2011 10:12:51 +0000 Received: from koitsu.dyndns.org ([98.248.34.134]) by omta03.westchester.pa.mail.comcast.net with comcast id 5NCq1g00f2tehsa3PNCrzm; Tue, 08 Feb 2011 10:12:51 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 198459B422; Tue, 8 Feb 2011 02:12:49 -0800 (PST) Date: Tue, 8 Feb 2011 02:12:49 -0800 From: Jeremy Chadwick To: Damien Fleuriot Message-ID: <20110208101249.GA8057@icarus.home.lan> References: <4D504D96.2040305@gmail.com> <4D510A7F.3070708@my.gd> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D510A7F.3070708@my.gd> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-fs@freebsd.org Subject: Re: chflags (uappnd) on ZFS X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Feb 2011 10:12:52 -0000 On Tue, Feb 08, 2011 at 10:18:55AM +0100, Damien Fleuriot wrote: > Getting the very same error on 8.2-RC3 amd64 > > FreeBSD mybsd 8.2-RC3 FreeBSD 8.2-RC3 #1: Thu Feb 3 11:03:48 CET 2011 > root@mybsd:/usr/obj/usr/src/sys/DAM amd64 > > mybsd# zpool get version data > NAME PROPERTY VALUE SOURCE > data version 15 default > > mybsd# zfs get version > NAME PROPERTY VALUE SOURCE > data version 4 > > > On 2/7/11 8:52 PM, Michael wrote: > > Hello, > > > > Is uappnd flag supported on ZFS? I'm using 8.1-R and when I try to: > > chflags uappnd file.txt > > then I get: > > chflags: file.txt: Operation not supported It looks like the implemented/translated chflags(2) bits are: SF_IMMUTABLE ("chflags schg") <--> ZFS_IMMUTABLE SF_APPEND ("chflags sappnd") <--> ZFS_APPENDONLY SF_NOUNLINK ("chflags sunlnk") <--> ZFS_NOUNLINK UF_NODUMP ("chflags nodump") <--> ZFS_NODUMP This is based on "grep -r FLAG_CHANGE /usr/src/sys/cddl", and reading src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h. I assume that one can use the inverse operations (clearing bits) as well. Please see the chflags(2) man page (don't skim please) for details of what the difference is between SF_xxx and UF_xxx flags. -- | Jeremy Chadwick jdc@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP 4BD6C0CB |