Re: Finding an available fss device

2018-08-12 Thread Robert Elz
Date:Sun, 12 Aug 2018 08:05:26 + From:Emmanuel Dreyfus Message-ID: <20180812080526.gf17...@homeworld.netbsd.org> | Why would test then lock? Because it avoids the overheads of acquiring a lock for no particularly good purpose, only to immediately release it

Re: Finding an available fss device

2018-08-12 Thread Robert Elz
Date:Sun, 12 Aug 2018 13:25:26 + From:Emmanuel Dreyfus Message-ID: <20180812132526.gh17...@homeworld.netbsd.org> | I was wondering about the FSS_ACTIVE test. It is just one bit, either it is set, or it is not SInce the code is already referencing sc->

Re: How to prevent a mutex being _enter()ed from being _destroy()ed?

2018-08-12 Thread Edgar Fuß
> Are you sure it _only_ happens in the do/while and _never_ in the > preceding if? No, I'm not sure. > In any case, it's just a diagnostic, not a protocol for a robust > software system to rely on. If it doesn't work, can try another one. OK, I hit my new panic in soput(). The call chain is

Re: How to prevent a mutex being _enter()ed from being _destroy()ed?

2018-08-12 Thread Edgar Fuß
> The unp_gc thread assumes that holding a reference to the associated > struct file, by incrementing f_count, prevents the socket from being > freed. Certainly that prevents closef from calling fo_close, which > for a socket is soo_close, which calls soclose, which calls sofree, > which calls

Re: Finding an available fss device

2018-08-12 Thread J. Hannken-Illjes
> On 12. Aug 2018, at 03:58, Emmanuel Dreyfus wrote: > > On Sat, Aug 11, 2018 at 10:33:04AM +0200, J. Hannken-Illjes wrote: >> When fssconfig "hangs" the dump is creating a snapshot. Creating >> a snapshot (and suspending a file system) is serialized. Allowing >> more than one file system

Re: Finding an available fss device

2018-08-12 Thread Emmanuel Dreyfus
On Sat, Aug 11, 2018 at 10:52:42AM +0700, Robert Elz wrote: > I doubt that your new proposed ioctl() is a very good > interface Indeed, the following change is enough to find a free fss without a hang, and it does not introduce a new ioctl. It is quite close to your proposal, except I lock

Re: Finding an available fss device

2018-08-12 Thread Emmanuel Dreyfus
On Sun, Aug 12, 2018 at 09:55:27AM +0200, J. Hannken-Illjes wrote: > > You mean you cannot at the same tme snapshot /mount0 on fss0 and > > /mount1 on fss1? > > Yes, you have to create the snapshot on /mount0 and once it has been > created you create the snapshot on /mount1. Where is that

Re: Finding an available fss device

2018-08-12 Thread J. Hannken-Illjes
> On 12. Aug 2018, at 10:07, Emmanuel Dreyfus wrote: > > On Sun, Aug 12, 2018 at 09:55:27AM +0200, J. Hannken-Illjes wrote: >>> You mean you cannot at the same tme snapshot /mount0 on fss0 and >>> /mount1 on fss1? >> >> Yes, you have to create the snapshot on /mount0 and once it has been >>