DEVEL15-ubik_Call-no-more-20090122
authorJeffrey Altman <jaltman@secure-endpoints.com>
Thu, 22 Jan 2009 15:29:10 +0000 (15:29 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Thu, 22 Jan 2009 15:29:10 +0000 (15:29 +0000)
LICENSE MIT

remove more ubik_Call(RPC, ...) calls and replace them with ubik_RPC(...)

(cherry picked from commit d4b17a6e2e08c41de8ee07721029469ebcde6f72)

src/venus/cacheout.c
src/vlserver/vlclient.c

index 58a33e6..49d148d 100644 (file)
@@ -173,7 +173,7 @@ ListServers()
     memset(&addrs, 0, sizeof(addrs));
     memset(&spare3, 0, sizeof(spare3));
     code =
-       ubik_Call(VL_GetAddrs, client, 0, Handle, spare2, &spare3,
+       ubik_VL_GetAddrs(client, 0, Handle, spare2, &spare3,
                  &server_count, &addrs);
     if (code) {
        printf("Fatal error: could not get list of file servers\n");
@@ -190,7 +190,7 @@ ListServers()
                m_addrs.bulkaddrs_val = 0;
                m_addrs.bulkaddrs_len = 0;
                code =
-                   ubik_Call(VL_GetAddrsU, client, 0, &m_attrs, &m_uuid,
+                   ubik_VL_GetAddrsU(client, 0, &m_attrs, &m_uuid,
                              &m_unique, &m_nentries, &m_addrs);
                if (vcode)
                    return code;
index 2fabeac..447deb5 100644 (file)
@@ -226,7 +226,7 @@ handleit(struct cmd_syndesc *as, void *arock)
     if (as->parms[5].items) {  /* -gstats */
        vldstats stats;
        vital_vlheader vital_header;
-       code = ubik_Call(VL_GetStats, cstruct, 0, &stats, &vital_header);
+       code = ubik_VL_GetStats(cstruct, 0, &stats, &vital_header);
        if (!code)
            dump_stats(&stats, &vital_header);
        exit(0);
@@ -251,13 +251,13 @@ handleit(struct cmd_syndesc *as, void *arock)
            if (!strcmp(oper, "cr")) {
                fill_entry(&entry, argp, nargs);
                display_entry(&entry, 0);
-               code = ubik_Call(VL_CreateEntry, cstruct, 0, &entry);
+               code = ubik_VL_CreateEntry(cstruct, 0, &entry);
                printf("return code is %d\n", code);
            } else if (!strcmp(oper, "rm")) {
                sscanf(&(*argp)[0], "%d", &id);
                ++argp, --nargs;
                sscanf(&(*argp)[0], "%d", &voltype);
-               code = ubik_Call(VL_DeleteEntry, cstruct, 0, id, voltype);
+               code = ubik_VL_DeleteEntry(cstruct, 0, id, voltype);
                printf("return code is %d\n", code);
            } else if (!strcmp(oper, "re")) {
                sscanf(&(*argp)[0], "%d", &id);
@@ -269,7 +269,8 @@ handleit(struct cmd_syndesc *as, void *arock)
                fill_entry(&entry, argp, nargs);
                display_entry(&entry, 0);
                code =
-                   ubik_Call(VL_ReplaceEntry, cstruct, 0, id, voltype,
+                   ubik_VL_ReplaceEntry(
+                    cstruct, 0, id, voltype,
                              &entry, releasetype);
                printf("return code is %d\n", code);
            } else if (!strcmp(oper, "up")) {
@@ -282,7 +283,7 @@ handleit(struct cmd_syndesc *as, void *arock)
                fill_update_entry(&updateentry, argp, nargs);
                display_update_entry(&updateentry, 0);
                code =
-                   ubik_Call(VL_UpdateEntry, cstruct, 0, id, voltype,
+                   ubik_VL_UpdateEntry(cstruct, 0, id, voltype,
                              &updateentry, releasetype);
                printf("return code is %d\n", code);
            } else if (!strcmp(oper, "ls")) {
@@ -290,7 +291,7 @@ handleit(struct cmd_syndesc *as, void *arock)
                for (index = 0; 1; index = next_index) {
                    memset(&entry, 0, sizeof(entry));
                    code =
-                       ubik_Call(VL_ListEntry, cstruct, 0, index, &count,
+                       ubik_VL_ListEntry(cstruct, 0, index, &count,
                                  &next_index, &entry);
                    if (code) {
                        printf("VL_ListEntry returned code = %d\n", code);
@@ -314,7 +315,7 @@ handleit(struct cmd_syndesc *as, void *arock)
                for (index = 0; 1; index = next_index) {
                    memset(&entry, 0, sizeof(entry));
                    code =
-                       ubik_Call(VL_ListEntry, cstruct, 0, index, &count,
+                       ubik_VL_ListEntry(cstruct, 0, index, &count,
                                  &next_index, &entry);
                    if (code) {
                        printf("VL_ListEntry returned code = %d\n", code);
@@ -363,7 +364,7 @@ handleit(struct cmd_syndesc *as, void *arock)
                for (index = 0; 1; index = next_index) {
                    memset(&entry, 0, sizeof(entry));
                    code =
-                       ubik_Call(VL_ListEntry, cstruct, 0, index, &count,
+                       ubik_VL_ListEntry(cstruct, 0, index, &count,
                                  &next_index, &entry);
                    if (code) {
                        printf("VL_ListEntry returned code = %d\n", code);
@@ -373,7 +374,7 @@ handleit(struct cmd_syndesc *as, void *arock)
                        break;
                    num++;
                    code =
-                       ubik_Call(VL_GetEntryByNameO, cstruct, 0, entry.name,
+                       ubik_VL_GetEntryByNameO(cstruct, 0, entry.name,
                                  &tentry);
                    if (code == VL_NOENT) {
                        num1++;
@@ -381,7 +382,7 @@ handleit(struct cmd_syndesc *as, void *arock)
                               entry.name, entry.volumeId[RWVOL]);
                    }
                    code =
-                       ubik_Call(VL_GetEntryByID, cstruct, 0,
+                       ubik_VL_GetEntryByID(cstruct, 0,
                                  entry.volumeId[RWVOL], RWVOL, &tentry);
                    if (code == VL_NOENT) {
                        num2++;
@@ -390,7 +391,7 @@ handleit(struct cmd_syndesc *as, void *arock)
                    }
                    if (entry.volumeId[BACKVOL]) {
                        code =
-                           ubik_Call(VL_GetEntryByID, cstruct, 0,
+                           ubik_VL_GetEntryByID(cstruct, 0,
                                      entry.volumeId[BACKVOL], BACKVOL,
                                      &tentry);
                        num31++;
@@ -402,7 +403,7 @@ handleit(struct cmd_syndesc *as, void *arock)
                    }
                    if (entry.volumeId[ROVOL]) {
                        code =
-                           ubik_Call(VL_GetEntryByID, cstruct, 0,
+                           ubik_VL_GetEntryByID(cstruct, 0,
                                      entry.volumeId[ROVOL], ROVOL, &tentry);
                        num41++;
                        if (code == VL_NOENT) {
@@ -440,7 +441,7 @@ handleit(struct cmd_syndesc *as, void *arock)
                    int n1 = 0, n2 = 0, n3 = 0, n4 = 0;
                    memset(&entry, 0, sizeof(entry));
                    code =
-                       ubik_Call(VL_ListEntry, cstruct, 0, index, &count,
+                       ubik_VL_ListEntry(cstruct, 0, index, &count,
                                  &next_index, &entry);
                    if (code) {
                        printf("VL_ListEntry returned code = %d\n", code);
@@ -450,7 +451,7 @@ handleit(struct cmd_syndesc *as, void *arock)
                        break;
                    num++;
                    code =
-                       ubik_Call(VL_GetEntryByNameO, cstruct, 0, entry.name,
+                       ubik_VL_GetEntryByNameO(cstruct, 0, entry.name,
                                  &tentry);
                    if (code == VL_NOENT) {
                        num1++;
@@ -459,7 +460,7 @@ handleit(struct cmd_syndesc *as, void *arock)
                        printf("\tVolume %s %d (not in namehash)\n",
                               entry.name, entry.volumeId[RWVOL]);
                        code =
-                           ubik_Call(VL_UpdateEntry, cstruct, 0,
+                           ubik_VL_UpdateEntry(cstruct, 0,
                                      entry.volumeId[RWVOL], -1, &updateentry,
                                      0);
                        if (code) {
@@ -469,7 +470,7 @@ handleit(struct cmd_syndesc *as, void *arock)
                        }
                    }
                    code =
-                       ubik_Call(VL_GetEntryByID, cstruct, 0,
+                       ubik_VL_GetEntryByID(cstruct, 0,
                                  entry.volumeId[RWVOL], RWVOL, &tentry);
                    if (code == VL_NOENT) {
                        num1++;
@@ -479,7 +480,7 @@ handleit(struct cmd_syndesc *as, void *arock)
                        printf("\tVolume %s %d (not in rw id hash)\n",
                               entry.name, entry.volumeId[RWVOL]);
                        code =
-                           ubik_Call(VL_UpdateEntryByName, cstruct, 0,
+                           ubik_VL_UpdateEntryByName(cstruct, 0,
                                      entry.name, &updateentry, 0);
                        if (code) {
                            printf("\tFailed to update volume %s (err=%d)\n",
@@ -490,7 +491,7 @@ handleit(struct cmd_syndesc *as, void *arock)
                    }
                    if (entry.volumeId[BACKVOL] && !n2) {
                        code =
-                           ubik_Call(VL_GetEntryByID, cstruct, 0,
+                           ubik_VL_GetEntryByID(cstruct, 0,
                                      entry.volumeId[BACKVOL], BACKVOL,
                                      &tentry);
                        if (code == VL_NOENT) {
@@ -501,7 +502,7 @@ handleit(struct cmd_syndesc *as, void *arock)
                            printf("\tVolume %s %d (not in backup id hash)\n",
                                   entry.name, entry.volumeId[BACKVOL]);
                            code =
-                               ubik_Call(VL_UpdateEntry, cstruct, 0,
+                               ubik_VL_UpdateEntry(cstruct, 0,
                                          entry.volumeId[RWVOL], -1,
                                          &updateentry, 0);
                            if (code) {
@@ -514,7 +515,7 @@ handleit(struct cmd_syndesc *as, void *arock)
                    }
                    if (entry.volumeId[ROVOL && !n2]) {
                        code =
-                           ubik_Call(VL_GetEntryByID, cstruct, 0,
+                           ubik_VL_GetEntryByID(cstruct, 0,
                                      entry.volumeId[ROVOL], ROVOL, &tentry);
                        if (code == VL_NOENT) {
                            n4 = 1;
@@ -524,7 +525,7 @@ handleit(struct cmd_syndesc *as, void *arock)
                            printf("\tVolume %s %d (not in RO id hash)\n",
                                   entry.name, entry.volumeId[ROVOL]);
                            code =
-                               ubik_Call(VL_UpdateEntry, cstruct, 0,
+                               ubik_VL_UpdateEntry(cstruct, 0,
                                          entry.volumeId[RWVOL], -1,
                                          &updateentry, 0);
                            if (code) {
@@ -548,7 +549,7 @@ handleit(struct cmd_syndesc *as, void *arock)
                fill_listattributes_entry(&listbyattributes, argp, nargs);
                display_listattributes_entry(&listbyattributes, 0);
                code =
-                   ubik_Call(VL_ListAttributes, cstruct, 0,
+                   ubik_VL_ListAttributes(cstruct, 0,
                              &listbyattributes, &nentries, &entries);
                if (code) {
                    printf("VL_ListAttributes returned code = %d\n", code);
@@ -581,7 +582,7 @@ handleit(struct cmd_syndesc *as, void *arock)
                    nentries = 0;
                    memset(&entries, 0, sizeof(entries));
                    code =
-                       ubik_Call(VL_ListAttributesN2, cstruct, 0,
+                       ubik_VL_ListAttributesN2(cstruct, 0,
                                  &listbyattributes, name, si, &nentries,
                                  &entries, &nsi);
                    if (code) {
@@ -607,7 +608,7 @@ handleit(struct cmd_syndesc *as, void *arock)
                display_listattributes_entry(&listbyattributes, 0);
                memset(&linkedvldbs, 0, sizeof(vldb_list));
                code =
-                   ubik_Call(VL_LinkedList, cstruct, 0, &listbyattributes,
+                   ubik_VL_LinkedList(cstruct, 0, &listbyattributes,
                              &netries, &linkedvldbs);
                if (code) {
                    printf("VL_LinkedList returned code = %d\n", code);
@@ -629,7 +630,7 @@ handleit(struct cmd_syndesc *as, void *arock)
                display_listattributes_entry(&listbyattributes, 0);
                memset(&linkedvldbs, 0, sizeof(vldb_list));
                code =
-                   ubik_Call(VL_LinkedListN, cstruct, 0, &listbyattributes,
+                   ubik_VL_LinkedListN(cstruct, 0, &listbyattributes,
                              &netries, &linkedvldbs);
                if (code) {
                    printf("VL_LinkedList returned code = %d\n", code);
@@ -647,7 +648,7 @@ handleit(struct cmd_syndesc *as, void *arock)
                ++argp, --nargs;
                sscanf(&(*argp)[0], "%d", &voltype);
                code =
-                   ubik_Call(VL_GetEntryByID, cstruct, 0, id, voltype,
+                   ubik_VL_GetEntryByID(cstruct, 0, id, voltype,
                              &entry);
                display_entry(&entry, code);
                printf("return code is %d.\n", code);
@@ -656,7 +657,7 @@ handleit(struct cmd_syndesc *as, void *arock)
                ++argp, --nargs;
                sscanf(&(*argp)[0], "%d", &voltype);
                code =
-                   ubik_Call(VL_GetEntryByID, cstruct, 0, id, voltype,
+                   ubik_VL_GetEntryByID(cstruct, 0, id, voltype,
                              &entry);
                display_entry(&entry, code);
                memset(&updateentry, 0, sizeof(updateentry));
@@ -664,7 +665,7 @@ handleit(struct cmd_syndesc *as, void *arock)
                printf("\tRehashing namehash table for %s (%d)\n", entry.name,
                       entry.volumeId[RWVOL]);
                code =
-                   ubik_Call(VL_UpdateEntry, cstruct, 0,
+                   ubik_VL_UpdateEntry(cstruct, 0,
                              entry.volumeId[RWVOL], -1, &updateentry, 0);
                if (code) {
                    printf("\tFailed to update volume %s (err=%d)\n",
@@ -686,7 +687,7 @@ handleit(struct cmd_syndesc *as, void *arock)
                for (index = 0; 1; index = next_index) {
                    memset(&entry, 0, sizeof(entry));
                    code =
-                       ubik_Call(VL_ListEntry, cstruct, 0, index, &count,
+                       ubik_VL_ListEntry(cstruct, 0, index, &count,
                                  &next_index, &entry);
                    if (code) {
                        printf("VL_ListEntry returned code = %d\n", code);
@@ -707,7 +708,7 @@ handleit(struct cmd_syndesc *as, void *arock)
                                ("\tUndeleting vldb entry for vol %d (%s)\n",
                                 id, entry.name);
                            code =
-                               ubik_Call(VL_UpdateEntry, cstruct, 0, id, -1,
+                               ubik_VL_UpdateEntry(cstruct, 0, id, -1,
                                          &updateentry, 0);
                            if (code) {
                                printf
@@ -723,14 +724,14 @@ handleit(struct cmd_syndesc *as, void *arock)
            } else if (!strcmp(oper, "dn")) {
                vname = &argp[0][0];
                code =
-                   ubik_Call(VL_GetEntryByNameO, cstruct, 0, vname, &entry);
+                   ubik_VL_GetEntryByNameO(cstruct, 0, vname, &entry);
                display_entry(&entry, code);
                printf("return code is %d.\n", code);
            } else if (!strcmp(oper, "nv")) {
                int newvolid;
                sscanf(&(*argp)[0], "%d", &id);
                code =
-                   ubik_Call(VL_GetNewVolumeId, cstruct, 0, id, &newvolid);
+                   ubik_VL_GetNewVolumeId(cstruct, 0, id, &newvolid);
                if (!code)
                    printf("Current Max volid is (in hex):%X\n", newvolid);
                printf("return code is %d\n", code);
@@ -738,7 +739,7 @@ handleit(struct cmd_syndesc *as, void *arock)
                vldstats stats;
                vital_vlheader vital_header;
                code =
-                   ubik_Call(VL_GetStats, cstruct, 0, &stats, &vital_header);
+                   ubik_VL_GetStats(cstruct, 0, &stats, &vital_header);
                if (!code)
                    dump_stats(&stats, &vital_header);
                printf("return code is %d.\n", code);
@@ -750,7 +751,7 @@ handleit(struct cmd_syndesc *as, void *arock)
 
                addrs.bulkaddrs_val = 0;
                addrs.bulkaddrs_len = 0;
-               code = ubik_Call(VL_GetAddrs, cstruct, 0, 0 /*Handle */ ,
+               code = ubik_VL_GetAddrs(cstruct, 0, 0 /*Handle */ ,
                                 0 /*spare2 */ , &vlcb,
                                 &nentries, &addrs);
                if (code) {
@@ -775,7 +776,7 @@ handleit(struct cmd_syndesc *as, void *arock)
 
                addrs.bulkaddrs_val = 0;
                addrs.bulkaddrs_len = 0;
-               code = ubik_Call(VL_GetAddrs, cstruct, 0, 0 /*Handle */ ,
+               code = ubik_VL_GetAddrs(cstruct, 0, 0 /*Handle */ ,
                                 0 /*spare2 */ , &vlcb,
                                 &nentries, &addrs);
                if (code) {
@@ -800,7 +801,7 @@ handleit(struct cmd_syndesc *as, void *arock)
                        attrs.index = *addrp & 0x00ffffff;
 
                        code =
-                           ubik_Call(VL_GetAddrsU, cstruct, 0, &attrs, &uuid,
+                           ubik_VL_GetAddrsU(cstruct, 0, &attrs, &uuid,
                                      &unique, &mhnentries, &mhaddrs);
                        if (code) {
                            printf("VL_GetAddrsU returned code = %d\n", code);
@@ -850,7 +851,7 @@ handleit(struct cmd_syndesc *as, void *arock)
                addrs1.bulkaddrs_val = 0;
                addrs1.bulkaddrs_len = 0;
                code =
-                   ubik_Call(VL_GetAddrs, cstruct, 0, 0, 0, &vlcb,
+                   ubik_VL_GetAddrs(cstruct, 0, 0, 0, &vlcb,
                              &nentries1, &addrs1);
                if (code) {
                    printf("VL_GetAddrs returned code = %d\n", code);
@@ -872,7 +873,7 @@ handleit(struct cmd_syndesc *as, void *arock)
                        attrs.Mask = VLADDR_INDEX;
                        attrs.index = (base * VL_MHSRV_PERBLK) + index;
                        code =
-                           ubik_Call(VL_GetAddrsU, cstruct, 0, &attrs, &uuid,
+                           ubik_VL_GetAddrsU(cstruct, 0, &attrs, &uuid,
                                      &unique, &nentries2, &addrs2);
                        if (code) {
                            printf("VL_GetAddrsU returned code = %d\n", code);
@@ -956,7 +957,7 @@ handleit(struct cmd_syndesc *as, void *arock)
                    ++argp, --nargs;
                }
                code =
-                   ubik_Call(VL_RegisterAddrs, cstruct, 0, &uuid,
+                   ubik_VL_RegisterAddrs(cstruct, 0, &uuid,
                              0 /*spare */ , &addrs);
                if (code) {
                    printf("VL_RegisterAddrs returned code = %d\n", code);
@@ -988,7 +989,7 @@ handleit(struct cmd_syndesc *as, void *arock)
 
                printf("changing 0x%x to 0x%x\n", ntohl(a1), ntohl(a2));
                code =
-                   ubik_Call(VL_ChangeAddr, cstruct, 0, ntohl(a1),
+                   ubik_VL_ChangeAddr(cstruct, 0, ntohl(a1),
                              ntohl(a2));
                if (code) {
                    printf("VL_ChangeAddr returned code = %d\n", code);
@@ -1002,7 +1003,7 @@ handleit(struct cmd_syndesc *as, void *arock)
                ++argp, --nargs;
                sscanf(&(*argp)[0], "%d", &a2);
                printf(" to %d (0x%x)\n", a2, a2);
-               code = ubik_Call(VL_ChangeAddr, cstruct, 0, a1, a2);
+               code = ubik_VL_ChangeAddr(cstruct, 0, a1, a2);
                if (code) {
                    printf("VL_ChangeAddr returned code = %d\n", code);
                    continue;