freebsd-dev/sys/ufs/ufs
Poul-Henning Kamp b4b138c27f Including <sys/stdint.h> is (almost?) universally only to be able to use
%j in printfs, so put a newsted include in <sys/systm.h> where the printf
prototype lives and save everybody else the trouble.
2003-03-18 08:45:25 +00:00
..
acl.h Remove __P. 2002-03-19 22:40:48 +00:00
dinode.h Change the name of st_createtime to st_birthtime. This change is 2002-07-16 22:36:00 +00:00
dir.h
dirhash.h Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup, 2003-01-01 18:49:04 +00:00
extattr.h More s/file system/filesystem/g 2002-05-16 21:28:32 +00:00
inode.h Update to previous change (1.54) to use an approperly wide inode field 2002-12-15 19:25:59 +00:00
quota.h Expand the reference count on struct dquot to 32 bits. 2003-02-24 08:49:59 +00:00
README.acls Clarify that the UFS1 extended attribute configuration steps do not apply 2002-10-19 16:09:16 +00:00
README.extattr Update extended attribute readme file to note that no special configuration 2002-10-18 21:11:36 +00:00
ufs_acl.c Push most UFS ACL behavior behind a check for MNT_ACLS, permitting ACLs 2002-10-15 21:28:24 +00:00
ufs_bmap.c - Add a new 'flags' parameter to getblk(). 2003-03-04 00:04:44 +00:00
ufs_dirhash.c Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
ufs_extattr.c Including <sys/stdint.h> is (almost?) universally only to be able to use 2003-03-18 08:45:25 +00:00
ufs_extern.h Fix a file-rewrite performance case for UFS[2]. When rewriting portions 2002-10-18 22:52:41 +00:00
ufs_ihash.c Introduce typedefs for the member functions of struct vfsops and employ 2002-08-13 10:05:50 +00:00
ufs_inode.c Make ffs_mountfs() static. 2002-12-27 10:06:37 +00:00
ufs_lookup.c Fix some harmless mis-indents. 2002-10-01 15:48:31 +00:00
ufs_quota.c More low-hanging fruit: kill caddr_t in calls to wakeup(9) / [mt]sleep(9). 2003-03-02 16:54:40 +00:00
ufs_vfsops.c Replace various spelling with FALLTHROUGH which is lint()able 2002-08-25 13:23:09 +00:00
ufs_vnops.c Finish cleanup of vprint() which was begun with changing v_tag to a string. 2003-03-03 19:15:40 +00:00
ufsmount.h This patch fixes a problem caused by applications that rapidly and 2003-01-07 18:23:50 +00:00

$FreeBSD$

  UFS Extended Attributes Copyright

The UFS Extended Attributes implementation is copyright Robert Watson, and
is made available under a Berkeley-style license.

  About UFS Extended Attributes

Extended attributes allow the association of additional arbitrary
meta-data with files and directories.  Extended attributes are defined in
the form name=value, where name is an nul-terminated string in the style
of a filename, and value is a binary blob of zero or more bytes. The UFS
extended attribute service layers support for extended attributes onto a
backing file, in the style of the quota implementation, meaning that it
requires no underlying format changes in the filesystem.  This design
choice exchanges simplicity, usability and easy deployment for
performance.  When defined, extended attribute names exist in a series of
disjoint namespaces: currently, two namespaces are defined:
EXTATTR_NAMESPACE_SYSTEM and EXTATTR_NAMESPACE_USER.  The primary
distinction lies in the protection model: USER EAs are protected using the
normal inode protections, whereas SYSTEM EAs require privilege to access
or modify.

  Using UFS Extended Attributes

Support for UFS extended attributes is natively available in UFS2, and
requires no special configuration.  For reliability, administrative,
and performance reasons, if you plan to use extended attributes, it
is recommended that you use UFS2 in preference to UFS1.

Support for UFS extended attributes may be enabled for UFS1 by adding:

	options UFS_EXTATTR

to your kernel configuration file.  This allows UFS-based filesystems to
support extended attributes, but requires manual administration of EAs
using the extattrctl tool, including the starting of EA support for each
filesystem, and the enabling of individual attributes for the file
system.  The extattrctl utility may be used to initialize backing files
before first use, to start and stop EA service on a filesystem, and to
enable and disable named attributes.  The command lines for extattrctl
take the following forms:

  extattrctl start [path]
  extattrctl stop [path]
  extattrctl initattr [-f] [-p path] [attrsize] [attrfile]
  extattrctl enable [path] [attrnamespace] [attrname] [attrfile]
  extattrctl disable [path] [attrnamespace] [attrname]

In each case, [path] is used to indicate the mounted filesystem on which
to perform the operation.  [attrnamespace] refers to the namespace in
which the attribute is being manipulated, and may be "system" or "user".  
The [attrname] is the attribute name to use for the operation. The
[attrfile] argument specifies the attribute backing file to use. When
using the "initattr" function to initialize a backing file, the maximum
size of attribute data must be defined in bytes using the [attrsize]
field.  Optionally, the [-p path] argument may be used to indicate to
extattrctl that it should pre-allocate space for EA data, rather than
creating a sparse backing file.  This prevents attribute operations from
failing in low disk-space conditions (which can be important when EAs are
used for security purposes), but pre-allocation will consume space
proportional to the product of the defined maximum attribute size and
number of attributes on the specified filesystem.

Manual configuration increases administrative overhead, but also
introduces the possibility of race conditions during filesystem mount, if
EAs are used to support other features, as starting the EAs manually is
not atomic with the mount operation.  To address this problem, an
additional kernel option may be defined to auto-start EAs on a UFS file
system based on special directories at mount-time:

	options UFS_EXTATTR_AUTOSTART

If this option is defined, UFS will search for a ".attribute"
sub-directory of the filesystem root during the mount operation.  If it
is found, EA support will be started for the filesystem.  UFS will then
search for "system" and "user" sub-directories of the ".attribute"
directory for any potential backing files, and enable an EA for each valid
backing file with the name of the backing file as the attribute name.  
For example, by creating the following tree, the two EAs,
posix1e.acl_access and posix1e.acl_default will be enabled in the system
namespace of the root filesystem, reserving space for attribute data:

  mkdir -p /.attribute/system
  cd /.attribute/system
  extattrctl initattr -p / 388 posix1e.acl_access
  extattrctl initattr -p / 388 posix1e.acl_default

On the next mount of the root filesystem, the attributes will be
automatically started.