From: Andrew Deason Date: Fri, 18 Dec 2009 18:17:41 +0000 (-0600) Subject: Refuse to attach inode partitions with UFS logging X-Git-Tag: openafs-devel-1_5_69~49 X-Git-Url: http://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=6e82a621e6ddfe6b38c42f8302168b2b58502522 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 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- diff --git a/src/vol/partition.c b/src/vol/partition.c index cb339e8..f644271 100644 --- a/src/vol/partition.c +++ b/src/vol/partition.c @@ -468,6 +468,18 @@ VAttachPartitions(void) 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++; }