2 * Copyright (c) 1980, 1986 The Regents of the University of California.
5 * Redistribution and use in source and binary forms are permitted
6 * provided that the above copyright notice and this paragraph are
7 * duplicated in all such forms and that any documentation,
8 * advertising materials, and other materials related to such
9 * distribution and use acknowledge that the software was developed
10 * by the University of California, Berkeley. The name of the
11 * University may not be used to endorse or promote products derived
12 * from this software without specific prior written permission.
13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
18 #include <afsconfig.h>
19 #include <afs/param.h>
24 #include <sys/param.h>
27 #include <sys/vnode.h>
28 #include <sys/mount.h>
29 #include <ufs/inode.h>
37 #else /* AFS_OSF_ENV */
38 #ifdef AFS_VFSINCL_ENV
39 #include <sys/vnode.h>
43 #include <sys/fs/ufs_inode.h>
44 #include <sys/fs/ufs_fs.h>
46 #include <sys/fs/ufs_fsdir.h>
48 #include <sys/fs/ufs_mount.h>
50 #include <ufs/inode.h>
53 #else /* AFS_VFSINCL_ENV */
54 #include <sys/inode.h>
57 #define LONGFILENAMES 1
58 #include <sys/sysmacros.h>
62 #endif /* AFS_VFSINCL_ENV */
63 #endif /* AFS_OSF_ENV */
68 static struct dups *duphead;
73 register struct dinode *dp;
77 memset((char *)&idesc, 0, sizeof(struct inodesc));
79 idesc.id_func = pass1bcheck;
82 for (c = 0; c < sblock.fs_ncg; c++) {
83 for (i = 0; i < sblock.fs_ipg; i++, inumber++) {
84 if (inumber < ROOTINO)
89 idesc.id_number = inumber;
91 idesc.id_fix = DONTKNOW;
93 #if defined(ACLS) && defined(AFS_HPUX_ENV)
94 if (((statemap[inumber] & STATE) != USTATE) &&
96 if (statemap[inumber] != USTATE &&
98 (ckinode(dp, &idesc) & STOP))
105 register struct inodesc *idesc;
107 register struct dups *dlp;
108 int nfrags, res = KEEPON;
109 daddr_t blkno = idesc->id_blkno;
111 for (nfrags = idesc->id_numfrags; nfrags > 0; blkno++, nfrags--) {
112 if (chkrange(blkno, 1))
114 for (dlp = duphead; dlp; dlp = dlp->next) {
115 if (dlp->dup == blkno) {
116 blkerror(idesc->id_number, "DUP", blkno);
117 dlp->dup = duphead->dup;
118 duphead->dup = blkno;
119 duphead = duphead->next;
124 if (muldup == 0 || duphead == muldup->next)