NTVFS disconnect

Murali Bashyam mbcoder at gmail.com
Fri Sep 1 06:23:52 GMT 2006


Tridge

You are right, this is happening, i missed the implicit TCP connection
teardown under the talloc_free.

Is there any reason why we are not doing an explicit raw tree disconnect as
part of the ntvfs disconnect? Is there any reason it may not work correctly?
I guess that was the question on my mind.

Murali

On 8/31/06, tridge at samba.org <tridge at samba.org> wrote:
>
> 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