Vnode API change: mnt_vnodelist traversal

2014-03-03 Thread J. Hannken-Illjes
Current support for iterating over mnt_vnodelist (the list of vnodes attached to a specific mount point) is rudimentary. All we have is vmark() / vunmark() to set a marker on the list. Every caller has to care about list and vnode mutexes, reference count being zero, intermediate vnode states lik

Re: Vnode API change: mnt_vnodelist traversal

2014-03-03 Thread Taylor R Campbell
Date: Mon, 3 Mar 2014 11:11:04 +0100 From: "J. Hannken-Illjes" Add an interface to iterate over a vnode list: void vfs_vnode_iterator_init(struct mount *mp, void **marker) void vfs_vnode_iterator_destroy(void *marker) bool vfs_vnode_iterator_next(void *marker, struc

Re: Vnode API change: mnt_vnodelist traversal

2014-03-03 Thread J. Hannken-Illjes
On Mar 3, 2014, at 11:32 AM, Thomas Klausner wrote: > On Mon, Mar 03, 2014 at 11:11:04AM +0100, J. Hannken-Illjes wrote: >> A diff implementing this and using it for those operations running >> vrecycle() is at http://www.netbsd.org/~hannken/vnode-pass4-1.diff >> >> Once all operations are conve

Re: Vnode API change: mnt_vnodelist traversal

2014-03-03 Thread J. Hannken-Illjes
On Mar 3, 2014, at 3:28 PM, Taylor R Campbell wrote: > Date: Mon, 3 Mar 2014 11:11:04 +0100 > From: "J. Hannken-Illjes" > > Add an interface to iterate over a vnode list: > > void vfs_vnode_iterator_init(struct mount *mp, void **marker) > void vfs_vnode_iterator_destroy(void

Re: Vnode API change: mnt_vnodelist traversal

2014-03-03 Thread Taylor R Campbell
Date: Mon, 3 Mar 2014 15:55:16 +0100 From: "J. Hannken-Illjes" On Mar 3, 2014, at 3:28 PM, Taylor R Campbell wrote: > /* mount.h */ > struct vnode_iterator; /* opaque */ > > void vfs_vnode_iterator_init(struct mount *mp, struct vnode_iterator **vip); > void vfs_vnode_

Re: Vnode API change: mnt_vnodelist traversal

2014-03-03 Thread Taylor R Campbell
Date: Mon, 3 Mar 2014 16:19:40 +0100 From: "J. Hannken-Illjes" On Mar 3, 2014, at 4:11 PM, Taylor R Campbell wrote: > That is exactly what I was going for, except with a typed pointer > instead of a void pointer. Please explain in more detail why you prefer a typed pointer o

Re: Vnode API change: mnt_vnodelist traversal

2014-03-03 Thread J. Hannken-Illjes
On Mar 3, 2014, at 4:11 PM, Taylor R Campbell wrote: > Date: Mon, 3 Mar 2014 15:55:16 +0100 > From: "J. Hannken-Illjes" > > On Mar 3, 2014, at 3:28 PM, Taylor R Campbell > wrote: > >> /* mount.h */ >> struct vnode_iterator; /* opaque */ >> >> void vfs_vnode_iterator_init(struct mount

Re: Vnode API change: mnt_vnodelist traversal

2014-03-03 Thread J. Hannken-Illjes
On Mar 3, 2014, at 4:25 PM, Taylor R Campbell wrote: > Date: Mon, 3 Mar 2014 16:19:40 +0100 > From: "J. Hannken-Illjes" > > On Mar 3, 2014, at 4:11 PM, Taylor R Campbell > wrote: > >> That is exactly what I was going for, except with a typed pointer >> instead of a void pointer. > >

Re: Vnode API change: mnt_vnodelist traversal

2014-03-03 Thread David Laight
On Mon, Mar 03, 2014 at 03:55:12PM +0100, J. Hannken-Illjes wrote: > On Mar 3, 2014, at 11:32 AM, Thomas Klausner wrote: > > > On Mon, Mar 03, 2014 at 11:11:04AM +0100, J. Hannken-Illjes wrote: > >> A diff implementing this and using it for those operations running > >> vrecycle() is at http://ww

Re: Vnode API change: mnt_vnodelist traversal

2014-03-03 Thread Taylor R Campbell
Date: Mon, 3 Mar 2014 17:20:43 +0100 From: "J. Hannken-Illjes" New diff at http://www.netbsd.org/~hannken/vnode-pass4-3.diff Looks good to me now, assuming all tests pass with it. (Do we have any automatic tests for ffs_reload &c.?) The lfs changes look suspect -- there is nothing int

rototilling the vnode life cycle, take two

2014-03-03 Thread Taylor R Campbell
the tree. With apologies to the mailing list archive (half a dozen files and >2000 lines of code), I put it here: https://www.NetBSD.org/~riastradh/tmp/20140303/ Comments? (Other than `forget vfs and make drm2 happen!', which I intend to do...) [*] Neither is a good choice of synchr