The umount command is the culprit. You needn't use the umount command though. You can write your own program to directly call the unmount() system call on the appropriate path. I use this tactic to clean nfs mounts if I accidentally use a relative path for the mount_nfs command. Although I've never investigated whether directly unmounting the file system leaves user level apps in inconsistent states. For example, for systems which maintain mtab files, the mtab file becomes inconsistent.
From my point of view, I don't care.
Josh On Tuesday, December 17, 2002, at 03:02 PM, Peter Montagner wrote: Hi, I've been mucking around with a dummy filesystem while trying to learn Darwin's VFS. My filesystem has a bug: unless you mount it passing a full path as the mount point, you can never unmount it. I just get an error like: umount: /path/to/mp: not currently mounted I've tried practically every possible combination of path styles and it seems that: 1) The path passed to mount_testfs (my mount program) must be the full path missing the trailing slash eg. /path/to/mp 2) It doesn't matter what I pass to umount, as long as it is a valid path to the mount point. Otherwise it doesn't work. Also, df reports the mount point as "mp/" rather than a full path. I've been wracking my brain trying to find what is wrong with my code. It seems identical to the webdavfs code in all the crucial areas. I tried mounting another filesystem (mount_ftp) to the mount point instead of mine and ftpfs seems to have the same problem. Steps to reproduce: % mkdir mp % sudo mount_ftp ftp://server/ mp % sudo umount mp umount: /path/to/mp: not currently mounted % mkdir mp2 % sudo mount_ftp ftp://server/ /path/to/mp2/ % sudo umount /path/to/mp2/ umount: /path/to/mp2: not currently mounted % mkdir mp3 % sudo mount_ftp ftp://server/ /path/to/mp3 % sudo umount /path/to/mp3 [Succeeds] Notice that only the full path without a trailing slash works. So, is my filesystem buggy (and ftpfs) or is umount or something else? Or are you supposed to use full paths when mounting filesystems (I doubt it)? Can anyone reproduce this? I know this is the kernel list but I have a feeling that the problem is kernel related? Thanks, Peter _______________________________________________ darwin-kernel mailing list | darwin-kernel@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel Do not post admin requests to the list. They will be ignored. _______________________________________________ darwin-kernel mailing list | darwin-kernel@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel Do not post admin requests to the list. They will be ignored.
participants (1)
-
Joshua LeVasseur