Hi Folk, 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? Many thanks Eric
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:kontakt at sernet.de
Hi Folk, Note, I am using Samba 3.5.10. I have tried to change source3\libsmb\clientgen.c line 591. But it does not work. cli->timeout = 20000 * 360; /* was 20000, Timeout in in milliseconds. */ Thanks Eric On Fri, Dec 14, 2012 at 6:36 PM, Eric Liu <eric.liu at uniquesoft.com> wrote:> Hi Folk, > > 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? > > Many thanks > Eric >
On Fri, Dec 14, 2012 at 06:44:56PM +0800, Eric Liu wrote:> Hi Folk, > > Note, I am using Samba 3.5.10. I have tried to change > source3\libsmb\clientgen.c line 591. But it does not work. > cli->timeout = 20000 * 360; /* was 20000, Timeout in in > milliseconds. */clientgen.c is a client piece. VFS CLOSE is server side. There is something I am missing in this picture... Can you describe a bit more closely what you are doing? Volker -- 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:kontakt at sernet.de