Bug #7798

Updated by Andrew Stormont about 4 years ago

... which can cause filesystems to fail to mount.    Possibly more of an issue when using a newer compiler, or a higher optimisation level. 

 A little background: we have some extra filesystems that we mount at boot and were seeing mount failures when running on real hardware (things worked fine on VMware).    The cause was tracked down to the vfs_mountfs function which was passing an improperly initialised mounta struct to domount.    This was then passed to zfs_mount which was returning EINVAL because the mount flags were invalid (as they were junk from the stack). 

 To clarify it's actually the "datalen" field which causes this check to fail when non-zero: