patches to add new stat(2) file flags

Kenneth D. Merry ken at FreeBSD.org
Tue Apr 9 19:16:32 UTC 2013


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 at FreeBSD.ORG


More information about the freebsd-arch mailing list