On Sat, 18 Mar 2006 08:41:53 +0100, Kim, Hyunchul <[EMAIL PROTECTED]> wrote:

Solaris prevent mount on the current working directory of other process.
But mount on the parent directory of a cwd is allowed.

Linux or FreeBSD have no such restriction.

I read the source code but couldn't find the reason.
domount() seems to return EBUSY,
only when vn_vfswlock() for the mount point fails or
other file system is already mounted on the mount point.

Is there a relation between these behavior of domount() and
current working directory of a process?
Why mount() return EBUSY when the mount point is cwd of a process?
Is there benefits?

this is required to be standard complient.

It is a System V requirement. SVID3 requires that mount(fs, path, mflag, fs
type, dataptr, datalen) fail with errno set to EBUSY if:

1. path is currently mounted on, is someone's CWD, or is
     otherwise busy,
2. the file system associated with fs is currently mounted, or
3. the system can't allocate the necessary resources for the  mount.

These checks are part of #1.

---
frankB
_______________________________________________
ufs-discuss mailing list
[email protected]

Reply via email to