* Use partition name as devname.
*/
int
-VCheckPartition(char *part, char *devname)
+VCheckPartition(char *part, char *devname, int logging)
{
struct afs_stat_st status;
#if !defined(AFS_LINUX20_ENV) && !defined(AFS_NT40_ENV)
Log("VInitVnodes: Couldn't find file system %s; ignored\n", part);
return 0;
}
+ if (logging) {
+ 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", part);
+ return -1;
+ }
#ifndef AFS_AIX32_ENV
if (programType == fileServer) {
char salvpath[MAXPATHLEN];
/* Only keep track of "/vicepx" partitions since automounter
* may hose us */
if (VIsAlwaysAttach(pname, &wouldattach)) {
- VCheckPartition(pname, "");
+ VCheckPartition(pname, "", 0);
} else {
struct afs_stat_st st;
if (wouldattach && VGetPartition(pname, 0) == NULL &&
exit(-1);
}
while (!getmntent(mntfile, &mnt)) {
+ int logging = 0;
/* Ignore non ufs or non read/write partitions */
/* but allow zfs too if we're in the NAMEI environment */
if (
#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++;
+ logging = 1;
}
#endif /* !AFS_NAMEI_ENV */
- if (VCheckPartition(mnt.mnt_mountp, mnt.mnt_special) < 0)
+ if (VCheckPartition(mnt.mnt_mountp, mnt.mnt_special, logging) < 0)
errors++;
}
if (VIsAlwaysAttach(mntent->mnt_dir, NULL))
continue;
- if (VCheckPartition(mntent->mnt_dir, mntent->mnt_fsname) < 0)
+ if (VCheckPartition(mntent->mnt_dir, mntent->mnt_fsname, 0) < 0)
errors++;
}
if (VIsAlwaysAttach(part, NULL))
continue;
- if (VCheckPartition(part, vmt2dataptr(vmountp, VMT_OBJECT)) < 0)
+ if (VCheckPartition(part, vmt2dataptr(vmountp, VMT_OBJECT), 0) < 0)
errors++;
}
if (VIsAlwaysAttach(fsent->fs_file, NULL))
continue;
- if (VCheckPartition(fsent->fs_file, fsent->fs_spec) < 0)
+ if (VCheckPartition(fsent->fs_file, fsent->fs_spec, 0) < 0)
errors++;
}
endfsent();
if (VIsAlwaysAttach(mntent->mnt_dir, NULL))
continue;
- if (VCheckPartition(mntent->mnt_dir, mntent->mnt_fsname) < 0)
+ if (VCheckPartition(mntent->mnt_dir, mntent->mnt_fsname, 0) < 0)
errors++;
}
endmntent(mfd);