Re: Add a mountlist iterator (round 2)

2017-04-10 Thread J. Hannken-Illjes
> On 9. Apr 2017, at 19:16, Taylor R Campbell > wrote: > >> Date: Sun, 9 Apr 2017 18:47:25 +0200 >> From: "J. Hannken-Illjes" >> >>> On 6. Apr 2017, at 11:44, J. Hannken-Illjes wrote: >>> Good hint.

Re: Add a mountlist iterator (round 2)

2017-04-09 Thread Taylor R Campbell
> Date: Sun, 9 Apr 2017 18:47:25 +0200 > From: "J. Hannken-Illjes" > > > On 6. Apr 2017, at 11:44, J. Hannken-Illjes wrote: > > Good hint. Prepared a partial implementation of > > > > int > > mountlist_iterate(int (*cb)(struct mount *, void

Re: Add a mountlist iterator (round 2)

2017-04-09 Thread J. Hannken-Illjes
> On 6. Apr 2017, at 11:44, J. Hannken-Illjes wrote: > >> >> On 5. Apr 2017, at 05:14, Chuck Silvers wrote: >> >> have you considered a callback-based interface where the loop >> is inside the iteration API rather than in the caller? >> the

Re: Add a mountlist iterator (round 2)

2017-04-06 Thread J. Hannken-Illjes
> On 5. Apr 2017, at 05:14, Chuck Silvers wrote: > > have you considered a callback-based interface where the loop > is inside the iteration API rather than in the caller? > the vfs_busy/unbusy could also be hidden in the iteration API > so that the callback would not need need

Re: Add a mountlist iterator (round 2)

2017-04-05 Thread Chuck Silvers
have you considered a callback-based interface where the loop is inside the iteration API rather than in the caller? the vfs_busy/unbusy could also be hidden in the iteration API so that the callback would not need need to worry about it at all. I looked at how the iteration stuff is used in your

Re: Add a mountlist iterator (round 2)

2017-04-04 Thread J. Hannken-Illjes
Time to start a second round. This time the iterator only, vfs_busy() and friends deferred to a new thread once the iterator is done. Changes from the previous proposal: - Removed the "flags" argument from mountlist_iterator_next(), will add mountlist_iterator_trynext() and vfs_trybusy() when

Re: Add a mountlist iterator

2017-04-02 Thread J. Hannken-Illjes
> On 2. Apr 2017, at 16:34, Taylor R Campbell > wrote: > >> Date: Sun, 2 Apr 2017 11:09:49 +0200 >> From: "J. Hannken-Illjes" >> >>> On 1. Apr 2017, at 23:03, Taylor R Campbell >>> wrote:

Re: Add a mountlist iterator

2017-04-02 Thread Taylor R Campbell
> Date: Sun, 2 Apr 2017 11:09:49 +0200 > From: "J. Hannken-Illjes" > > > On 1. Apr 2017, at 23:03, Taylor R Campbell > > wrote: > > > > Any particular reason to use a pointer-to-opaque-pointer here instead > > of a

Re: Add a mountlist iterator

2017-04-02 Thread J. Hannken-Illjes
> On 1. Apr 2017, at 23:03, Taylor R Campbell > wrote: > >> Date: Thu, 30 Mar 2017 11:21:41 +0200 >> From: "J. Hannken-Illjes" >> >> Plan is to untangle the mountlist processing from vfs_busy() / vfs_unbusy() >> and add an

Re: Add a mountlist iterator

2017-04-01 Thread Taylor R Campbell
> Date: Thu, 30 Mar 2017 11:21:41 +0200 > From: "J. Hannken-Illjes" > > Plan is to untangle the mountlist processing from vfs_busy() / vfs_unbusy() > and add an iterator for the mountlist: Generally seems like a good idea to me! > - void

Re: Add a mountlist iterator

2017-03-30 Thread Christos Zoulas
In article <534552fb-af29-4219-8390-7514a2665...@eis.cs.tu-bs.de>, J. Hannken-Illjes wrote: >Currently vfs_busy() / vfs_unbusy() get used to > >- Enter/leave a critical section against unmounting > >- Add a reference to the mount > >- return the next mount from the

Add a mountlist iterator

2017-03-30 Thread J. Hannken-Illjes
Currently vfs_busy() / vfs_unbusy() get used to - Enter/leave a critical section against unmounting - Add a reference to the mount - return the next mount from the mountlist on error Plan is to untangle the mountlist processing from vfs_busy() / vfs_unbusy() and add an iterator for the