2 questions on deadtime parameter

sandeep nag sandeepnagamalli at gmail.com
Sun Dec 4 13:07:25 UTC 2016


Windows causes Samba to open a lock on that folder (as reported by
smbstatus). Samba won't kill a connection with a lock, so once again I have
idle connections preventing others from gaining access to the share. I've
tried setting:
locking = no. still not working.

On Sun, Dec 4, 2016 at 5:49 PM, sandeep nag <sandeepnagamalli at gmail.com>
wrote:

> I am on samba source 3.6.25 and I see the connections are not getting
> released though I set
> 1. autoodisconnect as 1 minute on windows client
> 2. deadtime = 2 in smb.conf
>
> When I debugged the issue I found that:
> In conn_idle_all() function:
>  if (sconn->using_smb2) {
> 298         /* SMB2 */
> 299         struct smbd_smb2_session *sess;
> 300         for (sess = sconn->smb2.sessions.list; sess; sess =
> sess->next) {
> 301             struct smbd_smb2_tcon *ptcon;
> 302
> 303             for (ptcon = sess->tcons.list; ptcon; ptcon = ptcon->next)
> {
> 304                 time_t age;
> 305                 connection_struct *conn = ptcon->compat_conn;
> 306
> 307                 if (conn == NULL) {
> 308                     continue;
> 309                 }
> 310
> 311                 age = t - conn->lastused;
> 312                 /* close dirptrs on connections that are idle */
> 313                 if (age > DPTR_IDLE_TIMEOUT) {
> 314                     dptr_idlecnum(conn);
> 315                 }
> 316
> 317                 if (conn->num_files_open > 0 || age < deadtime) {
> <---
> 318                     return false;
> 319                 }
> 320             }
> 321         }
> 322     }
>
>
> conn->num_files_open in line#317 is non zero.
> I have two questions:
> 1. Is their any other parameter which I could use in conjunction with
> deadtime, which has to be used, in order to get it work. any workaround?
> 2. In the link, https://lists.samba.org/archive/samba/2006-April/
> 119652.html
> suggested a code present in the attachment snippet.txt, should I try
> adding this patch, will that lead to anyother side effect?
>
> Thanks in advance, for your time.
>
> Thanks,
> Sandeep
>
>


More information about the samba-technical mailing list