Hi, I had the problem that samba told me wrong error codes while debugging changes to async i/o code. It gave me an EINTR which was introduced by an select() interrupted by an aio signal, rather the correct code. Root of the problem: The errno variable should not be used to retrieve error codes for async i/o requests. It should use the codes retrieved by aio_error() before. See for instance http://books.google.de/books?id=4Kb_1sKprCMC&pg=PA317&lpg=PA317&dq=aio_error&source=bl&ots=v7iGD2z_LO&sig=liqepJUKRz1HgSX6sh_2PDWvsKU&hl=de&ei=LOzOSvH3HZOb_AaOv8XZAg&sa=X&oi=book_result&ct=result&resnum=8#v=onepage&q=aio_error&f=false This requires to move the ECANCELED detection to a different place and to handle the error code from aio_error() correctly. With this patch samba should display correct error codes. While inspecting the write_behind code I suspect that error handling for this is non-existing, it does not even report errors. So I placed a TODO line where error handling should happen.
Created attachment 4833 [details] Patch relative to v3-4-test
Created attachment 4834 [details] Patch relative to master
Perfectly correct - thanks ! Pushed to master and 3.5.0. I'll check the 3.4.x patch next. Jeremy.
Created attachment 4840 [details] Slightly modified patch to correct the compile warning.
Created attachment 4841 [details] Patch for 3.3.x. Patch for 3.3.x (too late for 3.3.9 - possible for 3.3.10 if we do another 3.3.x release). Jeremy.
Volker please review the patch in attachment #4 [details] for possible inclusion in 3.4.3: https://bugzilla.samba.org/attachment.cgi?id=4840&action=view Please re-assign to Karolin if you agree. 3.4.3 code freeze is Oct. 15th so I think this can go in before that. Thanks, Jeremy.
+1 on both the 3.3 and 3.4 patches. Volker
Pushed to v3-3-test and v3-4-test. Closing out bug report. Thanks!