[lkml]   [1996]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectOvermounting a filesystem
    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) {
    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.

    PGP public key available - finger
    "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.017 / U:13.700 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site