s/daddr_t/ufs_daddr_t/g
This should fix the issues which cropped up after daddr_t grew up. Sponsored by: DARPA & NAI Labs.
This commit is contained in:
parent
d4d239ae67
commit
d266a28647
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=97956
@ -36,7 +36,7 @@
|
||||
*/
|
||||
|
||||
#define MAXINOPB (MAXBSIZE / sizeof(struct dinode))
|
||||
#define MAXNINDIR (MAXBSIZE / sizeof(daddr_t))
|
||||
#define MAXNINDIR (MAXBSIZE / sizeof(ufs_daddr_t))
|
||||
|
||||
/*
|
||||
* Dump maps used to describe what is to be dumped.
|
||||
@ -108,8 +108,8 @@ int mapfiles(ino_t maxino, long *tapesize);
|
||||
int mapdirs(ino_t maxino, long *tapesize);
|
||||
|
||||
/* file dumping routines */
|
||||
void blksout(daddr_t *blkp, int frags, ino_t ino);
|
||||
void bread(daddr_t blkno, char *buf, int size);
|
||||
void blksout(ufs_daddr_t *blkp, int frags, ino_t ino);
|
||||
void bread(ufs_daddr_t blkno, char *buf, int size);
|
||||
void dumpino(struct dinode *dp, ino_t ino);
|
||||
void dumpmap(char *map, int type, ino_t ino);
|
||||
void writeheader(ino_t ino);
|
||||
@ -117,7 +117,7 @@ void writeheader(ino_t ino);
|
||||
/* tape writing routines */
|
||||
int alloctape(void);
|
||||
void close_rewind(void);
|
||||
void dumpblock(daddr_t blkno, int size);
|
||||
void dumpblock(ufs_daddr_t blkno, int size);
|
||||
void startnewtape(int top);
|
||||
void trewind(void);
|
||||
void writerec(char *dp, int isspcl);
|
||||
|
@ -87,7 +87,7 @@ static void rollforward(void);
|
||||
* The following structure defines the instruction packets sent to slaves.
|
||||
*/
|
||||
struct req {
|
||||
daddr_t dblk;
|
||||
ufs_daddr_t dblk;
|
||||
int count;
|
||||
};
|
||||
int reqsiz;
|
||||
@ -161,7 +161,7 @@ void
|
||||
writerec(char *dp, int isspcl)
|
||||
{
|
||||
|
||||
slp->req[trecno].dblk = (daddr_t)0;
|
||||
slp->req[trecno].dblk = (ufs_daddr_t)0;
|
||||
slp->req[trecno].count = 1;
|
||||
/* Can't do a structure assignment due to alignment problems */
|
||||
bcopy(dp, *(nextblock)++, sizeof (union u_spcl));
|
||||
@ -174,7 +174,7 @@ writerec(char *dp, int isspcl)
|
||||
}
|
||||
|
||||
void
|
||||
dumpblock(daddr_t blkno, int size)
|
||||
dumpblock(ufs_daddr_t blkno, int size)
|
||||
{
|
||||
int avail, tpblks, dblkno;
|
||||
|
||||
|
@ -65,10 +65,10 @@ typedef quad_t fsizeT;
|
||||
typedef long fsizeT;
|
||||
#endif
|
||||
|
||||
static int dirindir(ino_t ino, daddr_t blkno, int level, long *size,
|
||||
static int dirindir(ino_t ino, ufs_daddr_t blkno, int level, long *size,
|
||||
long *tapesize, int nodump);
|
||||
static void dmpindir(ino_t ino, daddr_t blk, int level, fsizeT *size);
|
||||
static int searchdir(ino_t ino, daddr_t blkno, long size, long filesize,
|
||||
static void dmpindir(ino_t ino, ufs_daddr_t blk, int level, fsizeT *size);
|
||||
static int searchdir(ino_t ino, ufs_daddr_t blkno, long size, long filesize,
|
||||
long *tapesize, int nodump);
|
||||
|
||||
/*
|
||||
@ -256,12 +256,12 @@ mapdirs(ino_t maxino, long *tapesize)
|
||||
* require the directory to be dumped.
|
||||
*/
|
||||
static int
|
||||
dirindir(ino_t ino, daddr_t blkno, int ind_level, long *filesize,
|
||||
dirindir(ino_t ino, ufs_daddr_t blkno, int ind_level, long *filesize,
|
||||
long *tapesize, int nodump)
|
||||
{
|
||||
int ret = 0;
|
||||
int i;
|
||||
daddr_t idblk[MAXNINDIR];
|
||||
ufs_daddr_t idblk[MAXNINDIR];
|
||||
|
||||
bread(fsbtodb(sblock, blkno), (char *)idblk, (int)sblock->fs_bsize);
|
||||
if (ind_level <= 0) {
|
||||
@ -293,7 +293,7 @@ dirindir(ino_t ino, daddr_t blkno, int ind_level, long *filesize,
|
||||
* contains any subdirectories.
|
||||
*/
|
||||
static int
|
||||
searchdir(ino_t ino, daddr_t blkno, long size, long filesize,
|
||||
searchdir(ino_t ino, ufs_daddr_t blkno, long size, long filesize,
|
||||
long *tapesize, int nodump)
|
||||
{
|
||||
struct direct *dp;
|
||||
@ -431,10 +431,10 @@ dumpino(struct dinode *dp, ino_t ino)
|
||||
* Read indirect blocks, and pass the data blocks to be dumped.
|
||||
*/
|
||||
static void
|
||||
dmpindir(ino_t ino, daddr_t blk, int ind_level, fsizeT *size)
|
||||
dmpindir(ino_t ino, ufs_daddr_t blk, int ind_level, fsizeT *size)
|
||||
{
|
||||
int i, cnt;
|
||||
daddr_t idblk[MAXNINDIR];
|
||||
ufs_daddr_t idblk[MAXNINDIR];
|
||||
|
||||
if (blk != 0)
|
||||
bread(fsbtodb(sblock, blk), (char *)idblk, (int) sblock->fs_bsize);
|
||||
@ -461,9 +461,9 @@ dmpindir(ino_t ino, daddr_t blk, int ind_level, fsizeT *size)
|
||||
* Collect up the data into tape record sized buffers and output them.
|
||||
*/
|
||||
void
|
||||
blksout(daddr_t *blkp, int frags, ino_t ino)
|
||||
blksout(ufs_daddr_t *blkp, int frags, ino_t ino)
|
||||
{
|
||||
daddr_t *bp;
|
||||
ufs_daddr_t *bp;
|
||||
int i, j, count, blks, tbperdb;
|
||||
|
||||
blks = howmany(frags * sblock->fs_fsize, TP_BSIZE);
|
||||
@ -535,7 +535,7 @@ writeheader(ino_t ino)
|
||||
struct dinode *
|
||||
getino(ino_t inum)
|
||||
{
|
||||
static daddr_t minino, maxino;
|
||||
static ufs_daddr_t minino, maxino;
|
||||
static struct dinode inoblock[MAXINOPB];
|
||||
|
||||
curino = inum;
|
||||
@ -558,7 +558,7 @@ int breaderrors = 0;
|
||||
#define BREADEMAX 32
|
||||
|
||||
void
|
||||
bread(daddr_t blkno, char *buf, int size)
|
||||
bread(ufs_daddr_t blkno, char *buf, int size)
|
||||
{
|
||||
int cnt, i;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user