On Wed, 11 Apr 2012, Emmanuel Dreyfus wrote:
David Holland <dholland-tech%netbsd.org@localhost> wrote:In this case, why do you need anything other than mount options in fstab?The point is that a userland filesystem will sometime need to setrlimit or setenv stuff so that it works correctly. This is easy to do when running mount on the command line, but there is no way to do it from fstab.
Yes, I think we understood the missing feature. The question is about how to add that feature. I can think of a few ways:
1. Add "-o" options to the mount_foofs programs that need it, so that they can do their own setenv and setrlimit stuff based on the "-o" options. Use the existing support in fstab(5) and mount(8) for passing options to the underlying mount_foofs programs.
2. Like (1), but let mount(8) itself interpret the new options for setenv and setrlimit stuff, so that they can apply to all file systems without the underlying mount_foofs programs needing to be modified.
3. Like (1), but do the setenv and setrlimit stuff in a new mount_wrapper program that lives in between mount(8) and the underlying mount_foofs.
4. Like (2), where mount(8) interprets new options, but use an incompatible syntax in fstab instead of re-using the existing options syntax.
5. Something completely different. I favour options 1 or 2. You seem to have selected option 5. --apb (Alan Barrett)