#include <afs/param.h>
#include <roken.h>
+#include <afs/opr.h>
#include <ctype.h>
*/
int
ListViceInodes(char *devname, char *mountedOn, FD_t inodeFile,
- afs_uint32 (*judgeInode) (), afs_uint32 judgeParam, int *forcep, int forceR,
+ afs_uint32 (*judgeInode) (), VolumeId judgeParam, int *forcep, int forceR,
char *wpath, void *rock)
{
Log("ListViceInodes not implemented for this platform!\n");
}
#else
#if !defined(AFS_SGI_ENV)
-#ifdef AFS_OSF_ENV
-#include <ufs/fs.h>
-#else /* AFS_OSF_ENV */
#ifdef AFS_VFSINCL_ENV
#define VFS
#ifdef AFS_SUN5_ENV
#include <sys/fs.h>
#endif
#endif /* AFS_VFSINCL_ENV */
-#endif /* AFS_OSF_ENV */
#ifdef AFS_VFSINCL_ENV
#include <sys/vnode.h>
#ifdef AFS_SUN5_ENV
#endif
#endif
#else /* AFS_VFSINCL_ENV */
-#ifdef AFS_OSF_ENV
-#include <ufs/inode.h>
-#else /* AFS_OSF_ENV */
#include <sys/inode.h>
-#endif
#endif /* AFS_VFSINCL_ENV */
#endif /* AFS_SGI_ENV */
#include <afs/osi_inode.h>
#include <sys/ino.h>
#endif
+#include <rx/rx_queue.h>
+
#include "lock.h"
#include "ihandle.h"
#include "vnode.h"
int
ListViceInodes(char *devname, char *mountedOn, FD_t inodeFile,
- int (*judgeInode) (), afs_uint32 judgeParam, int *forcep, int forceR,
+ int (*judgeInode) (), VolumeId judgeParam, int *forcep, int forceR,
char *wpath, void *rock)
{
char dev[50], rdev[51];
* LAST_RSVD_I is a vice inode, with dead beef, and
* di_nlink == 2 to indicate the FORCE.
*/
- osi_Assert(p = ginode(LAST_RSVD_I));
+ opr_Verify(p = ginode(LAST_RSVD_I));
if (p->di_vicemagic == VICEMAGIC && p->di_vicep1 == 0xdeadbeef
&& p->di_nlink == 2) {
#define __ASSERT_H__
#ifdef AFS_SGI_XFS_IOPS_ENV
-#include <dirent.h>
#include <afs/xfsattrs.h>
/* xfs_ListViceInodes
*
int update_chown = 0;
int retCode = 0;
char tmpName[32];
- b64_string_t stmp;
int tag;
afs_ino_str_t stmp;
int
xfs_ListViceInodes(char *devname, char *mountedOn, FD_t inodeFile,
- int (*judgeInode) (), afs_uint32 judgeParam, int *forcep,
+ int (*judgeInode) (), VolumeId judgeParam, int *forcep,
int forceR, char *wpath, void *rock)
{
i_list_inode_t info;
if (n_renames >= n_avail) {
n_avail += N_RENAME_STEP;
if (n_avail == N_RENAME_STEP)
- renames = (xfs_Rename_t *)
- malloc(n_avail * sizeof(xfs_Rename_t));
+ renames = malloc(n_avail * sizeof(xfs_Rename_t));
else
- renames = (xfs_Rename_t *)
- realloc((char *)renames,
- n_avail * sizeof(xfs_Rename_t));
+ renames = realloc(renames,
+ n_avail * sizeof(xfs_Rename_t));
if (!renames) {
Log("Can't %salloc %lu bytes for rename list.\n",
(n_avail == N_RENAME_STEP) ? "m" : "re",
closedir(top_dirp);
if (renames)
- free((char *)renames);
+ free(renames);
if (inodeFile != INVALID_FD) {
if (OS_SYNC(inodeFile) == -1) {
Log("Unable to successfully fsync inode file for %s\n", mountedOn);
if (top_dirp)
closedir(top_dirp);
if (renames)
- free((char *)renames);
+ free(renames);
return -1;
}
int
ListViceInodes(char *devname, char *mountedOn, FD_t inodeFile,
- int (*judgeInode) (), afs_uint32 judgeParam, int *forcep, int forceR,
+ int (*judgeInode) (), VolumeId judgeParam, int *forcep, int forceR,
char *wpath, void *rock)
{
char dev[50], rdev[51];
extern char *afs_rawname();
int
ListViceInodes(char *devname, char *mountedOn, FD_t inodeFile,
- int (*judgeInode) (), afs_uint32 judgeParam, int *forcep, int forceR,
+ int (*judgeInode) (), VolumeId judgeParam, int *forcep, int forceR,
char *wpath, void *rock)
{
union {
#else
if ((super.fs.fs_magic != FS_MAGIC)
|| (super.fs.fs_ncg < 1)
-#if defined(AFS_SUN_ENV) || defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
+#if defined(AFS_SUN_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
|| (super.fs.fs_cpg < 1)
#else
|| (super.fs.fs_cpg < 1 || super.fs.fs_cpg > MAXCPG)
#else
bufsize = super.fs.fs_ipg * sizeof(struct dinode);
#endif /* AFS_HPUX_ENV */
- inodes = (struct dinode *)malloc(bufsize);
+ inodes = malloc(bufsize);
einodes = (struct dinode *)(((char *)inodes) + bufsize);
if (inodes == NULL) {
Log("Unable to allocate enough memory to scan inodes; help!\n");
#endif /* AFS_SUN5_ENV */
i = c * super.fs.fs_ipg;
e = i + super.fs.fs_ipg;
-#ifdef AFS_OSF_ENV
- dblk1 = fsbtodb(&super.fs, itod(&super.fs, i));
- if (OS_SEEK(pfd, (off_t) ((off_t) dblk1 * DEV_BSIZE), L_SET) == -1) {
-#else
#if defined(AFS_SUN5_ENV) || defined(AFS_DARWIN_ENV)
f1 = fsbtodb(&super.fs, itod(&super.fs, i));
off = (offset_t) f1 << DEV_BSHIFT;
if (OS_SEEK(pfd, dbtob(fsbtodb(&super.fs, itod(&super.fs, i))), L_SET)
== -1) {
#endif /* AFS_SUN5_ENV */
-#endif /* AFS_OSF_ENV */
#endif /* AFS_HPUX_ENV */
Log("Error reading inodes for partition %s; run vfsck\n",
partition);
i, p->di_vicep1, p->di_vicep2, p->di_vicep3, p->di_mode,
p->di_size, p->di_nlink);
#endif
-#ifdef AFS_OSF_ENV
-#ifdef AFS_3DISPARES
- /* Check to see if this inode is a pre-"OSF1 4.0D" inode */
- if ((p->di_uid || p->di_gid)
- && !(p->di_flags & (IC_XUID | IC_XGID))) {
- Log("Found unconverted inode %d: Use 'fs_conv_dux40D convert' on partition %s\n", i, partition);
- goto out;
- }
-#else
- osi_Panic("Tru64 needs AFS_3DISPARES\n");
-#endif
-#endif
#if defined(AFS_SUN5_ENV)
/* if this is a pre-sol2.6 unconverted inode, bail out */
{
#endif /* AFS_LINUX20_ENV */
static afs_int32
-convertVolumeInfo(FdHandle_t *fdhr, FdHandle_t *fdhw, afs_uint32 vid)
+convertVolumeInfo(FdHandle_t *fdhr, FdHandle_t *fdhw, VolumeId vid)
{
struct VolumeDiskData vd;
char *p;
#ifdef FSSYNC_BUILD_CLIENT
int
-inode_ConvertROtoRWvolume(char *pname, afs_uint32 volumeId)
+inode_ConvertROtoRWvolume(char *pname, VolumeId volumeId)
{
char dir_name[512], oldpath[512], newpath[512];
char volname[20];