Date: Fri, 23 Oct 1998 21:49:15 -0700 From: Don Lewis <Don.Lewis@tsc.tdk.com> To: Julian Elischer <julian@whistle.com>, current@FreeBSD.ORG Subject: Re: Soft-Updates aware fsck available. Message-ID: <199810240449.VAA22669@salsa.gv.tsc.tdk.com> In-Reply-To: Julian Elischer <julian@whistle.com> "Soft-Updates aware fsck available." (Oct 20, 8:22pm)
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199810240449.VAA22669>
