[Bug 55223] HAL stats nfs and autofs mounts, preventing autofs timeouts from working

Jason McMullan jason.mcmullan at gmail.com
Fri Aug 4 18:58:28 UTC 2006


Public bug reported:

(Cribbed from http://www.redhat.com/archives/fedora-cvs-commits/2006-May/msg00994.html)
Tested and works perfectly.

Update of /cvs/dist/rpms/hal/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv21556

Modified Files:
	hal.spec 
Added Files:
	hal-0.5.7-fix-for-nfs-and-autofs.patch 
Log Message:
- Add patch that makes hald not stat nfs and autofs mounts


hal-0.5.7-fix-for-nfs-and-autofs.patch:
 blockdev.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+)

--- NEW FILE hal-0.5.7-fix-for-nfs-and-autofs.patch ---
--- hal-0.5.7/hald/linux2/blockdev.c.fix_for_nfs_and_autofs	2006-05-17 13:50:00.000000000 -0400
+++ hal-0.5.7/hald/linux2/blockdev.c	2006-05-17 14:01:32.000000000 -0400
@@ -205,6 +205,21 @@
 	while ((mnte = getmntent_r (f, &mnt, buf, sizeof(buf))) != NULL) {
 		struct stat statbuf;
 
+		/* If this is a nfs mount or autofs 
+		 * (fstype == 'nfs' || fstype == 'autofs') 
+		 * ignore the mount. Reason:
+		 *  1. we don't list nfs devices in HAL
+  		 *  2. more problematic: stat on mountpoints with 
+		 *     'stale nfs handle' never come
+  		 *     back and block complete HAL and all applications 
+		 *     using HAL fail.
+		 *  3. autofs and HAL butt heads causing drives to never
+		 *     be unmounted
+  		 */
+		if (strcmp(mnt.mnt_type, "nfs") == 0 ||
+		    strcmp(mnt.mnt_type, "autofs") == 0)
+			continue;
+
 		/* check the underlying device of the mount point */
 		if (stat (mnt.mnt_dir, &statbuf) != 0)
 			continue;

** Affects: hal (Ubuntu)
     Importance: Untriaged
         Status: Unconfirmed

-- 
HAL stats nfs and autofs mounts, preventing autofs timeouts from working
https://launchpad.net/bugs/55223




More information about the desktop-bugs mailing list