From owner-freebsd-current Fri Oct 23 21:49:51 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA13992 for freebsd-current-outgoing; Fri, 23 Oct 1998 21:49:51 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from gatekeeper.tsc.tdk.com (gatekeeper.tsc.tdk.com [207.113.159.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA13987 for ; Fri, 23 Oct 1998 21:49:49 -0700 (PDT) (envelope-from gdonl@tsc.tdk.com) Received: from sunrise.gv.tsc.tdk.com (root@sunrise.gv.tsc.tdk.com [192.168.241.191]) by gatekeeper.tsc.tdk.com (8.8.8/8.8.8) with ESMTP id VAA22922; Fri, 23 Oct 1998 21:49:18 -0700 (PDT) (envelope-from gdonl@tsc.tdk.com) Received: from salsa.gv.tsc.tdk.com (salsa.gv.tsc.tdk.com [192.168.241.194]) by sunrise.gv.tsc.tdk.com (8.8.5/8.8.5) with ESMTP id VAA10754; Fri, 23 Oct 1998 21:49:16 -0700 (PDT) Received: (from gdonl@localhost) by salsa.gv.tsc.tdk.com (8.8.5/8.8.5) id VAA22669; Fri, 23 Oct 1998 21:49:15 -0700 (PDT) From: Don Lewis Message-Id: <199810240449.VAA22669@salsa.gv.tsc.tdk.com> Date: Fri, 23 Oct 1998 21:49:15 -0700 In-Reply-To: Julian Elischer "Soft-Updates aware fsck available." (Oct 20, 8:22pm) X-Mailer: Mail User's Shell (7.2.6 alpha(3) 7/19/95) To: Julian Elischer , current@FreeBSD.ORG Subject: Re: Soft-Updates aware fsck available. Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Oct 20, 8:22pm, Julian Elischer wrote: } Subject: Soft-Updates aware fsck available. } Kirk has supplied a 'soft-updates aware' fsck. } It requires a small tweek to compile under FreeBSD } but that's all. } I've made the shar file available at: } http://www.freebsd.org/~julian/ } (at the bottom of the page). Here's the 'tweak' that I'm using, along with a bug fix in case lost+found fills. --- fsck/inode.c.orig Fri Oct 23 20:09:43 1998 +++ fsck/inode.c Fri Oct 23 20:15:09 1998 @@ -520,6 +520,7 @@ register struct dinode *dp; register char *p; struct passwd *pw; + time_t t; char *ctime(); printf(" I=%lu ", ino); @@ -535,7 +536,8 @@ if (preen) printf("%s: ", cdevname); printf("SIZE=%qu ", dp->di_size); - p = ctime(&dp->di_mtime.tv_sec); + t = dp->di_mtime; + p = ctime(&t); printf("MTIME=%12.12s %4.4s ", &p[4], &p[20]); } @@ -617,8 +619,9 @@ } dp->di_mode = type; dp->di_flags = 0; - (void)time(&dp->di_atime.tv_sec); + dp->di_atime = time(NULL); dp->di_mtime = dp->di_ctime = dp->di_atime; + dp->di_mtimensec = dp->di_ctimensec = dp->di_atimensec = 0; dp->di_size = sblock.fs_fsize; dp->di_blocks = btodb(sblock.fs_fsize); n_files++; --- fsck/pass3.c.orig Fri Oct 23 20:09:56 1998 +++ fsck/pass3.c Fri Oct 23 03:00:33 1998 @@ -84,9 +84,9 @@ if (linkup(orphan, inp->i_dotdot, NULL)) { inp->i_parent = inp->i_dotdot = lfdir; inoinfo(lfdir)->ino_linkcnt--; - inoinfo(orphan)->ino_state = DFOUND; - propagate(); } + inoinfo(orphan)->ino_state = DFOUND; + propagate(); continue; } pfatal("ORPHANED DIRECTORY LOOP DETECTED I=%lu", orphan); @@ -106,8 +106,8 @@ inoinfo(orphan)->ino_linkcnt++; inp->i_parent = inp->i_dotdot = lfdir; inoinfo(lfdir)->ino_linkcnt--; - inoinfo(orphan)->ino_state = DFOUND; - propagate(); } + inoinfo(orphan)->ino_state = DFOUND; + propagate(); } } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message