o Change options FFS_EXTATTR and options FFS_EXTATTR_AUTOSTART to

options UFS_EXTATTR and UFS_EXTATTR_AUTOSTART respectively.  This change
  reflects the fact that our EA support is implemented entirely at the
  UFS layer (modulo FFS start/stop/autostart hooks for mount and unmount
  events).  This also better reflects the fact that [shortly] MFS will also
  support EAs, as well as possibly IFS.

o Consumers of the EA support in FFS are reminded that as a result, they
  must change kernel config files to reflect the new option names.

Obtained from:	TrustedBSD Project
This commit is contained in:
Robert Watson 2001-03-19 04:35:40 +00:00
parent 14721edabe
commit 516081f288
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=74433
5 changed files with 25 additions and 25 deletions

View File

@ -141,11 +141,11 @@ NFS
# otherwise a STUB module will be compiled in.
SOFTUPDATES opt_ffs.h
# Enabling this option turns on support for extended attributes
# in FFS, which can be used to support high security configurations
# Enabling this option turns on support for extended attributes in UFS-based
# file systems, which can be used to support high security configurations
# as well as new file system features.
FFS_EXTATTR opt_ffs.h
FFS_EXTATTR_AUTOSTART opt_ffs.h
UFS_EXTATTR opt_ufs.h
UFS_EXTATTR_AUTOSTART opt_ufs.h
# The above static dependencies are planned removed, with a
# <filesystem>_ROOT option to control if it usable as root. This list

View File

@ -34,8 +34,8 @@
* $FreeBSD$
*/
#include "opt_ffs.h"
#include "opt_quota.h"
#include "opt_ufs.h"
#include <sys/param.h>
#include <sys/systm.h>
@ -85,7 +85,7 @@ static struct vfsops ufs_vfsops = {
ffs_vptofh,
ffs_init,
vfs_stduninit,
#ifdef FFS_EXTATTR
#ifdef UFS_EXTATTR
ufs_extattrctl,
#else
vfs_stdextattrctl,
@ -659,7 +659,7 @@ ffs_mountfs(devvp, mp, p, malloctype)
ump->um_seqinc = fs->fs_frag;
for (i = 0; i < MAXQUOTAS; i++)
ump->um_quotas[i] = NULLVP;
#ifdef FFS_EXTATTR
#ifdef UFS_EXTATTR
ufs_extattr_uepm_init(&ump->um_extattr);
#endif
devvp->v_rdev->si_mountpoint = mp;
@ -699,8 +699,8 @@ ffs_mountfs(devvp, mp, p, malloctype)
fs->fs_clean = 0;
(void) ffs_sbupdate(ump, MNT_WAIT);
}
#ifdef FFS_EXTATTR
#ifdef FFS_EXTATTR_AUTOSTART
#ifdef UFS_EXTATTR
#ifdef UFS_EXTATTR_AUTOSTART
/*
*
* Auto-starting does the following:
@ -712,8 +712,8 @@ ffs_mountfs(devvp, mp, p, malloctype)
* available, so would effectively be "atomic".
*/
(void) ufs_extattr_autostart(mp, p);
#endif /* !FFS_EXTATTR_AUTOSTART */
#endif /* !FFS_EXTATTR */
#endif /* !UFS_EXTATTR_AUTOSTART */
#endif /* !UFS_EXTATTR */
return (0);
out:
devvp->v_rdev->si_mountpoint = NULL;
@ -777,7 +777,7 @@ ffs_unmount(mp, mntflags, p)
if (mntflags & MNT_FORCE) {
flags |= FORCECLOSE;
}
#ifdef FFS_EXTATTR
#ifdef UFS_EXTATTR
if ((error = ufs_extattr_stop(mp, p)))
if (error != EOPNOTSUPP)
printf("ffs_unmount: ufs_extattr_stop returned %d\n",

View File

@ -34,7 +34,7 @@
* $FreeBSD$
*/
#include "opt_ffs.h"
#include "opt_ufs.h"
#include <sys/param.h>
#include <sys/systm.h>
@ -82,7 +82,7 @@ static struct vnodeopv_entry_desc ffs_vnodeop_entries[] = {
{ &vop_balloc_desc, (vop_t *) ffs_balloc },
{ &vop_reallocblks_desc, (vop_t *) ffs_reallocblks },
{ &vop_write_desc, (vop_t *) ffs_write },
#ifdef FFS_EXTATTR
#ifdef UFS_EXTATTR
{ &vop_getextattr_desc, (vop_t *) ufs_vop_getextattr },
{ &vop_setextattr_desc, (vop_t *) ufs_vop_setextattr },
#endif
@ -95,7 +95,7 @@ vop_t **ffs_specop_p;
static struct vnodeopv_entry_desc ffs_specop_entries[] = {
{ &vop_default_desc, (vop_t *) ufs_vnoperatespec },
{ &vop_fsync_desc, (vop_t *) ffs_fsync },
#ifdef FFS_EXTATTR
#ifdef UFS_EXTATTR
{ &vop_getextattr_desc, (vop_t *) ufs_vop_getextattr },
{ &vop_setextattr_desc, (vop_t *) ufs_vop_setextattr },
#endif
@ -107,7 +107,7 @@ static struct vnodeopv_desc ffs_specop_opv_desc =
vop_t **ffs_fifoop_p;
static struct vnodeopv_entry_desc ffs_fifoop_entries[] = {
{ &vop_default_desc, (vop_t *) ufs_vnoperatefifo },
#ifdef FFS_EXTATTR
#ifdef UFS_EXTATTR
{ &vop_getextattr_desc, (vop_t *) ufs_vop_getextattr },
{ &vop_setextattr_desc, (vop_t *) ufs_vop_setextattr },
#endif

View File

@ -51,9 +51,9 @@
#include <ufs/ufs/inode.h>
#include <ufs/ufs/ufs_extern.h>
#include "opt_ffs.h"
#include "opt_ufs.h"
#ifdef FFS_EXTATTR
#ifdef UFS_EXTATTR
#define MIN(a,b) (((a)<(b))?(a):(b))
@ -214,7 +214,7 @@ ufs_extattr_start(struct mount *mp, struct proc *p)
return (error);
}
#ifdef FFS_EXTATTR_AUTOSTART
#ifdef UFS_EXTATTR_AUTOSTART
/*
* Helper routine: given a locked parent directory and filename, return
* the locked vnode of the inode associated with the name. Will not
@ -298,7 +298,7 @@ ufs_extattr_lookup(struct vnode *start_dvp, int lockparent, char *dirname,
*vp = target_vp;
return (0);
}
#endif /* !FFS_EXTATTR_AUTOSTART */
#endif /* !UFS_EXTATTR_AUTOSTART */
/*
* Enable an EA using the passed file system, backing vnode, attribute name,
@ -344,7 +344,7 @@ ufs_extattr_enable_with_open(struct ufsmount *ump, struct vnode *vp,
return (ufs_extattr_enable(ump, namespace, attrname, vp, p));
}
#ifdef FFS_EXTATTR_AUTOSTART
#ifdef UFS_EXTATTR_AUTOSTART
/*
* Given a locked directory vnode, iterate over the names in the directory
* and use ufs_extattr_lookup() to retrieve locked vnodes of potential
@ -531,7 +531,7 @@ ufs_extattr_autostart(struct mount *mp, struct proc *p)
return (error);
}
#endif /* !FFS_EXTATTR_AUTOSTART */
#endif /* !UFS_EXTATTR_AUTOSTART */
/*
* Stop extended attribute support on an FS.
@ -1251,4 +1251,4 @@ ufs_extattr_vnode_inactive(struct vnode *vp, struct proc *p)
ufs_extattr_uepm_unlock(ump, p);
}
#endif /* !FFS_EXTATTR */
#endif /* !UFS_EXTATTR */

View File

@ -39,8 +39,8 @@
* $FreeBSD$
*/
#include "opt_ffs.h"
#include "opt_quota.h"
#include "opt_ufs.h"
#include <sys/param.h>
#include <sys/vnode.h>
@ -83,7 +83,7 @@ ufs_inactive(ap)
if (!getinoquota(ip))
(void)chkiq(ip, -1, NOCRED, 0);
#endif
#ifdef FFS_EXTATTR
#ifdef UFS_EXTATTR
ufs_extattr_vnode_inactive(ap->a_vp, ap->a_p);
#endif
error = UFS_TRUNCATE(vp, (off_t)0, 0, NOCRED, p);