| From | Sent On | Attachments |
|---|---|---|
| Luoqi Chen | Sep 18, 1998 12:40 pm | |
| Julian Elischer | Sep 18, 1998 2:25 pm | |
| Don Lewis | Sep 18, 1998 8:28 pm | |
| Brian Feldman | Sep 19, 1998 1:41 pm | |
| Don Lewis | Sep 21, 1998 5:51 am | |
| Luoqi Chen | Sep 21, 1998 9:12 am | |
| Luoqi Chen | Sep 21, 1998 9:23 am | |
| Don Lewis | Sep 21, 1998 3:54 pm | |
| Brian Feldman | Sep 21, 1998 4:22 pm | |
| Luoqi Chen | Sep 21, 1998 4:27 pm | |
| Don Lewis | Sep 22, 1998 6:22 am | |
| Luoqi Chen | Sep 22, 1998 9:05 am | |
| Alfred Perlstein | Sep 22, 1998 11:19 am | |
| Kirk McKusick | Sep 22, 1998 1:11 pm | |
| Kirk McKusick | Sep 22, 1998 1:50 pm | |
| Luoqi Chen | Sep 22, 1998 2:39 pm | |
| Luoqi Chen | Sep 22, 1998 3:11 pm | |
| Don Lewis | Sep 22, 1998 5:57 pm | |
| Terry Lambert | Sep 22, 1998 8:04 pm | |
| Terry Lambert | Sep 22, 1998 8:28 pm | |
| Luoqi Chen | Sep 22, 1998 8:59 pm |
| Subject: | Yet another patch to try for softupdates panic | |
|---|---|---|
| From: | Luoqi Chen (luo...@watermarkgroup.com) | |
| Date: | Sep 18, 1998 12:40:58 pm | |
| List: | org.freebsd.freebsd-current | |
This patch could be the real cure for the `initiate_write_filepage' panic people were seeing during make -j# world. I have posted another patch about a week ago (in fact, I have committed it), but it turned out to be no more than a no-op (thanks to Bruce for pointing it out, it was an embarrassing silly mistake of mine). I certainly hope this patch will do its work: this patch should fix a race condition between directory truncation and file creation that could lead to the `initiate_write_filepage' panic.
-lq
PS. I know it is bad coding style. I'll make it look better if it's proven to work.
Index: ffs_inode.c =================================================================== RCS file: /home/ncvs/src/sys/ufs/ffs/ffs_inode.c,v retrieving revision 1.47 diff -u -r1.47 ffs_inode.c --- ffs_inode.c 1998/09/15 14:45:28 1.47 +++ ffs_inode.c 1998/09/18 12:41:16 @@ -191,7 +191,7 @@ * rarely, we solve the problem by syncing the file * so that it will have no data structures left. */ - if ((error = VOP_FSYNC(ovp, cred, MNT_WAIT, + if ((error = VOP_FSYNC(ovp, cred, MNT_WAIT|0x80000000, p)) != 0) return (error); } else { Index: ffs_vnops.c =================================================================== RCS file: /home/ncvs/src/sys/ufs/ffs/ffs_vnops.c,v retrieving revision 1.51 diff -u -r1.51 ffs_vnops.c --- ffs_vnops.c 1998/09/07 11:50:19 1.51 +++ ffs_vnops.c 1998/09/18 16:13:01 @@ -126,8 +126,8 @@ struct buf *nbp; int s, error, passes, skipmeta; daddr_t lbn; + int istrunc = 0;
- if (vp->v_type == VBLK) { lbn = INT_MAX; } else { @@ -137,6 +137,14 @@ }
/* + * XXX hack to solve directory truncation problem + */ + if (ap->a_waitfor & 0x80000000) { + istrunc = 1; + ap->a_waitfor &= ~0x80000000; + } + + /* * Flush all dirty buffers associated with a vnode. */ passes = NIADDR; @@ -251,7 +259,7 @@ getmicrotime(&tv); if ((error = UFS_UPDATE(vp, &tv, &tv, ap->a_waitfor == MNT_WAIT)) != 0) return (error); - if (DOINGSOFTDEP(vp) && ap->a_waitfor == MNT_WAIT) + if (DOINGSOFTDEP(vp) && ap->a_waitfor == MNT_WAIT && !istrunc) error = softdep_fsync(vp); return (error); }
To Unsubscribe: send mail to majo...@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message





