Georgina Russell
2000-Dec-01 18:56 UTC
mount call gives "." as the directory & /proc/mounts doesn't resolve it
BACKGROUND : In the samba source code (smbmnt.c) the call to mount system call gives "." as the mount point (second argument). Prior to calling mount, the program changes into the mount point directory, so "." is in fact the right directory However, the problem is that on linux redhat 6.3.2, the call to mount results in "." being put into the /proc/mounts file. The /etc/mtab file resolves "." or any other argument be it a symlink, etc, but /proc/mounts does not. If you run a "df" or "mount" at the command line, everything looks good. But when one takes a look at /proc/mounts, the "." is visible. This becomes a problem when shutting down a machine without unmounting the samba filesystems. The shutdown routine goes through and kills every process inside directories left in /proc/mounts. However, in the case of an unmounted samba fs, the shutdown routine tries to remove all process inside ".". BADDDDD! :) I am not sure why the mount call only resolves the mount point when adding to mtab but not proc. It probably shouldn't. BUT WHAT I REALLY WANT TO KNOW RIGHT NOW : Is there any good reason why the samba code calls mount with a "." and not the mount point? It will be easier/quicker for me to fix the problem by adjusting the "." to be the full pathname inside the samba code. Thanks for any help, Georgina __________________________________________________ Do You Yahoo!? Yahoo! Shopping - Thousands of Stores. Millions of Products. http://shopping.yahoo.com/
Urban Widmark
2000-Dec-01 19:33 UTC
mount call gives "." as the directory & /proc/mounts doesn't resolve it
On Fri, 1 Dec 2000, Georgina Russell wrote:> Is there any good reason why the samba code calls > mount with a "." and not the mount point? It will beI don't know of a reason, nor can I see one. "." or mount_point should be the same. Why not just change it and see if that works? In the 2.4.0-testx kernels this is changed. /Urban