Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Apr 1998 21:28:47 +0200
From:      Ollivier Robert <roberto@keltia.freenix.fr>
To:        scsi@FreeBSD.ORG
Subject:   Re: soft updates :( (no time)
Message-ID:  <19980406212847.A16435@keltia.freenix.fr>
In-Reply-To: <19980406115850.43693@pavilion.net>; from Josef Karthauser on Mon, Apr 06, 1998 at 11:58:50AM %2B0100
References:  <19980406115850.43693@pavilion.net>

next in thread | previous in thread | raw e-mail | index | archive | help
According to Josef Karthauser:
> Does anyone know why I can't get softupdates to work? :(

Because you didn't read freebsd-current and didn't see the discussion about 
"time"... :-)

The first hunk fixes a panic.

--- ffs_softdep.c.orig	Fri Feb 20 21:12:51 1998
+++ ffs_softdep.c	Wed Apr  1 00:50:13 1998
@@ -1528,6 +1528,14 @@
 		newindirdep->ir_state = ATTACHED;
 		LIST_INIT(&newindirdep->ir_deplisthd);
 		LIST_INIT(&newindirdep->ir_donehd);
+		if (bp->b_blkno == bp->b_lblkno) {
+#ifdef DEBUG
+			printf("setup_allocindir_phase2: need bmap, blk %d\n",
+				bp->b_lblkno);
+#endif
+			VOP_BMAP(bp->b_vp, bp->b_lblkno, NULL, &bp->b_blkno,
+				NULL, NULL);
+		}
 		newindirdep->ir_saveddata = (ufs_daddr_t *)bp->b_data;
 		newindirdep->ir_savebp =
 		    getblk(ip->i_devvp, bp->b_blkno, bp->b_bcount, 0, 0);
@@ -3570,7 +3578,7 @@
 		}
 		vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
 		if (flushparent) {
-			tv = time;
+			getmicrotime(&tv);
 			if (error = UFS_UPDATE(pvp, &tv, &tv, MNT_WAIT)) {
 				vput(pvp);
 				return (error);
@@ -3931,7 +3939,7 @@
 		 * has a MKDIR_PARENT dependency.
 		 */
 		if (dap->da_state & MKDIR_PARENT) {
-			tv = time;
+			getmicrotime(&tv);
 			FREE_LOCK(&lk);
 			if (error = UFS_UPDATE(pvp, &tv, &tv, MNT_WAIT))
 				break;
@@ -4015,7 +4023,7 @@
 			}
 			FREE_LOCK(&lk);
 		}
-		tv = time;
+		getmicrotime(&tv);
 		error = UFS_UPDATE(vp, &tv, &tv, MNT_WAIT);
 		vput(vp);
 		if (error)

-- 
Ollivier ROBERT -=- FreeBSD: The Power to Serve! -=- roberto@keltia.freenix.fr
FreeBSD keltia.freenix.fr 3.0-CURRENT #0: Mon Mar 30 22:21:31 CEST 1998

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-scsi" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980406212847.A16435>