From owner-svn-src-all@FreeBSD.ORG Wed Aug 28 20:54:24 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 27466C32 for ; Wed, 28 Aug 2013 20:54:24 +0000 (UTC) (envelope-from bryan@shatow.net) Received: from secure.xzibition.com (secure.xzibition.com [173.160.118.92]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CF519270E for ; Wed, 28 Aug 2013 20:54:23 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=shatow.net; h=mime-version :content-type:content-transfer-encoding:date:from:to:cc:subject :in-reply-to:references:message-id; q=dns; s=sweb; b=P/bogI637bL 1e0GYFULG8knkI1uHlv/t7bo4lQbMDAcL5M/vYKCOpYKjzavEjfaGvFJqcMWvOL+ msAwFVhHBSwYypYc6hTXi97VaHpsMyNBu8nj/7TpCX9hSXBWSlnRAQtxjqmZbcC2 QhU9BD3p+Jh1UpIlbz858pm8I6ZoWFtk= DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=shatow.net; h= mime-version:content-type:content-transfer-encoding:date:from:to :cc:subject:in-reply-to:references:message-id; s=sweb; bh=5NdG58 pshKgiuDCCPlJJUY6/ezanikz224N3Vw4JjGc=; b=LjTFsa4O+meS1qQq3wVzQO 8hK7CKi0tCVS6c/438u7SFxWSwaBS7HsAbqjZ6Kuq3wPgmB82Zee5xadaNsXG2g4 WjiAJbA/AXGGDeas8VEuqOpUL2A3wBfdhMYTpCpFUgrzpCnKlsZByFA5LUOQePFq MSZWumcXNZt9XSpn0+0tY= Received: (qmail 968 invoked from network); 28 Aug 2013 15:54:19 -0500 Received: from unknown (HELO roundcube.xk42.net) (10.10.5.5) by sweb.xzibition.com with SMTP; 28 Aug 2013 15:54:19 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 28 Aug 2013 15:54:18 -0500 From: Bryan Drewery To: svn-src-all@freebsd.org, ken@FreeBSD.org Subject: Re: svn commit: r254627 - in head: bin/chflags bin/ls lib/libc/gen lib/libc/sys sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/fs/msdosfs sys/fs/smbfs sys/sys sys/ufs/ufs In-Reply-To: <201308212304.r7LN4mr6058450@svn.freebsd.org> References: <201308212304.r7LN4mr6058450@svn.freebsd.org> Message-ID: <13d31864e269b87bbf573d33b0bb6494@shatow.net> X-Sender: bryan@shatow.net User-Agent: Roundcube Webmail/0.9.2 Cc: swills@FreeBSD.org, antoine@FreeBSD.org, madpilot@FreeBSD.org, kwm@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Aug 2013 20:54:24 -0000 On 2013-08-21 18:04, Kenneth D. Merry wrote: > Author: ken > Date: Wed Aug 21 23:04:48 2013 > New Revision: 254627 > URL: http://svnweb.freebsd.org/changeset/base/254627 > > Log: > Expand the use of stat(2) flags to allow storing some Windows/DOS > and CIFS file attributes as BSD stat(2) flags. > > This work is intended to be compatible with ZFS, the Solaris CIFS > server's interaction with ZFS, somewhat compatible with MacOS X, > and of course compatible with Windows. > > The Windows attributes that are implemented were chosen based on > the attributes that ZFS already supports. > > The summary of the flags is as follows: [...] > > UF_ARCHIVE: Command line name: "uarch", "uarchive" > ZFS_NAME: XAT_ARCHIVE, ZFS_ARCHIVE > Windows name: FILE_ATTRIBUTE_ARCHIVE > > The UF_ARCHIVED flag means that the file has changed and > needs to be archived. The meaning is same as > the Windows FILE_ATTRIBUTE_ARCHIVE attribute, and > the ZFS XAT_ARCHIVE and ZFS_ARCHIVE attribute. > > msdosfs and ZFS have special handling for this flag. > i.e. they will set it when the file changes. Is it intended that this flag is automatically added to all new and existing ZFS files? # touch test # ls -alo test -rw-r--r--- 1 root wheel uarch 0 Aug 28 15:46 test This breaks 'cp -p' to tmpfs as tmpfs does not allow this flag. # mkdir /tmp/tmpfs # mount -t tmpfs tmpfs /tmp/tmpfs # cp -f test /tmp/tmpfs cp: test: Operation not supported [...] > Modified: head/sys/ufs/ufs/ufs_vnops.c > ============================================================================== > --- head/sys/ufs/ufs/ufs_vnops.c Wed Aug 21 22:57:29 2013 (r254626) > +++ head/sys/ufs/ufs/ufs_vnops.c Wed Aug 21 23:04:48 2013 (r254627) > @@ -528,9 +528,11 @@ ufs_setattr(ap) > return (EINVAL); > } > if (vap->va_flags != VNOVAL) { > - if ((vap->va_flags & ~(UF_NODUMP | UF_IMMUTABLE | UF_APPEND | > - UF_OPAQUE | UF_NOUNLINK | SF_ARCHIVED | SF_IMMUTABLE | > - SF_APPEND | SF_NOUNLINK | SF_SNAPSHOT)) != 0) > + if ((vap->va_flags & ~(SF_APPEND | SF_ARCHIVED | SF_IMMUTABLE | > + SF_NOUNLINK | SF_SNAPSHOT | UF_APPEND | UF_ARCHIVE | > + UF_HIDDEN | UF_IMMUTABLE | UF_NODUMP | UF_NOUNLINK | > + UF_OFFLINE | UF_OPAQUE | UF_READONLY | UF_REPARSE | > + UF_SPARSE | UF_SYSTEM)) != 0) > return (EOPNOTSUPP); > if (vp->v_mount->mnt_flag & MNT_RDONLY) > return (EROFS); Seems a similar change is needed in tmpfs_subr.c:tmpfs_chflags() (antoine pointed this out)