lkml.org 
[lkml]   [1998]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: autofs/smbfs - delayed mounting?
Date
Urban Widmark enscribed thusly:
> On Mon, 30 Nov 1998, Michael H. Warfield wrote:

> > Urban Widmark enscribed thusly:

> > > This looks like a samba/smbfs problem, I'll report it to/fix it for them,
> > > unless you or someone else already has. Thanks for pointing me in the
> > > right direction.

> > It is and I thought I had this fixed just prior to the 2.0b1
> > release... Anything prior to that release will be busted with the
> > timing error.

> That would be this comment:
> /*
> * Create the background process after trying the mount.
> * to avoid race conditions with automount and other processes.

> (about moving the daemonize() call after system(mount), change since 1.9?)

Oh #$#@ #$@$ #@$# @$#@ (repeat 4 letter adjective/adverb/verb/nouns
until satisfied...)!

Sorry to all! Totally my screwup. I must have committed in the
wrong patch. Grrr... That was the first patch that Volker and I had
talked about at the CIFS conference and that later proved to be insufficient.

The patch attached below should fix this... I'll get the fix
commited into CVS today. Let me know if this takes care of the problem.

Mike
--
Michael H. Warfield | (770) 985-6132 | mhw@WittsEnd.com
(The Mad Wizard) | (770) 925-8248 | http://www.wittsend.com/mhw/
NIC whois: MHW9 | An optimist believes we live in the best of all
PGP Key: 0xDF1DD471 | possible worlds. A pessimist is sure of it!

============================================================================
diff -urN samba.old/source/client/smbmount.c samba/source/client/smbmount.c
--- samba.old/source/client/smbmount.c Sat Nov 14 18:03:57 1998
+++ samba/source/client/smbmount.c Mon Nov 30 12:27:17 1998
@@ -255,6 +255,7 @@
send_fs_socket(char *mount_point, char *inbuf, char *outbuf)
{
int fd, closed = 0, res = 1;
+ int first_time = 1;

while (1)
{
@@ -290,6 +291,15 @@
}
#endif

+ if( first_time ) {
+ /*
+ * Create the background process after trying the mount.
+ * to avoid race conditions with automount and other processes.
+ */
+ first_time = 0;
+ daemonize();
+ }
+
/*
* Wait for a signal from smbfs ...
*/
@@ -364,15 +374,6 @@
exit(1);
}

- /*
- * Create the background process after trying the mount.
- * to avoid race conditions with automount and other processes.
- */
- daemonize();
-
- /* The parent has exited here, leave the daemon to deal with
- * disconnects and reconnects
- */
send_fs_socket(mount_point, inbuf, outbuf);
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:45    [W:0.070 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site