* Copyright (c) 1980, 1986 The Regents of the University of California.
* Redistribution and use in source and binary forms are permitted
* provided that the above copyright notice and this paragraph are
* duplicated in all such forms and that any documentation,
* advertising materials, and other materials related to such
* distribution and use acknowledge that the software was developed
* by the University of California, Berkeley. The name of the
* University may not be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
static char sccsid
[] = "@(#)pass4.c 5.8 (Berkeley) %G%";
register struct zlncnt
*zlnp
;
bzero((char *)&idesc
, sizeof(struct inodesc
));
idesc
.id_func
= pass4check
;
for (inumber
= ROOTINO
; inumber
<= lastino
; inumber
++) {
idesc
.id_number
= inumber
;
switch (statemap
[inumber
]) {
adjust(&idesc
, (short)n
);
for (zlnp
= zlnhead
; zlnp
; zlnp
= zlnp
->next
)
if (zlnp
->zlncnt
== inumber
) {
zlnp
->zlncnt
= zlnhead
->zlncnt
;
clri(&idesc
, "UNREF", 1);
clri(&idesc
, "UNREF", 1);
clri(&idesc
, "ZERO LENGTH", 1);
clri(&idesc
, "BAD/DUP", 1);
errexit("BAD STATE %d FOR INODE I=%d",
statemap
[inumber
], inumber
);
register struct inodesc
*idesc
;
register struct dups
*dlp
;
int nfrags
, res
= KEEPON
;
daddr_t blkno
= idesc
->id_blkno
;
for (nfrags
= idesc
->id_numfrags
; nfrags
> 0; blkno
++, nfrags
--) {
if (chkrange(blkno
, 1)) {
} else if (testbmap(blkno
)) {
for (dlp
= duplist
; dlp
; dlp
= dlp
->next
) {