#include <roken.h>
-#include <sys/types.h>
-#include <stdio.h>
-#include <afs/afs_assert.h>
#ifdef AFS_NT40_ENV
-#include <fcntl.h>
#include <windows.h>
#include <winbase.h>
-#include <io.h>
-#include <time.h>
-#else
-#include <sys/file.h>
-#include <sys/time.h>
-#include <unistd.h>
#endif
-#include <string.h>
-#include <errno.h>
-#include <sys/stat.h>
#include <rx/xdr.h>
#include <afs/afsint.h>
+#include <afs/afssyscalls.h>
+
#include "nfs.h"
#include "lwp.h"
#include "lock.h"
-#include <afs/afssyscalls.h>
#include "ihandle.h"
#include "vnode.h"
#include "volume.h"
afs_ino_str_t stmp;
struct VnodeClassInfo *vcp = &VnodeClassInfo[class];
- int ReadWriteOriginal = VolumeWriteable(rwvp);
+ /*
+ * The fileserver's -readonly switch should make this false, but we
+ * have no useful way to know in the volserver.
+ * This doesn't make client data mutable.
+ */
+ int ReadWriteOriginal = 1;
/* Correct number of files in volume: this assumes indexes are always
cloned starting with vLarge */
diskused = V_diskused(rwvp);
}
+ /* Initialize list of inodes to nuke - must do this before any calls
+ * to ERROR_EXIT, as the error handler requires an initialised list
+ */
+ ci_InitHead(&decHead);
+ decRock.h = V_linkHandle(rwvp);
+ decRock.vol = V_parentId(rwvp);
+
/* Open the RW volume's index file and seek to beginning */
IH_COPY(rwH, rwvp->vnodeIndex[class].handle);
rwFd = IH_OPEN(rwH);
STREAM_ASEEK(clfilein, vcp->diskSize); /* Will fail if no vnodes */
}
- /* Initialize list of inodes to nuke */
- ci_InitHead(&decHead);
- decRock.h = V_linkHandle(rwvp);
- decRock.vol = V_parentId(rwvp);
-
/* Read each vnode in the old volume's index file */
for (offset = vcp->diskSize;
STREAM_READ(rwvnode, vcp->diskSize, 1, rwfile) == 1;