From 6e82a621e6ddfe6b38c42f8302168b2b58502522 Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Fri, 18 Dec 2009 12:17:41 -0600 Subject: [PATCH] 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 --- src/vol/partition.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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++; } -- 1.9.4