On Thu, Mar 06, 2003 at 01:16:33PM -0500, Jan Harkes wrote:
> work fine. I'm currently looking at why repair is not doing the right
> things on singly replicated volumes when resolution is turned off.
And here is the fix so that repair can fix conflict in singly replicated
volumes,
2003/03/06 15:36:13 <[EMAIL PROTECTED]>
Fixed directory repair for volumes without rvm resolution logs
(i.e. common singly replicated volumes).
Modified files:
coda/coda-src/resolution/: rescoord.cc rvmrescoord.cc
diff -Nru coda.orig/coda-src/resolution/rescoord.cc
coda/coda-src/resolution/rescoord.cc
--- coda.orig/coda-src/resolution/rescoord.cc 2001/08/29 18:01:24 4.18
+++ coda/coda-src/resolution/rescoord.cc 2003/03/06 20:36:09
@@ -60,10 +60,9 @@
timing_path *tpinfo = 0;
timing_path *FileresTPinfo = 0;
-/* private routines */
-static int AlreadyIncGroup(ViceVersionVector **VV, int nvvs);
+/* function from rvmrescoord.cc */
+int ResolveInc(res_mgrpent *mgrp, ViceFid *Fid, ViceVersionVector **VVGroup);
-
/* two VV's are weakly equal if they have the same store-id:
this means that the files are identical, but the COP2 never made
it to the server
@@ -160,6 +159,7 @@
return(error);
}
+
long OldDirResolve(res_mgrpent *mgrp, ViceFid *Fid, ViceVersionVector **VV)
{
int reserror = 1;
@@ -178,6 +178,7 @@
/* check if any object already inc */
if (AlreadyIncGroup(VV, VSG_MEMBERS)) {
SLog(0, "OldDirResolve: Group already inconsistent");
+ reserror = ResolveInc(mgrp, Fid, VV);
goto Exit;
}
diff -Nru coda.orig/coda-src/resolution/rvmrescoord.cc
coda/coda-src/resolution/rvmrescoord.cc
--- coda.orig/coda-src/resolution/rvmrescoord.cc 2001/08/23 20:25:49 4.26
+++ coda/coda-src/resolution/rvmrescoord.cc 2003/03/06 20:36:09
@@ -67,7 +67,7 @@
static void AllocateBufs(res_mgrpent *, char **, int *);
static void DeAllocateBufs(char **);
static char *ConcatLogs(res_mgrpent *, char **, RPC2_Integer *, RPC2_Integer *, int
*, int *);
-static int ResolveInc(res_mgrpent *, ViceFid *, ViceVersionVector **);
+int ResolveInc(res_mgrpent *, ViceFid *, ViceVersionVector **);
static int CompareDirContents(SE_Descriptor *, ViceFid *);
static int CompareDirStatus(ViceStatus *, res_mgrpent *, ViceVersionVector **);
static void DumpDirContents(SE_Descriptor *, ViceFid *);
@@ -663,7 +663,8 @@
#endif
#define PAGESIZE 2048
-static int ResolveInc(res_mgrpent *mgrp, ViceFid *Fid, ViceVersionVector **VVGroup) {
+int ResolveInc(res_mgrpent *mgrp, ViceFid *Fid, ViceVersionVector **VVGroup)
+{
SE_Descriptor sid;
char *dirbufs[VSG_MEMBERS];
int dirlength = MAXPAGES * PAGESIZE + VAclSize(foo);
@@ -682,7 +683,6 @@
MRPC_MakeMulti(MarkInc_OP, MarkInc_PTR, VSG_MEMBERS,
mgrp->rrcc.handles, mgrp->rrcc.retcodes,
mgrp->rrcc.MIp, 0, 0, Fid);
- return(EINCONS);
}
// set up buffers to get dir contents & status blocks