]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-libuafs-fixes-20080701
authorAndrew Deason <adeason@sinenomine.net>
Tue, 1 Jul 2008 23:28:35 +0000 (23:28 +0000)
committerDerrick Brashear <shadow@dementia.org>
Tue, 1 Jul 2008 23:28:35 +0000 (23:28 +0000)
LICENSE IPL10
FIXES 104698, 104699, 104305

make cellname get init'd right. correct startup argument order to match
what afsd does. call lookupname correctly (when did this break?)

at the same time, move the lookupname define out of afs_osi.h and into each
osi_machdep.h

(cherry picked from commit c61a8f37c9957034961aed8abc2a1adb046247d3)

src/afs/IRIX/osi_machdep.h
src/afs/NBSD/osi_machdep.h
src/afs/UKERNEL/afs_usrops.c
src/afs/UKERNEL/osi_machdep.h
src/afs/afs_osi.h

index 241deabddcacc6b52f38a82ebe2de3f2de3a9b3c..196a7ac532ad5e017abe05192fe273980c00afd4 100644 (file)
@@ -29,6 +29,9 @@ extern time_t time;
 /* This gets redefined from ucred to cred in osi_vfs.h, just do it right */
 #define        AFS_UCRED       cred
 
+#undef gop_lookupname
+#define gop_lookupname(fnamep,segflg,followlink,compvpp) lookupname((fnamep),(segflg),(followlink),NULL,(compvpp), NULL)
+
 #define osi_vnhold(avc, r)  do { VN_HOLD(AFSTOV(avc)); } while(0)
 
 #undef afs_osi_Alloc_NoSleep
index 8703c92ab1b392d75421b5c74463ad1882e4ce48..f513d814974c06f5f2c4414aa7f79e911672e6c1 100644 (file)
@@ -37,6 +37,9 @@ extern struct timeval time;
 
 #define afs_bufferpages bufpages
 
+#undef gop_lookupname
+#define gop_lookupname(fnamep,segflg,followlink,compvpp) lookupname((fnamep),(segflg),(followlink),NULL,(compvpp))
+
 #define osi_vnhold(avc,r)  do { \
        if ((avc)->vrefCount) { VN_HOLD((struct vnode *)(avc)); } \
        else osi_Panic("refcnt==0");  } while(0)
index d4cae72c72425874ff39c26d95e159e36709cc47..8893ede93bbb4ca8e3c01b8659704d7792e162eb 100644 (file)
@@ -1637,11 +1637,6 @@ uafs_Init(char *rn, char *mountDirParam, char *confDirParam,
            printf("%s: My home cell is '%s'\n", rn, afs_LclCellName);
     }
 
-    /*
-     * Set the primary cell name.
-     */
-    call_syscall(AFSOP_SET_THISCELL, (long)afs_LclCellName, 0, 0, 0, 0);
-
     if ((logfd = fopen(fullpn_AFSLogFile, "r+")) == 0) {
        if (afsd_verbose)
            printf("%s: Creating '%s'\n", rn, fullpn_AFSLogFile);
@@ -1677,24 +1672,6 @@ uafs_Init(char *rn, char *mountDirParam, char *confDirParam,
     sprintf(fullpn_VFile, "%s/V", cacheBaseDir);
     vFileNumber = fullpn_VFile + strlen(fullpn_VFile);
 
-    /*
-     * Start the RX listener.
-     */
-    if (afsd_debug)
-       printf("%s: Calling AFSOP_RXLISTENER_DAEMON\n", rn);
-    fork_syscall(AFSCALL_CALL, AFSOP_RXLISTENER_DAEMON, FALSE, FALSE, FALSE);
-
-    /*
-     * Start the RX event handler.
-     */
-    if (afsd_debug)
-       printf("%s: Calling AFSOP_RXEVENT_DAEMON\n", rn);
-    fork_syscall(AFSCALL_CALL, AFSOP_RXEVENT_DAEMON, FALSE);
-
-    /*
-     * Set up all the kernel processes needed for AFS.
-     */
-
     /* initialize AFS callback interface */
     {
        /* parse multihomed address files */
@@ -1713,6 +1690,13 @@ uafs_Init(char *rn, char *mountDirParam, char *confDirParam,
        }
     }
 
+    /*
+     * Start the RX listener.
+     */
+    if (afsd_debug)
+       printf("%s: Calling AFSOP_RXLISTENER_DAEMON\n", rn);
+    fork_syscall(AFSCALL_CALL, AFSOP_RXLISTENER_DAEMON, FALSE, FALSE, FALSE);
+
     if (afsd_verbose)
        printf("%s: Forking rx callback listener.\n", rn);
     /* Child */
@@ -1720,6 +1704,17 @@ uafs_Init(char *rn, char *mountDirParam, char *confDirParam,
        preallocs = cacheStatEntries + 50;
     fork_syscall(AFSCALL_CALL, AFSOP_START_RXCALLBACK, preallocs);
 
+    /*
+     * Start the RX event handler.
+     */
+    if (afsd_debug)
+       printf("%s: Calling AFSOP_RXEVENT_DAEMON\n", rn);
+    fork_syscall(AFSCALL_CALL, AFSOP_RXEVENT_DAEMON, FALSE);
+
+    /*
+     * Set up all the kernel processes needed for AFS.
+     */
+
     if (afsd_verbose)
        printf("%s: Initializing AFS daemon.\n", rn);
     call_syscall(AFSCALL_CALL, AFSOP_BASIC_INIT, 1, 0, 0, 0);
@@ -1814,6 +1809,11 @@ uafs_Init(char *rn, char *mountDirParam, char *confDirParam,
     afsconf_CellApply(afs_cdir, ConfigCell, NULL);
     afsconf_CellAliasApply(afs_cdir, ConfigCellAlias, NULL);
 
+    /*
+     * Set the primary cell name.
+     */
+    call_syscall(AFSCALL_CALL, AFSOP_SET_THISCELL, (long)afs_LclCellName, 0, 0, 0);
+
     if (afsd_verbose)
        printf("%s: Forking AFS daemon.\n", rn);
     fork_syscall(AFSCALL_CALL, AFSOP_START_AFS);
@@ -1869,7 +1869,7 @@ uafs_Init(char *rn, char *mountDirParam, char *confDirParam,
        rc = lpioctl(0, _VICEIOCTL(8), &iob, 0);
 #endif
        if (rc < 0) {
-           usr_assert(errno == EDOM || errno == ENOSYS);
+           usr_assert(errno == EDOM || errno == ENOSYS || errno == ERANGE);
            break;
        }
 
index 97cc6c584c033440d4df0402377697dee74f3dd1..19a25f55c83ccb10a8bb221b5214227fc0b59da4 100644 (file)
@@ -36,6 +36,9 @@
 #define        afs_hz      HZ
 #define osi_Time() (time(NULL))
 
+#undef gop_lookupname
+#define gop_lookupname(fnamep,segflg,followlink,compvpp) lookupname((fnamep),(segflg),(followlink),(compvpp))
+
 #define osi_vnhold(avc, r)  do { VN_HOLD(AFSTOV(avc)); } while(0)
 #define        afs_suser(x)        suser(x)
 
index c66ece8862180cd70536d89f32df8865b316517c..799caabd8461265df339fbe6d3093a3a52b12914 100644 (file)
@@ -150,15 +150,6 @@ extern struct vnodeops *afs_ops;
 #endif
 #endif
 
-#ifdef AFS_SGI65_ENV
-#define        gop_lookupname(fnamep,segflg,followlink,compvpp) \
-             lookupname((fnamep),(segflg),(followlink),NULL,(compvpp),\
-                       NULL)
-#else
-#define        gop_lookupname(fnamep,segflg,followlink,compvpp) \
-             lookupname((fnamep),(segflg),(followlink),NULL,(compvpp))
-#endif
-
 /*
  * In IRIX 6.5 we cannot have DEBUG turned on since certain
  * system-defined structures are a different size with DEBUG on, the