freebsd-nq/sys/ufs/ufs
Peter Wemm 815d14ddab Use a fixed type for times in on-disk structures for ufs rather than
something that could potentially change like time_t.
2001-07-16 00:55:27 +00:00
..
acl.h Introduce support for POSIX.1e ACLs on UFS-based file systems. This 2001-03-26 17:53:19 +00:00
dinode.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
dir.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
dirhash.h Return a locked struct buf from ufsdirhash_lookup() to avoid one 2001-07-13 20:50:38 +00:00
extattr.h o Rename "namespace" argument to "attrnamespace" as namespace is a C++ 2001-03-19 05:44:15 +00:00
inode.h Bring in dirhash, a simple hash-based lookup optimisation for large 2001-07-10 21:21:29 +00:00
quota.h Use a fixed type for times in on-disk structures for ufs rather than 2001-07-16 00:55:27 +00:00
README.acls o Indent sub-section headings to be consistent with README.extattr. 2001-04-03 18:05:03 +00:00
README.extattr o Introduce a README file describing briefly how to use extended 2001-04-03 17:31:36 +00:00
ufs_acl.c Revert consequences of changes to mount.h, part 2. 2001-04-29 02:45:39 +00:00
ufs_bmap.c Remove two unused arguments from ufs_bmaparray(). 2001-04-29 10:24:58 +00:00
ufs_dirhash.c Return a locked struct buf from ufsdirhash_lookup() to avoid one 2001-07-13 20:50:38 +00:00
ufs_extattr.c Call vn_close on the backing file vnode if ufs_extattr_enable failed to 2001-06-07 00:11:32 +00:00
ufs_extern.h When a new block is allocated to a directory, an fsync of a file 2001-05-17 07:24:03 +00:00
ufs_ihash.c Change and clean the mutex lock interface. 2001-02-09 06:11:45 +00:00
ufs_inode.c Bring in dirhash, a simple hash-based lookup optimisation for large 2001-07-10 21:21:29 +00:00
ufs_lookup.c Return a locked struct buf from ufsdirhash_lookup() to avoid one 2001-07-13 20:50:38 +00:00
ufs_quota.c - Fix a mntvnode and vnode interlock reversal. 2001-06-28 04:12:56 +00:00
ufs_readwrite.c With Alfred's permission, remove vm_mtx in favor of a fine-grained approach 2001-07-04 16:20:28 +00:00
ufs_vfsops.c o Merge contents of struct pcred into struct ucred. Specifically, add the 2001-05-25 16:59:11 +00:00
ufs_vnops.c Add a wrapper for the fifo kqfilter which falls through to the ufs routine. 2001-06-06 17:40:57 +00:00
ufsmount.h Remove last vestiges of MFS. 2001-05-29 21:21:53 +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 file system.  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 may be enabled by adding:

	options UFS_EXTATTR

to your kernel configuration file.  This allows UFS-based file systems to
support extended attributes, but requires manual administration of EAs
using the extattrctl tool, including the starting of EA support for each
file system, 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 file system, 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 file system 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 file system.

Manual configuration increases administrative overhead, but also
introduces the possibility of race conditions during file system 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 file system root during the mount operation.  If it
is found, EA support will be started for the file system.  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 file system, reserving space for attribute data:

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

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