Date: Mon, 11 Nov 2002 12:04:23 -0800 (PST) From: Brian Feldman <green@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 20972 for review Message-ID: <200211112004.gABK4N1Z088497@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=20972 Change 20972 by green@green_laptop_2 on 2002/11/11 12:04:14 Fix extattr corruption on the disk instead of just noticing it. Affected files ... .. //depot/projects/trustedbsd/mac/sbin/fsck_ffs/ea.c#3 edit Differences ... ==== //depot/projects/trustedbsd/mac/sbin/fsck_ffs/ea.c#3 (text+ko) ==== @@ -63,10 +63,14 @@ eascan(struct inodesc *idesc, struct ufs2_dinode *dp) { struct bufarea *bp; - char tmpf[sizeof("/tmp/fsck_ffs-extent.XXXXXX")]; u_char *cp; long blksiz; +#if 0 + char tmpf[sizeof("/tmp/fsck_ffs-extent.XXXXXX")]; int fd; +#else + union dinode *fixdp; +#endif if (dp->di_extsize == 0) return 0; @@ -79,6 +83,7 @@ if (chkextattr(cp, dp->di_extsize)) { pfatal("CORRUPT EXTENDED ATTRIBUTES I=%lu", (u_long)idesc->id_number); +#if 0 if (reply("DUMP EXTENT") == 1) { strcpy(tmpf, "/tmp/fsck_ffs-extent.XXXXXX"); fd = mkstemp(tmpf); @@ -91,6 +96,14 @@ (void)close(fd); } } +#else + if (reply("CLEAR") == 1) { + fixdp = ginode(idesc->id_number); + fixdp->dp2.di_extsize = 0; + bzero(&fixdp->dp2.di_extb, sizeof(fixdp->dp2.di_extb)); + inodirty(); + } +#endif } bp->b_flags &= ~B_INUSE; return (0); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200211112004.gABK4N1Z088497>