On Wed, Feb 15, 2017 at 01:40:30PM +0800, Eli Qiao wrote:
On Wednesday, 15 February 2017 at 1:14 AM, Marcelo Tosatti wrote:
> On Tue, Feb 14, 2017 at 09:37:02AM +0100, Martin Kletzander wrote:
> > On Mon, Feb 13, 2017 at 04:09:13PM -0200, Marcelo Tosatti wrote:
> > > On Mon, Feb 13, 2017 at 03:42:04PM +0800, Eli Qiao wrote:
> > > > we will scan for all directors while the libvirt daemon begin running,
and libvirt will remove exist directories if no tasks inside of it.
> >
> > Definitely not. What if someone wants to create another allocation?
> > They start by creating a directory, then libvirtd removes it before they
> > manage to add anything to tasks.
> >
>
>
> If the other application is properly using the filesystem lock, then:
>
> OTHER APP, CREATE PROCEDURE:
>
> 1. grab fs lock.
> 2. create directory.
> 3. write schemata.
> 4. write tasks.
> 5. release fs lock
>
> Any operation that writes to any file in resctrlfs will first grab
> the lock. So the problem being discussed is handled.
>
Yes, my point was that this is yet another reason why we *must* use the
lock. Then it's fine. I should've been more clear, sorry.