after some fruitful discussions with Jörg, it turned out that my mtwrite 
patch prevents tar, star, gtar, and unzip from setting the file times 
correctly. I've investigated this issue and updated the patch accordingly.

Unfortunately, I encountered an issue concerning semaphores, which seem 
to have a race condition. At least I couldn't get it to work reliably 
with semaphores so I switched over to condition variables, which works 
now. I'll investigate the semaphore issue as soon as I have time, but 
I'm pretty convinced that there is a race condition in the semaphore 
implementation, as the semaphore value from time to time grew larger 
than the number of elements in the work list.

This was on Solaris 10 - so I'll try to generate a test for SX. Does 
anybody know of any issues related to semaphores?

the work creator did the following:
- lock the structure containing the list
- attach an element to the list
- post the semaphore
- unlock the structure

the worker thread did the following:
- wait on the semaphore
- lock the structure containing the list
- remove an element from the list
- unlock the structure
- perform the work described by the list element
- lock the structure
- update the structure to reflect the work results
- unlock the structure
- restart from the beginning

Is anything wrong with this approach? Replacing the semaphore calls with 
condition calls and swapping steps 1 and 2 of worker thread made it 
reliable...

- Thomas
P.S.: I published the updated mtwrite on my website yesterday - get it 
here: http://www.maier-komor.de/mtwrite.html
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to