diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/fs/msdosfs/msdosfs_vfsops.c | 1 | ||||
-rw-r--r-- | sys/gnu/ext2fs/ext2_vfsops.c | 1 | ||||
-rw-r--r-- | sys/gnu/fs/ext2fs/ext2_vfsops.c | 1 | ||||
-rw-r--r-- | sys/kern/vfs_extattr.c | 1 | ||||
-rw-r--r-- | sys/kern/vfs_subr.c | 1 | ||||
-rw-r--r-- | sys/kern/vfs_syscalls.c | 1 | ||||
-rw-r--r-- | sys/sys/mount.h | 8 |
7 files changed, 14 insertions, 0 deletions
diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index ca5a9ca..b0f0a53 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -177,6 +177,7 @@ msdosfs_mountroot() mp->mnt_op = &msdosfs_vfsops; mp->mnt_flag = 0; TAILQ_INIT(&mp->mnt_nvnodelist); + TAILQ_INIT(&mp->mnt_reservedvnlist); args.flags = 0; args.uid = 0; diff --git a/sys/gnu/ext2fs/ext2_vfsops.c b/sys/gnu/ext2fs/ext2_vfsops.c index 4d9ea28..b20d205 100644 --- a/sys/gnu/ext2fs/ext2_vfsops.c +++ b/sys/gnu/ext2fs/ext2_vfsops.c @@ -142,6 +142,7 @@ ext2_mountroot() mp = bsd_malloc((u_long)sizeof(struct mount), M_MOUNT, M_WAITOK); bzero((char *)mp, (u_long)sizeof(struct mount)); TAILQ_INIT(&mp->mnt_nvnodelist); + TAILQ_INIT(&mp->mnt_reservedvnlist); mp->mnt_op = &ext2fs_vfsops; mp->mnt_flag = MNT_RDONLY; if (error = ext2_mountfs(rootvp, mp, td)) { diff --git a/sys/gnu/fs/ext2fs/ext2_vfsops.c b/sys/gnu/fs/ext2fs/ext2_vfsops.c index 4d9ea28..b20d205 100644 --- a/sys/gnu/fs/ext2fs/ext2_vfsops.c +++ b/sys/gnu/fs/ext2fs/ext2_vfsops.c @@ -142,6 +142,7 @@ ext2_mountroot() mp = bsd_malloc((u_long)sizeof(struct mount), M_MOUNT, M_WAITOK); bzero((char *)mp, (u_long)sizeof(struct mount)); TAILQ_INIT(&mp->mnt_nvnodelist); + TAILQ_INIT(&mp->mnt_reservedvnlist); mp->mnt_op = &ext2fs_vfsops; mp->mnt_flag = MNT_RDONLY; if (error = ext2_mountfs(rootvp, mp, td)) { diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c index 530ad15..cb82b08 100644 --- a/sys/kern/vfs_extattr.c +++ b/sys/kern/vfs_extattr.c @@ -341,6 +341,7 @@ vfs_mount(td, fstype, fspath, fsflags, fsdata) */ mp = malloc(sizeof(struct mount), M_MOUNT, M_WAITOK | M_ZERO); TAILQ_INIT(&mp->mnt_nvnodelist); + TAILQ_INIT(&mp->mnt_reservedvnlist); lockinit(&mp->mnt_lock, PVFS, "vfslock", 0, LK_NOPAUSE); (void)vfs_busy(mp, LK_NOWAIT, 0, td); mp->mnt_op = vfsp->vfc_vfsops; diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 2b822e9..ae89f86 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -346,6 +346,7 @@ vfs_rootmountalloc(fstypename, devname, mpp) lockinit(&mp->mnt_lock, PVFS, "vfslock", 0, LK_NOPAUSE); (void)vfs_busy(mp, LK_NOWAIT, 0, td); TAILQ_INIT(&mp->mnt_nvnodelist); + TAILQ_INIT(&mp->mnt_reservedvnlist); mp->mnt_vfc = vfsp; mp->mnt_op = vfsp->vfc_vfsops; mp->mnt_flag = MNT_RDONLY; diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 530ad15..cb82b08 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -341,6 +341,7 @@ vfs_mount(td, fstype, fspath, fsflags, fsdata) */ mp = malloc(sizeof(struct mount), M_MOUNT, M_WAITOK | M_ZERO); TAILQ_INIT(&mp->mnt_nvnodelist); + TAILQ_INIT(&mp->mnt_reservedvnlist); lockinit(&mp->mnt_lock, PVFS, "vfslock", 0, LK_NOPAUSE); (void)vfs_busy(mp, LK_NOWAIT, 0, td); mp->mnt_op = vfsp->vfc_vfsops; diff --git a/sys/sys/mount.h b/sys/sys/mount.h index 23d26b8..8b0d012 100644 --- a/sys/sys/mount.h +++ b/sys/sys/mount.h @@ -109,6 +109,13 @@ struct statfs { * Structure per mounted file system. Each mounted file system has an * array of operations and an instance record. The file systems are * put on a doubly linked list. + * + * NOTE: mnt_nvnodelist and mnt_reservedvnlist. At the moment vnodes + * are linked into mnt_nvnodelist. At some point in the near future the + * vnode list will be split into a 'dirty' and 'clean' list. mnt_nvnodelist + * will become the dirty list and mnt_reservedvnlist will become the 'clean' + * list. Filesystem kld's syncing code should remain compatible since + * they only need to scan the dirty vnode list (nvnodelist -> dirtyvnodelist). */ TAILQ_HEAD(vnodelst, vnode); @@ -119,6 +126,7 @@ struct mount { struct vnode *mnt_vnodecovered; /* vnode we mounted on */ struct vnode *mnt_syncer; /* syncer vnode */ struct vnodelst mnt_nvnodelist; /* list of vnodes this mount */ + struct vnodelst mnt_reservedvnlist; /* (future) dirty vnode list */ struct lock mnt_lock; /* mount structure lock */ int mnt_writeopcount; /* write syscalls in progress */ int mnt_flag; /* flags shared with user */ |