On Fri, Dec 14, 2012 at 06:36:58PM +0800, Eric Liu wrote: > I am writing a Samba VFS module. The VFS CLOSE operation takes a longer > time, much greater than 20s, to return. Looks this will cause Samba client > server communication timeout. And Samba will load a new module, which is > not what I want. I want Samba to wait, until VFS CLOSE operation finishes > what it should do. I don't want Samba to load a new module. Can anyone tell > me how/where to change Samba source code to realize this?
VFS_CLOSE taking more than 20 seconds is nothing Samba is prepared for at the moment. Very likely it's the client that ran into a timeout and opened a new connection. Can the CLOSE operation you are writing fail at all? If not, can you defer the long-running operations to a forked process and return quickly to the main smbd, faking success? This would be a quick workaround. The real solution would be to make CLOSE asynchronous, see smbd/aio.c for read and write operations. With best regards, Volker Lendecke -- SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen phone: +49-551-370000-0, fax: +49-551-370000-9 AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen http://www.sernet.de, mailto:[email protected] -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
