Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src



Module Name:    src
Committed By:   hannken
Date:           Wed Mar  5 09:37:29 UTC 2014

Modified Files:
        src/share/man/man9: vnode.9
        src/sys/kern: vfs_mount.c vfs_vnode.c
        src/sys/sys: mount.h param.h vnode.h
        src/sys/ufs/ext2fs: ext2fs_vfsops.c
        src/sys/ufs/ffs: ffs_vfsops.c
        src/sys/ufs/lfs: lfs_syscalls.c

Log Message:
Current support for iterating over mnt_vnodelist is rudimentary.  Every
caller has to care about list and vnode mutexes, reference count being zero,
intermediate vnode states like VI_CLEAN, VI_XLOCK, VI_MARKER and so on.

Add an interface to iterate over a vnode list:

void vfs_vnode_iterator_init(struct mount *mp, struct vnode_iterator **marker)
void vfs_vnode_iterator_destroy(struct vnode_iterator *marker)
bool vfs_vnode_iterator_next(struct vnode_iterator *marker, struct vnode **vpp)

vfs_vnode_iterator_next() returns either "false / *vpp == NULL" when done
or "true / *vpp != NULL" to return the next referenced vnode from the list.

To make vrecycle() work in this environment change it to

bool vrecycle(struct vnode *vp)

where "vp" is a referenced vnode to be destroyed if this is the last reference.

Discussed on tech-kern.

Welcome to 6.99.34


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/share/man/man9/vnode.9
cvs rdiff -u -r1.26 -r1.27 src/sys/kern/vfs_mount.c
cvs rdiff -u -r1.32 -r1.33 src/sys/kern/vfs_vnode.c
cvs rdiff -u -r1.211 -r1.212 src/sys/sys/mount.h
cvs rdiff -u -r1.442 -r1.443 src/sys/sys/param.h
cvs rdiff -u -r1.243 -r1.244 src/sys/sys/vnode.h
cvs rdiff -u -r1.176 -r1.177 src/sys/ufs/ext2fs/ext2fs_vfsops.c
cvs rdiff -u -r1.292 -r1.293 src/sys/ufs/ffs/ffs_vfsops.c
cvs rdiff -u -r1.150 -r1.151 src/sys/ufs/lfs/lfs_syscalls.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index