From owner-freebsd-fs@FreeBSD.ORG Tue Apr 9 19:16:32 2013 Return-Path: Delivered-To: fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id CAE679D9; Tue, 9 Apr 2013 19:16:32 +0000 (UTC) (envelope-from ken@kdm.org) Received: from nargothrond.kdm.org (nargothrond.kdm.org [70.56.43.81]) by mx1.freebsd.org (Postfix) with ESMTP id 9643E65A; Tue, 9 Apr 2013 19:16:32 +0000 (UTC) Received: from nargothrond.kdm.org (localhost [127.0.0.1]) by nargothrond.kdm.org (8.14.2/8.14.2) with ESMTP id r39JGW2j004514; Tue, 9 Apr 2013 13:16:32 -0600 (MDT) (envelope-from ken@nargothrond.kdm.org) Received: (from ken@localhost) by nargothrond.kdm.org (8.14.2/8.14.2/Submit) id r39JGW6n004513; Tue, 9 Apr 2013 13:16:32 -0600 (MDT) (envelope-from ken) Date: Tue, 9 Apr 2013 13:16:32 -0600 From: "Kenneth D. Merry" To: Pawel Jakub Dawidek Subject: Re: patches to add new stat(2) file flags Message-ID: <20130409191632.GA4480@nargothrond.kdm.org> References: <20130307000533.GA38950@nargothrond.kdm.org> <20130307214649.X981@besplex.bde.org> <20130314232449.GC1446@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130314232449.GC1446@garage.freebsd.pl> User-Agent: Mutt/1.4.2i Cc: arch@FreeBSD.org, fs@FreeBSD.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Apr 2013 19:16:32 -0000 On Fri, Mar 15, 2013 at 00:24:50 +0100, Pawel Jakub Dawidek wrote: > On Thu, Mar 07, 2013 at 10:21:38PM +1100, Bruce Evans wrote: > > On Wed, 6 Mar 2013, Kenneth D. Merry wrote: > > > > > I have attached diffs against head for some additional stat(2) file flags. > > > > > > The primary purpose of these flags is to improve compatibility with CIFS, > > > both from the client and the server side. > > > ... > > > UF_IMMUTABLE: Command line name: "uchg", "uimmutable" > > > ZFS name: XAT_READONLY, ZFS_READONLY > > > Windows: FILE_ATTRIBUTE_READONLY > > > > > > This flag means that the file may not be modified. > > > This is not a new flag, but where applicable it is > > > mapped to the Windows readonly bit. ZFS and UFS > > > now both support the flag and enforce it. > > > > > > The behavior of this flag is compatible with MacOS X. > > > > This is incompatible with mapping the DOS read-only attribute to the > > non-writeable file permission in msdosfs. msdosfs does this mainly to > > get at least one useful file permission, but the semantics are subtly > > different from all of file permissions, UF_IMMUTABLE and SF_IMMUTABLE. > > I think it should be a new flag. > > I agree, especially that I saw some discussion recently on Illumos > mailing lists to not enforce this flag in ZFS, which would be confusing > to FreeBSD users if we forget to _not_ merge that change. Do we know whether the change to disable enforcement of the ZFS readonly attribute actually went into Illumos? I'm fine with creating a new flag, say UF_READONLY, and mapping it to a disabled ZFS readonly attribute. We can let the CIFS servers enforce it, as Gordon Ross proposed for the Illumos CIFS server. Ken -- Kenneth Merry ken@FreeBSD.ORG