summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2001-03-19 04:35:40 +0000
committerrwatson <rwatson@FreeBSD.org>2001-03-19 04:35:40 +0000
commit8a937bbc3a9d1a7f410a8dd8d27f0018404e5158 (patch)
tree608088c6defdc5504269796de0c3278f406f2486
parente23d374264a5c2952acfee692abf4e79a63d0a68 (diff)
downloadFreeBSD-src-8a937bbc3a9d1a7f410a8dd8d27f0018404e5158.zip
FreeBSD-src-8a937bbc3a9d1a7f410a8dd8d27f0018404e5158.tar.gz
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
-rw-r--r--sys/conf/options8
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c16
-rw-r--r--sys/ufs/ffs/ffs_vnops.c8
-rw-r--r--sys/ufs/ufs/ufs_extattr.c14
-rw-r--r--sys/ufs/ufs/ufs_inode.c4
5 files changed, 25 insertions, 25 deletions
diff --git a/sys/conf/options b/sys/conf/options
index b493aa7..e848c50 100644
--- a/sys/conf/options
+++ b/sys/conf/options
@@ -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
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index a643019..bac00b9 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -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",
diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c
index 4910f6a..8fefb0e 100644
--- a/sys/ufs/ffs/ffs_vnops.c
+++ b/sys/ufs/ffs/ffs_vnops.c
@@ -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
diff --git a/sys/ufs/ufs/ufs_extattr.c b/sys/ufs/ufs/ufs_extattr.c
index 1cb3912..b304493 100644
--- a/sys/ufs/ufs/ufs_extattr.c
+++ b/sys/ufs/ufs/ufs_extattr.c
@@ -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 @@ unlock:
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 @@ return_vput_attr_dvp:
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 */
diff --git a/sys/ufs/ufs/ufs_inode.c b/sys/ufs/ufs/ufs_inode.c
index dba4d77..96f0649 100644
--- a/sys/ufs/ufs/ufs_inode.c
+++ b/sys/ufs/ufs/ufs_inode.c
@@ -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);
OpenPOWER on IntegriCloud