Unionfs: bugfix when mounting readonly exported NFS volumes (was: nfsro)
When stacking on top of readonly exported NFS volumes, which are mounted
locally read-write, attempting to create a new file yields the proper EROFS.
But attempting to modify an existing file returns an EACCES, which
interferes with unionfs's copyup policy: only EROFS triggers a copyup,
whereas EACCES does not (and shouldn't -- that'd be a security hole). The
old unionfs 1.x attempted to workaround this EACCES condition by supporting
a special unionfs mount option called 'nfsro'; support for this option was
left in the latest unionfs 2.0, but the mount option was not made available
until we could properly investigate this issue with the latest NFS code.
This patch removes all remnants of this 'nfsro' support. It is no longer
needed. Instead, users can use the existing per-branch 'ro' unionfs mount
option, which would properly return the appropriate status conditions back
from unionfs_permission. These return conditions result in a copyup if and
only if needed, even for readonly exported NFS volumes. In effect, unionfs
per-branch 'ro' option now simulates a true readonly localhost mount.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>