aboutsummaryrefslogtreecommitdiff
path: root/sys/gnu/fs/xfs/FreeBSD
diff options
context:
space:
mode:
authorAttilio Rao <attilio@FreeBSD.org>2009-05-11 15:33:26 +0000
committerAttilio Rao <attilio@FreeBSD.org>2009-05-11 15:33:26 +0000
commitdfd233edd5040ed82a16a0074e220188e2c67ad4 (patch)
tree6591f00318da636f44a6ceb26f517e7795eb1b44 /sys/gnu/fs/xfs/FreeBSD
parent03cc95d21a36ab2a353cbbfbcfbc5d83e4f4a6e1 (diff)
downloadsrc-dfd233edd5040ed82a16a0074e220188e2c67ad4.tar.gz
src-dfd233edd5040ed82a16a0074e220188e2c67ad4.zip
Remove the thread argument from the FSD (File-System Dependent) parts of
the VFS. Now all the VFS_* functions and relating parts don't want the context as long as it always refers to curthread. In some points, in particular when dealing with VOPs and functions living in the same namespace (eg. vflush) which still need to be converted, pass curthread explicitly in order to retain the old behaviour. Such loose ends will be fixed ASAP. While here fix a bug: now, UFS_EXTATTR can be compiled alone without the UFS_EXTATTR_AUTOSTART option. VFS KPI is heavilly changed by this commit so thirdy parts modules needs to be recompiled. Bump __FreeBSD_version in order to signal such situation.
Notes
Notes: svn path=/head/; revision=191990
Diffstat (limited to 'sys/gnu/fs/xfs/FreeBSD')
-rw-r--r--sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c29
1 files changed, 12 insertions, 17 deletions
diff --git a/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c b/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c
index 1374fa55c3c7..f89618e93d02 100644
--- a/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c
+++ b/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c
@@ -180,8 +180,7 @@ _xfs_param_copyin(struct mount *mp, struct thread *td)
}
static int
-_xfs_mount(struct mount *mp,
- struct thread *td)
+_xfs_mount(struct mount *mp)
{
struct xfsmount *xmp;
struct xfs_vnode *rootvp;
@@ -189,8 +188,10 @@ _xfs_mount(struct mount *mp,
struct vnode *rvp, *devvp;
struct cdev *ddev;
struct g_consumer *cp;
+ struct thread *td;
int error;
+ td = curthread;
ddev = NULL;
cp = NULL;
@@ -229,7 +230,7 @@ _xfs_mount(struct mount *mp,
mp->mnt_stat.f_fsid.val[0] = dev2udev(ddev);
mp->mnt_stat.f_fsid.val[1] = mp->mnt_vfc->vfc_typenum;
- if ((error = VFS_STATFS(mp, &mp->mnt_stat, td)) != 0)
+ if ((error = VFS_STATFS(mp, &mp->mnt_stat)) != 0)
goto fail_unmount;
rvp = rootvp->v_vnode;
@@ -263,10 +264,9 @@ _xfs_mount(struct mount *mp,
* Free reference to null layer
*/
static int
-_xfs_unmount(mp, mntflags, td)
+_xfs_unmount(mp, mntflags)
struct mount *mp;
int mntflags;
- struct thread *td;
{
struct vnode *devvp;
struct g_consumer *cp;
@@ -278,7 +278,7 @@ _xfs_unmount(mp, mntflags, td)
if (devvp != NULL)
cp = devvp->v_bufobj.bo_private;
- XVFS_UNMOUNT(MNTTOVFS(mp), 0, td->td_ucred, error);
+ XVFS_UNMOUNT(MNTTOVFS(mp), 0, curthread->td_ucred, error);
if (error == 0) {
if (cp != NULL) {
DROP_GIANT();
@@ -292,11 +292,10 @@ _xfs_unmount(mp, mntflags, td)
}
static int
-_xfs_root(mp, flags, vpp, td)
+_xfs_root(mp, flags, vpp)
struct mount *mp;
int flags;
struct vnode **vpp;
- struct thread *td;
{
xfs_vnode_t *vp;
int error;
@@ -310,22 +309,20 @@ _xfs_root(mp, flags, vpp, td)
}
static int
-_xfs_quotactl(mp, cmd, uid, arg, td)
+_xfs_quotactl(mp, cmd, uid, arg)
struct mount *mp;
int cmd;
uid_t uid;
void *arg;
- struct thread *td;
{
printf("xfs_quotactl\n");
return EOPNOTSUPP;
}
static int
-_xfs_statfs(mp, sbp, td)
+_xfs_statfs(mp, sbp)
struct mount *mp;
struct statfs *sbp;
- struct thread *td;
{
int error;
@@ -340,10 +337,9 @@ _xfs_statfs(mp, sbp, td)
}
static int
-_xfs_sync(mp, waitfor, td)
+_xfs_sync(mp, waitfor)
struct mount *mp;
int waitfor;
- struct thread *td;
{
int error;
int flags = SYNC_FSDATA|SYNC_ATTR|SYNC_REFCACHE;
@@ -352,7 +348,7 @@ _xfs_sync(mp, waitfor, td)
flags |= SYNC_WAIT;
else if (waitfor == MNT_LAZY)
flags |= SYNC_BDFLUSH;
- XVFS_SYNC(MNTTOVFS(mp), flags, td->td_ucred, error);
+ XVFS_SYNC(MNTTOVFS(mp), flags, curthread->td_ucred, error);
return (error);
}
@@ -386,8 +382,7 @@ _xfs_fhtovp(mp, fidp, vpp)
static int
_xfs_extattrctl(struct mount *mp, int cm,
struct vnode *filename_v,
- int attrnamespace, const char *attrname,
- struct thread *td)
+ int attrnamespace, const char *attrname)
{
printf("xfs_extattrctl\n");
return ENOSYS;