Partitions with the 'logging' UFS mount option are known to cause
corruption when using the inode fileserver backend. So, if we detect
that we are attempting to attach a 'logging' partition, refuse to attach
it.
Change-Id: I0ee23b9935ac6ffc66e6228fe03d6bbfb5d64574
Reviewed-on: http://gerrit.openafs.org/999
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
if (VIsAlwaysAttach(mnt.mnt_mountp))
continue;
+#ifndef AFS_NAMEI_ENV
+ if (hasmntopt(&mnt, "logging") != NULL) {
+ Log("This program is compiled without AFS_NAMEI_ENV, and "
+ "partition %s is mounted with the 'logging' option. "
+ "Using the inode fileserver backend with 'logging' UFS "
+ "partitions causes volume corruption, so please either "
+ "mount the partition without logging, or use the namei "
+ "fileserver backend. Aborting...\n", mnt.mnt_mountp);
+ errors++;
+ }
+#endif /* !AFS_NAMEI_ENV */
+
if (VCheckPartition(mnt.mnt_mountp, mnt.mnt_special) < 0)
errors++;
}