]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
More warnings cleanup for vol/
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Mon, 27 Jul 2009 21:32:01 +0000 (22:32 +0100)
committerDerrick Brashear <shadow@dementia.org>
Tue, 28 Jul 2009 12:32:31 +0000 (05:32 -0700)
Prototype a number of functions
Add additional includes as required
Make some existing prototypes match the actual declarations
Volume IDs are unsigned in most of the code, change this bit to match
Make various Procs take an anonymous pointer, so they can be type checked
Add vol_internal.h for prototypes internal to this package

Reviewed-on: http://gerrit.openafs.org/235
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
13 files changed:
src/vol/clone.c
src/vol/fssync-client.c
src/vol/fssync-debug.c
src/vol/fssync.h
src/vol/namei_ops.c
src/vol/namei_ops.h
src/vol/nuke.c
src/vol/physio.c
src/vol/salvager.c
src/vol/vol-info.c
src/vol/vol-salvage.c
src/vol/vol-salvage.h
src/vol/vol_internal.h [new file with mode: 0644]

index ea32812d454180afaf225ca9caf4b05488256e59..8bc995d21df28944618431654885f7cff63101ea 100644 (file)
@@ -150,8 +150,9 @@ ci_Destroy(struct clone_head *ah)
 }
 
 static int
-IDecProc(Inode adata, struct clone_rock *aparm)
+IDecProc(Inode adata, void *arock)
 {
+    struct clone_rock *aparm = (struct clone_rock *)arock;
     IH_DEC(aparm->h, adata, aparm->vol);
     DOPOLL;
     return 0;
index 271144dec34f7cc17d201deed9321c02ba0419cb..13904e377af8b9f81904bccf1fb0e6052b31bb3c 100644 (file)
        Institution:    The Information Technology Center, Carnegie-Mellon University
 
  */
-#ifdef notdef
-
-/* All this is going away in early 1989 */
-int newVLDB;                   /* Compatibility flag */
-
-#endif
-static int newVLDB = 1;
-
 
 #ifndef AFS_PTHREAD_ENV
 #define USUAL_PRIORITY (LWP_MAX_PRIORITY - 2)
index b48de7baebc0d3902086e46f549eed8da8219626..8e58dadb21a90437c82d9d227ce379a8d300aced 100644 (file)
@@ -40,7 +40,6 @@
 #include <afs/afsint.h>
 #include <afs/assert.h>
 
-
 #include <fcntl.h>
 
 #ifndef AFS_NT40_ENV
index 6fa5ee154c30e615ff7055b6f989853c327f4034..a7fef29d705b028cee2fda5e5bd660076b69112f 100644 (file)
@@ -187,4 +187,6 @@ extern afs_int32 FSYNC_VolOp(VolumeId volume, char *partName, int com, int reaso
 extern afs_int32 FSYNC_StatsOp(FSSYNC_StatsOp_hdr * scom, int command, int reason,
                               SYNC_response * res_in);
 
+extern void FSYNC_fsInit(void);
+
 #endif /* __fssync_h_ */
index 8548ffe65d0ca12560fd80ac479fe6975b0f97f9..498c9bb8061bc95bf63900c8118bd51bdb347597 100644 (file)
@@ -1160,8 +1160,8 @@ namei_SetLinkCount(FdHandle_t * fdP, Inode ino, int count, int locked)
 
 /* ListViceInodes - write inode data to a results file. */
 static int DecodeInode(char *dpath, char *name, struct ViceInodeInfo *info,
-                      int volid);
-static int DecodeVolumeName(char *name, int *vid);
+                      unsigned int volid);
+static int DecodeVolumeName(char *name, unsigned int *vid);
 static int namei_ListAFSSubDirs(IHandle_t * dirIH,
                                int (*write_fun) (FILE *,
                                                  struct ViceInodeInfo *,
@@ -1504,11 +1504,11 @@ namei_ListAFSSubDirs(IHandle_t * dirIH,
 }
 
 static int
-DecodeVolumeName(char *name, int *vid)
+DecodeVolumeName(char *name, unsigned int *vid)
 {
     if (strlen(name) <= 2)
        return -1;
-    *vid = (int)flipbase64_to_int64(name);
+    *vid = (unsigned int)flipbase64_to_int64(name);
     return 0;
 }
 
@@ -1519,7 +1519,8 @@ DecodeVolumeName(char *name, int *vid)
  * Get
  */
 static int
-DecodeInode(char *dpath, char *name, struct ViceInodeInfo *info, int volid)
+DecodeInode(char *dpath, char *name, struct ViceInodeInfo *info,
+           unsigned int volid)
 {
     char fpath[512];
     struct afs_stat status;
@@ -1562,6 +1563,7 @@ DecodeInode(char *dpath, char *name, struct ViceInodeInfo *info, int volid)
  * this routine is called by namei_convertROtoRWvolume()
  */
 
+#ifdef FSSYNC_BUILD_CLIENT
 static afs_int32
 convertVolumeInfo(int fdr, int fdw, afs_uint32 vid)
 {
@@ -1593,6 +1595,7 @@ convertVolumeInfo(int fdr, int fdw, afs_uint32 vid)
     }
     return 0;
 }
+#endif
 
 /*
  * Convert a RO-volume into a RW-volume
index 39b03fcc51857eca879330437a1207e4165dd701..fff38a28e33794d057f274fee3f2d40f37c7e4c5 100644 (file)
@@ -72,7 +72,10 @@ typedef struct {
     char n_inode[NAMEI_LCOMP_LEN];
     char n_path[NAMEI_PATH_LEN];
 } namei_t;
+
 void namei_HandleToName(namei_t * name, IHandle_t * h);
+int namei_ConvertROtoRWvolume(char *pname, afs_uint32 volumeId);
+int namei_replace_file_by_hardlink(IHandle_t *hLink, IHandle_t *hTarget);
 
 #endif /* AFS_NAMEI_ENV */
 
index f1de4d1eea36344bd086488919fcab86aaee3cc4..76ca13be4b2fdae9567275d12038ded005bda5a4 100644 (file)
@@ -75,8 +75,9 @@ struct ilist {
  * Note that ainfo->u.param[0] is always the volume ID, for any vice inode.
  */
 static int
-NukeProc(struct ViceInodeInfo *ainfo, afs_int32 avolid, struct ilist **allInodes)
+NukeProc(struct ViceInodeInfo *ainfo, afs_uint32 avolid, void *arock)
 {
+    struct ilist **allInodes = (struct ilist **)arock;
     struct ilist *ti;
     register afs_int32 i;
 
index 65457f206f723e55a39311b7c74dc3bf0e56225d..4136bde42478ce0301e5fc2017997d92dd675da9 100644 (file)
@@ -40,6 +40,7 @@
 #include "salvage.h"
 #include "afs/assert.h"
 #include "afs/dir.h"
+#include "vol_internal.h"
 
 /* returns 0 on success, errno on failure */
 int
index f62abdb63cc2d6fb45c12cab06045737e59459b2..d10130d85b1a795befebd42fc7f167a5f94cf052 100644 (file)
 #include "salvsync.h"
 #include "viceinode.h"
 #include "salvage.h"
-#include "volinodes.h"         /* header magic number, etc. stuff */
 #include "vol-salvage.h"
 #ifdef AFS_NT40_ENV
 #include <pthread.h>
index fcf0c511a053f529ef4dbf1247230bd353c1c7b4..e9fc339504fbc94596bcc22183d93525c81095ae 100644 (file)
@@ -47,7 +47,6 @@
 #include "volume.h"
 #include "partition.h"
 #include "viceinode.h"
-#include "volinodes.h"
 #include <afs/afssyscalls.h>
 #include <afs/afsutil.h>
     
index 270ef1e14481563b7aea4ed00cfbfbcc337e5ca7..375f955c6a31a87068a2d6561fd1444ce21fe118 100644 (file)
@@ -188,6 +188,8 @@ Vnodes with 0 inode pointers in RW volumes are now deleted.
 #include "salvage.h"
 #include "volinodes.h"         /* header magic number, etc. stuff */
 #include "vol-salvage.h"
+#include "vol_internal.h"
+
 #ifdef AFS_NT40_ENV
 #include <pthread.h>
 #endif
@@ -2413,9 +2415,10 @@ CopyAndSalvage(register struct DirSummary *dir)
 }
 
 int
-JudgeEntry(struct DirSummary *dir, char *name, VnodeId vnodeNumber,
-          Unique unique)
+JudgeEntry(void *dirVal, char *name, afs_int32 vnodeNumber,
+          afs_int32 unique)
 {
+    struct DirSummary *dir = (struct DirSummary *)dirVal;
     struct VnodeEssence *vnodeEssence;
     afs_int32 dirOrphaned, todelete;
 
index 7c3abe09bf7ea4ad392c14e88a95f5dbabb17101..e1fd524058333a1143fb27273419c9766735a096 100644 (file)
@@ -238,8 +238,8 @@ extern void DistilVnodeEssence(VolumeId vid, VnodeClass class, Inode ino,
                               Unique * maxu);
 extern int GetInodeSummary(char *path, VolumeId singleVolumeNumber);
 extern void GetVolumeSummary(VolumeId singleVolumeNumber);
-extern int JudgeEntry(struct DirSummary *dir, char *name, VnodeId vnodeNumber,
-                      Unique unique);
+extern int JudgeEntry(void *dirVal, char *name, afs_int32 vnodeNumber,
+                     afs_int32 unique);
 extern void MaybeZapVolume(register struct InodeSummary *isp, char *message,
                           int deleteMe, int check);
 extern void ObtainSalvageLock(void);
diff --git a/src/vol/vol_internal.h b/src/vol/vol_internal.h
new file mode 100644 (file)
index 0000000..ad34d4a
--- /dev/null
@@ -0,0 +1,7 @@
+#ifndef AFS_SRC_VOL_INTERNAL_H
+#define AFS_SRC_VOL_INTERNAL_H
+
+/* physio.c */
+extern void SetSalvageDirHandle(DirHandle *, afs_int32, Device, Inode);
+
+#endif