diff options
| author | Ian Dowse <iedowse@FreeBSD.org> | 2002-07-01 11:00:47 +0000 |
|---|---|---|
| committer | Ian Dowse <iedowse@FreeBSD.org> | 2002-07-01 11:00:47 +0000 |
| commit | 5346934fe7577876dc77535e40153c1275a2b252 (patch) | |
| tree | 2098674faebe22dd269ccf65053fd9c36532da98 /sys/ufs | |
| parent | 0567678261f709788b6d93ec632cd582dc83e620 (diff) | |
Notes
Diffstat (limited to 'sys/ufs')
| -rw-r--r-- | sys/ufs/ffs/ffs_extern.h | 1 | ||||
| -rw-r--r-- | sys/ufs/ffs/ffs_softdep.c | 13 | ||||
| -rw-r--r-- | sys/ufs/ffs/ffs_softdep_stub.c | 7 | ||||
| -rw-r--r-- | sys/ufs/ffs/ffs_vfsops.c | 19 |
4 files changed, 38 insertions, 2 deletions
diff --git a/sys/ufs/ffs/ffs_extern.h b/sys/ufs/ffs/ffs_extern.h index 8274765ef89d3..ae59ca380ffb9 100644 --- a/sys/ufs/ffs/ffs_extern.h +++ b/sys/ufs/ffs/ffs_extern.h @@ -106,6 +106,7 @@ extern vop_t **ffs_fifoop_p; * Soft update function prototypes. */ void softdep_initialize(void); +void softdep_uninitialize(void); int softdep_mount(struct vnode *, struct mount *, struct fs *, struct ucred *); int softdep_flushworklist(struct mount *, int *, struct thread *); diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index 0fc1848aa1aa2..4921344f4578f 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -1132,6 +1132,19 @@ softdep_initialize() } /* + * Executed after all filesystems have been unmounted during + * filesystem module unload. + */ +void +softdep_uninitialize() +{ + + hashdestroy(pagedep_hashtbl, M_PAGEDEP, pagedep_hash); + hashdestroy(inodedep_hashtbl, M_INODEDEP, inodedep_hash); + hashdestroy(newblk_hashtbl, M_NEWBLK, newblk_hash); +} + +/* * Called at mount time to notify the dependency code that a * filesystem wishes to use it. */ diff --git a/sys/ufs/ffs/ffs_softdep_stub.c b/sys/ufs/ffs/ffs_softdep_stub.c index 47feaecbc92be..df084c7dddc88 100644 --- a/sys/ufs/ffs/ffs_softdep_stub.c +++ b/sys/ufs/ffs/ffs_softdep_stub.c @@ -83,6 +83,13 @@ softdep_initialize() } void +softdep_uninitialize() +{ + + return; +} + +void softdep_setup_inomapdep(bp, ip, newinum) struct buf *bp; struct inode *ip; diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 61cec1fa5f3ec..fa0bffa8f4a28 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -73,6 +73,7 @@ static void ffs_oldfscompat_read(struct fs *, struct ufsmount *, ufs2_daddr_t); static void ffs_oldfscompat_write(struct fs *, struct ufsmount *); static int ffs_init(struct vfsconf *); +static int ffs_uninit(struct vfsconf *); static struct vfsops ufs_vfsops = { ffs_mount, @@ -87,7 +88,7 @@ static struct vfsops ufs_vfsops = { vfs_stdcheckexp, ffs_vptofh, ffs_init, - vfs_stduninit, + ffs_uninit, #ifdef UFS_EXTATTR ufs_extattrctl, #else @@ -1375,7 +1376,7 @@ ffs_vptofh(vp, fhp) } /* - * Initialize the filesystem; just use ufs_init. + * Initialize the filesystem. */ static int ffs_init(vfsp) @@ -1387,6 +1388,20 @@ ffs_init(vfsp) } /* + * Undo the work of ffs_init(). + */ +static int +ffs_uninit(vfsp) + struct vfsconf *vfsp; +{ + int ret; + + ret = ufs_uninit(vfsp); + softdep_uninitialize(); + return (ret); +} + +/* * Write a superblock and associated information back to disk. */ static int |
