lkml.org 
[lkml]   [1996]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectOvermounting a filesystem
Date
Currently it seems Linux does not permit overmounting a filesystem
(mounting a filesystem on top of another, on the same path).

In fs/super.c:

int do_mount(kdev_t dev, const char * dev_name, const char * dir_name,
const char * type, int flags, void * data)
{
struct inode * dir_i;
struct super_block * sb;
struct vfsmount *vfsmnt;
int error;

if (!(flags & MS_RDONLY) && dev && is_read_only(dev))
return -EACCES;
/*flags |= MS_RDONLY;*/
error = namei(dir_name, &dir_i);
if (error)
return error;
if (dir_i->i_count != 1 || dir_i->i_mount) {
^^^^^^^^^^^^^^
iput(dir_i);
return -EBUSY;
}


Is there a rationale for this restriction (I know SunOS 4 doesn't
have it.) There are a bunch of nifty tricks involving userfs which
would hinge on this being permitted.

-hpa
--
PGP public key available - finger hpa@zytor.com
"The earth is but one country, and mankind its citizens." -- Bahá'u'lláh
I don't work for Yggdrasil, but they sponsor the linux.* hierarchy.


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