Date: Fri, 14 Jul 1995 11:35:38 -0700 (MST) From: Terry Lambert <terry@Artisoft.COM> To: hackers@freefall.cdrom.com Cc: terry@cs.weber.edu Subject: FS inconsistancies - which soloution? Message-ID: <199507141835.LAA09067@coyote.Artisoft.COM>
next in thread | raw e-mail | index | archive | help
I've been digging around in the mount code and I've found an interesting inconsistancy. The path for the mount point is looked up normally in vfs_syscalls.c, so it has a limit of 1024 characters. This is truncated into the file system "mounted on" structure for ffs (in ffs_vfsops.c in ffs_mountfs()) to MAXMNTLEN (512) to store the "last mounted on directory. In the ffs_mount code on the way out (as in the cdfs/other fs's), the mounted-on directory is copied to mnt_stat.f_mntonname, which is limited to MNAMELEN... 90 characters. Since this is the length in the statfs return data, shouldn't all of the buffers be limited to 90 characters? Or should the statfs buffer be expanded to MAXMNTLEN? Or should they all be expanded to MAXPATHLEN(==PATH_MAX==1024)? The last would require changing the on disk superblock size to accomodate the increased length. My personal take on this would be to crank MNAMELEN up to 512; is there some reason the stucture is being kept small (254 bytes)? Currently, because of the MNAMELEN limit, it is possible to mount on file system paths up to the MAXPATHLEN, but impossible to unmount file systems mounted on file system paths of length X for values of X such that MNAMELEN < X < MAXPATHLEN. This is kinda critically stupid. Terry Lambert terry@cs.weber.edu --- Any opinions in this posting are my own and not those of my present or previous employers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199507141835.LAA09067>
