>I would suggest you to add some DBUG_PRINT information in my_pwrite()
>to see if it's the lseek() or write() that fails.
I did that: seek was ok, while write was failing; this was strange (why
seek was not returning EBADF), but I wasn't aware of locking.
>Another thing to try is to run mysqld with --skip-locking; This will
>disable the code in my_lock(). If things starts working after this,
it worked!! so the bug is in the locking code: I will look at it later.
Thanks for support,
* member of TeamOS/2 - Italy