NetBSD/sys/ufs/ufs
riastradh 9fc453562f Round of uvm.h cleanup.
The poorly named uvm.h is generally supposed to be for uvm-internal
users only.

- Narrow it to files that actually need it -- mostly files that need
  to query whether curlwp is the pagedaemon, which should maybe be
  exposed by an external header.

- Use uvm_extern.h where feasible and uvm_*.h for things not exposed
  by it.  We should split up uvm_extern.h but this will serve for now
  to reduce the uvm.h dependencies.

- Use uvm_stat.h and #ifdef UVMHIST uvm.h for files that use
  UVMHIST(ubchist), since ubchist is declared in uvm.h but the
  reference evaporates if UVMHIST is not defined, so we reduce header
  file dependencies.

- Make uvm_device.h and uvm_swap.h independently includable while
  here.

ok chs@
2020-09-05 16:30:10 +00:00
..
Makefile
README.acls Add ACL support for FFS. From FreeBSD. 2020-05-16 18:31:45 +00:00
acl.h Add ACL support for FFS. From FreeBSD. 2020-05-16 18:31:45 +00:00
dinode.h
dir.h
dirhash.h
extattr.h Extended attribute support for ffsv2, from FreeBSD. 2020-04-18 19:18:33 +00:00
inode.h Don't cache id's for vnodes that have ACLs. ok chs@ 2020-08-20 20:28:13 +00:00
quota.h
quota1.h
quota1_subr.c
quota2.h
quota2_subr.c
ufs_acl.c Add ACL support for FFS. From FreeBSD. 2020-05-16 18:31:45 +00:00
ufs_bmap.c handle negative small block numbers for extattr 2020-04-20 03:57:02 +00:00
ufs_bswap.h
ufs_dirhash.c
ufs_extattr.c Add ACL support for FFS. From FreeBSD. 2020-05-16 18:31:45 +00:00
ufs_extern.h Add ACL support for FFS. From FreeBSD. 2020-05-16 18:31:45 +00:00
ufs_inode.c Round of uvm.h cleanup. 2020-09-05 16:30:10 +00:00
ufs_lookup.c Revert "ufs: Prevent mkdir from choking on deleted directories." 2020-09-05 02:55:38 +00:00
ufs_quota.c
ufs_quota.h
ufs_quota1.c
ufs_quota2.c
ufs_readwrite.c PR kern/54759 (vm.ubc_direct deadlock when read()/write() into mapping of itself) 2020-04-23 21:47:07 +00:00
ufs_rename.c
ufs_vfsops.c There is no difference between a zero-sized and not yet 2020-05-01 08:43:37 +00:00
ufs_vnops.c Round of uvm.h cleanup. 2020-09-05 16:30:10 +00:00
ufs_wapbl.h
ufsmount.h

README.acls

$FreeBSD: head/sys/ufs/ufs/README.acls 105456 2002-10-19 16:09:16Z rwatson $

  UFS Access Control Lists Copyright

The UFS Access Control Lists implementation is copyright Robert Watson,
and is made available under a Berkeley-style license.

  About UFS Access Control Lists (ACLs)

Access control lists allow the association of fine-grained discretionary
access control information with files and directories, extending the
base UNIX permission model in a (mostly) compatible way.  This
implementation largely follows the POSIX.1e model, and relies on the
availability of extended attributes to store extended components of
the ACL, while maintaining the base permission information in the inode.

  Using UFS Access Control Lists (ACLs)

Support for UFS access control lists may be enabled by adding:

	options UFS_ACL

to your kernel configuration.  As ACLs rely on the availability of extended
attributes, your file systems must have support for extended attributes.
For UFS2, this is supported natively, so no further configuration is
necessary.  For UFS1, you must also enable the optional extended attributes
support documented in README.extattr.  A summary of the instructions
and ACL-specific information follows.

To enable support for ACLs on a file system, the 'acls' mount flag
must be set for the file system.  This may be set using the tunefs
'-a' flag:

	tunefs -a enable /dev/md0a

Or by using the mount-time flag:

	mount -o acls /dev/md0a /mnt

The flag may also be set in /etc/fstab.  Note that mounting a file
system previously configured for ACLs without ACL-support will result
in incorrect application of discretionary protections.  Likewise,
mounting an ACL-enabled file system without kernel support for ACLs
will result in incorrect application of discretionary protections.  If
the kernel is not configured for ACL support, a warning will be
printed by the kernel at mount-time.  For reliability purposes, it
is recommended that the superblock flag be used instead of the
mount-time flag, as this will avoid re-mount isses with the root file
system.  For reliability and performance reasons, the use of ACLs on
UFS1 is discouraged; UFS2 extended attributes provide a more reliable
storage mechanism for ACLs.

Currently, support for ACLs on UFS1 requires the use of UFS1 EAs, which may
be enabled by adding:

	options UFS_EXTATTR

to your kernel configuration file and rebuilding.  Because of filesystem
mount atomicity requirements, it is also recommended that:

	options UFS_EXTATTR_AUTOSTART

be added to the kernel so as to support the atomic enabling of the
required extended attributes with the filesystem mount operation.  To
enable ACLs, two extended attributes must be available in the
EXTATTR_NAMESPACE_SYSTEM namespace: "posix1e.acl_access", which holds
the access ACL, and "posix1e.acl_default" which holds the default ACL
for directories.  If you're using UFS1 Extended Attributes, the following
commands may be used to create the necessary EA backing files for
ACLs in the filesystem root of each filesystem.  In these examples,
the root filesystem is used; see README.extattr for more details.

  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, and ACLs will be enabled.