autofs mountopints on NFS mounted filesystems
Subsystems (2)
Hi,
autofs will not create the autofs mountpoint path if the filesystem is not a locally mounted filesystem (e.g. a NFS mounted filesystem). contained_in_local_fs() returns false in this case. This might be intentional in most cases.
But how about if the root filesystem mounted via NFS? Do you see any problems adding an exceptional rule for this case?
Regards,
Matthias
Ian Kent
maintainerQuoted 11 lines · Matthias Koenig
Hi,
autofs will not create the autofs mountpoint path if the filesystem is not a locally mounted filesystem (e.g. a NFS mounted filesystem).
contained_in_local_fs()returns false in this case. This might be intentional in most cases.But how about if the root filesystem mounted via NFS? Do you see any problems adding an exceptional rule for this case?
Yeah, sounds sensible.
Ian
Quoted 9 lines · Ian Kent
Quoted 8 lines · Matthias Koenig
Hi,
autofs will not create the autofs mountpoint path if the filesystem is not a locally mounted filesystem (e.g. a NFS mounted filesystem).
contained_in_local_fs()returns false in this case. This might be intentional in most cases.
Quoted 5 lines
Quoted 3 lines
But how about if the root filesystem mounted via NFS? Do you see any problems adding an exceptional rule for this case?
Yeah, sounds sensible.
Ok, how about the following patch?
Thanks,
Matthias
lib/mounts.c 2008-06-16 11:38:16.000000000 +0200 renamed from lib/mounts.c 2008-06-13 14:30:01.000000000 +0200 +4 -0
@@ -363,6 +363,10 @@ int contained_in_local_fs(const char *pa if (!strncmp(path, this->path, len)) { if (len > 1 && pathlen > len && path[len] != '/') continue; + else if (len == 1 && this->path[0] == '/') + /* alway return true on rootfs, we don't care + * here if it is local */ + ret = 1; else if (this->fs_name[0] == '/') { if (strlen(this->fs_name) > 1) { if (this->fs_name[1] != '/')
Ian Kent
maintainerQuoted 11 lines · Matthias Koenig
Quoted 9 lines · Ian Kent
Quoted 8 lines · Matthias Koenig
Hi,
autofs will not create the autofs mountpoint path if the filesystem is not a locally mounted filesystem (e.g. a NFS mounted filesystem).
contained_in_local_fs()returns false in this case. This might be intentional in most cases.
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
But how about if the root filesystem mounted via NFS? Do you see any problems adding an exceptional rule for this case?
Yeah, sounds sensible.
Ok, how about the following patch?
Yeah, I'll commit it and post the patch to kernel.org as usual.
Quoted 19 lines
Thanks,
MatthiasIndex:
autofs-5.0.3/lib/mounts.c
===================================================================lib/mounts.c 2008-06-16 11:38:16.000000000 +0200 renamed from lib/mounts.c 2008-06-13 14:30:01.000000000 +0200 +4
-0@@ -363,6 +363,10 @@ int contained_in_local_fs(const char *pa if (!strncmp(path, this->path, len)) { if (len > 1 && pathlen > len && path[len] != '/') continue; + else if (len == 1 && this->path[0] == '/') + /* alway return true on rootfs, we don't care + * here if it is local */ + ret = 1; else if (this->fs_name[0] == '/') { if (strlen(this->fs_name) > 1) { if (this->fs_name[1] != '/')