On Sat, Apr 22, 2000, Henrik Nordstrom wrote:
> Hi adrian.
>
> Your recent cbdataUnlock additions in modio looks wrongly placed.
>
> 1. The unlock and callback should most likely be performed by the
> store*IOCallback() function, not at individual places in the code.
>
> 2. The unlock should ONLY be performed after the data has been used,
> i.e. when the pointer is forgotten by the locking code. This is after
> the pointer has been cleared in the structure and the callback called,
> not before the callback.
>
> 3. callbacks should be protected by cbdataValid checks to detect aborted
> calls.
There are two distinct callbacks there, the read callback and the
sio callback. storeUfsIOCallback() is called when the storeIO operation
is about to finish. The reason the unlock was put where it as is
that if there was an error during the read, the read callback isn't
ever called, the storeIO callback however is called to show that
there was a problem. BUT I don't agree with the way it is done, and
its done slightly differently in aufs - the read callback is called
regardless and on failure the rlen is -1. After some thought
last night, I'm going to commit a change to ufs/coss to do this
instead.
Adrian
Received on Sat Apr 22 2000 - 04:43:30 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:23 MST