NTVFS disconnect

tridge at samba.org tridge at samba.org
Fri Sep 1 05:16:02 GMT 2006


Murali,

 > The NTVFS disconnect operation in the CIFS back-end (vfs_cifs.c) does not
 > seem to disconnect from the corresponding back-end share on the server, is
 > there any reason why this is so? If it doesn't disconnect the back-end
 > share, then it is leaving a dangling share, isn't it?

It should be disconnecting, are you sure it isn't?

It does this:

	/* first cleanup pending requests */
	for (a=private->pending; a; a = an) {
		an = a->next;
		smbcli_request_destroy(a->c_req);
		talloc_free(a);
	}

	talloc_free(private);

the first part ensures that any async outstanding requests are
destroyed. 

The 2nd part (the talloc_free() of private) destroys the private
context, which should be a parent of everything related to the
connection to the server. That talloc_free() call should be
disconnecting the connection, unless that connection is in use by some
other part of smbd. See the cvfs_connect() code, which sets up the
whole connection as a child of that pointer.

If you are sure the connection isn't being dropped (maybe check to
make sure using netstat?) then get back to me and we can look at
debugging it some more.

Cheers, Tridge


More information about the samba-technical mailing list