Refuse to attach inode partitions with UFS logging

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>
This commit is contained in:
Andrew Deason 2009-12-18 12:17:41 -06:00 committed by Derrick Brashear
parent 94ff83fee8
commit 6e82a621e6

View File

@ -468,6 +468,18 @@ VAttachPartitions(void)
if (VIsAlwaysAttach(mnt.mnt_mountp)) if (VIsAlwaysAttach(mnt.mnt_mountp))
continue; 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) if (VCheckPartition(mnt.mnt_mountp, mnt.mnt_special) < 0)
errors++; errors++;
} }