[haiku-gsoc] Re: BFS bug #2

2008/6/28 Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>:

> Just what I said: *remove* the volume lock there - there is no holding
> of the volume lock anymore.
> Since it's way easier to fix it without writing a whole essay, I just
> went ahead and did so in r26154; I certainly don't want to hurt your
> feelings, but I really don't see any space for misconstruction in what
> I wrote above. Please at least read what I write carefully before
> shooting questions; that just unnecessarily costs time for both of us.
>
>> > 2) the needlessly complex one: make the journal lock an r/w lock,
>> > and
>> > make rename read lock it before actually starting a transaction (a
>> > transaction would always write lock).
>> >
>> > IMO 1) is the way to go, since 2) would only be an optimization for
>> > the
>> > error case, and can thus be neglected.
>> Just to make things clear, which lock are you saying should be held
>> first?
>> Journaled lock, or volume lock?
>
> 2) implies 1) in the sense that the volume lock is removed.
>
> Bye,
>   Axel.
>

The only thing I didn't understand, thus the questions, is how can you just
remove the volume lock in the bfs_rename function and move up the
transaction lock.
It looks to me as if the transaction lock can substitute the volume
lock purpose in the first part
of the bfs_rename function, but now I see that not modification can be
made to the volume
unless the transaction lock is held. At least that's the only
explanation I could come up with.

Regards,
-- 
Salvatore Benedetto (a.k.a. emitrax)
Student of Computer Engineer
University of Pisa
www.haiku-os.it

Other related posts: