- Update vfs_root implementations to match the new prototype. None of

these filesystems will support shared locks until they are explicitly
   modified to do so.  Careful review must be done to ensure that this
   is safe for each individual filesystem.

Sponsored by:	Isilon Systems, Inc.
This commit is contained in:
jeff 2005-03-24 07:36:16 +00:00
parent c9591f9ecd
commit 226bf6ead4
15 changed files with 29 additions and 19 deletions

View File

@ -96,7 +96,7 @@ devfs_mount(struct mount *mp, struct thread *td)
fmp->dm_basedir = fmp->dm_rootdir;
devfs_rules_newmount(fmp, td);
error = devfs_root(mp, &rvp, td);
error = devfs_root(mp, LK_EXCLUSIVE, &rvp, td);
if (error) {
lockdestroy(&fmp->dm_lock);
FREE(fmp, M_DEVFS);
@ -136,8 +136,9 @@ devfs_unmount(mp, mntflags, td)
/* Return locked reference to root. */
static int
devfs_root(mp, vpp, td)
devfs_root(mp, flags, vpp, td)
struct mount *mp;
int flags;
struct vnode **vpp;
struct thread *td;
{

View File

@ -126,8 +126,9 @@ fdesc_unmount(mp, mntflags, td)
}
static int
fdesc_root(mp, vpp, td)
fdesc_root(mp, flags, vpp, td)
struct mount *mp;
int flags;
struct vnode **vpp;
struct thread *td;
{

View File

@ -306,7 +306,7 @@ hpfs_mountfs(devvp, mp, td)
goto failed;
}
error = hpfs_root(mp, &vp, td);
error = hpfs_root(mp, LK_EXCLUSIVE, &vp, td);
if (error) {
hpfs_cpdeinit(hpmp);
hpfs_bmdeinit(hpmp);
@ -371,6 +371,7 @@ hpfs_unmount(
static int
hpfs_root(
struct mount *mp,
int flags,
struct vnode **vpp,
struct thread *td )
{

View File

@ -186,7 +186,8 @@ update_mp(mp, td)
if (FAT32(pmp))
pmp->pm_flags |= MSDOSFSMNT_LONGNAME;
else {
if ((error = msdosfs_root(mp, &rootvp, td)) != 0)
if ((error =
msdosfs_root(mp, LK_EXCLUSIVE, &rootvp, td)) != 0)
return error;
pmp->pm_flags |= findwin95(VTODE(rootvp))
? MSDOSFSMNT_LONGNAME
@ -804,8 +805,9 @@ msdosfs_unmount(mp, mntflags, td)
}
static int
msdosfs_root(mp, vpp, td)
msdosfs_root(mp, flags, vpp, td)
struct mount *mp;
int flags;
struct vnode **vpp;
struct thread *td;
{

View File

@ -525,6 +525,7 @@ ntfs_unmount(
static int
ntfs_root(
struct mount *mp,
int flags,
struct vnode **vpp,
struct thread *td )
{

View File

@ -223,8 +223,9 @@ nullfs_unmount(mp, mntflags, td)
}
static int
nullfs_root(mp, vpp, td)
nullfs_root(mp, flags, vpp, td)
struct mount *mp;
int flags;
struct vnode **vpp;
struct thread *td;
{

View File

@ -228,7 +228,7 @@ static int nwfs_mount(struct mount *mp, struct thread *td)
/* protect against invalid mount points */
nmp->m.mount_point[sizeof(nmp->m.mount_point)-1] = '\0';
vfs_getnewfsid(mp);
error = nwfs_root(mp, &vp, td);
error = nwfs_root(mp, LK_EXCLUSIVE, &vp, td);
if (error)
goto bad;
/*
@ -277,7 +277,7 @@ nwfs_unmount(struct mount *mp, int mntflags, struct thread *td)
/* Return locked vnode to root of a filesystem */
static int
nwfs_root(struct mount *mp, struct vnode **vpp, struct thread *td) {
nwfs_root(struct mount *mp, int flags, struct vnode **vpp, struct thread *td) {
struct vnode *vp;
struct nwmount *nmp;
struct nwnode *np;

View File

@ -202,8 +202,9 @@ portal_unmount(mp, mntflags, td)
}
static int
portal_root(mp, vpp, td)
portal_root(mp, flags, vpp, td)
struct mount *mp;
int flags;
struct vnode **vpp;
struct thread *td;
{

View File

@ -305,7 +305,7 @@ pfs_unmount(struct mount *mp, int mntflags, struct thread *td)
* Return a root vnode
*/
int
pfs_root(struct mount *mp, struct vnode **vpp, struct thread *td)
pfs_root(struct mount *mp, int flags, struct vnode **vpp, struct thread *td)
{
struct pfs_info *pi;

View File

@ -201,8 +201,8 @@ int pfs_mount (struct pfs_info *pi, struct mount *mp,
struct thread *td);
int pfs_unmount (struct mount *mp, int mntflags,
struct thread *td);
int pfs_root (struct mount *mp, struct vnode **vpp,
struct thread *td);
int pfs_root (struct mount *mp, int flags,
struct vnode **vpp, struct thread *td);
int pfs_statfs (struct mount *mp, struct statfs *sbp,
struct thread *td);
int pfs_init (struct pfs_info *pi, struct vfsconf *vfc);

View File

@ -243,7 +243,7 @@ smbfs_mount(struct mount *mp, struct thread *td)
}
}
vfs_getnewfsid(mp);
error = smbfs_root(mp, &vp, td);
error = smbfs_root(mp, LK_EXCLUSIVE, &vp, td);
if (error)
goto bad;
VOP_UNLOCK(vp, 0, td);
@ -316,7 +316,7 @@ smbfs_unmount(struct mount *mp, int mntflags, struct thread *td)
* Return locked root vnode of a filesystem
*/
static int
smbfs_root(struct mount *mp, struct vnode **vpp, struct thread *td)
smbfs_root(struct mount *mp, int flags, struct vnode **vpp, struct thread *td)
{
struct smbmount *smp = VFSTOSMBFS(mp);
struct vnode *vp;

View File

@ -531,7 +531,7 @@ udf_unmount(struct mount *mp, int mntflags, struct thread *td)
}
static int
udf_root(struct mount *mp, struct vnode **vpp, struct thread *td)
udf_root(struct mount *mp, int flags, struct vnode **vpp, struct thread *td)
{
struct udf_mnt *udfmp;
struct vnode *vp;

View File

@ -275,8 +275,9 @@ umapfs_unmount(mp, mntflags, td)
}
static int
umapfs_root(mp, vpp, td)
umapfs_root(mp, flags, vpp, td)
struct mount *mp;
int flags;
struct vnode **vpp;
struct thread *td;
{

View File

@ -382,8 +382,9 @@ union_unmount(mp, mntflags, td)
}
static int
union_root(mp, vpp, td)
union_root(mp, flags, vpp, td)
struct mount *mp;
int flags;
struct vnode **vpp;
struct thread *td;
{

View File

@ -264,7 +264,7 @@ union_lookup1(udvp, pdvp, vpp, cnp)
relock_pdvp = 1;
vput(dvp);
dvp = NULL;
error = VFS_ROOT(mp, &dvp, td);
error = VFS_ROOT(mp, LK_EXCLUSIVE, &dvp, td);
vfs_unbusy(mp, td);