From owner-freebsd-current Wed Feb 5 13:10:46 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 32E8737B401 for ; Wed, 5 Feb 2003 13:10:44 -0800 (PST) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5F4E043F93 for ; Wed, 5 Feb 2003 13:10:43 -0800 (PST) (envelope-from phk@freebsd.org) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.6/8.12.6) with ESMTP id h15LAfYu045097; Wed, 5 Feb 2003 22:10:41 +0100 (CET) (envelope-from phk@freebsd.org) To: "Andrey A. Chernov" Cc: current@freebsd.org Subject: Re: Wrong date for DEVFS entries From: phk@freebsd.org In-Reply-To: Your message of "Thu, 06 Feb 2003 00:03:07 +0300." <20030205210307.GA1222@nagual.pp.ru> Date: Wed, 05 Feb 2003 22:10:41 +0100 Message-ID: <45096.1044479441@critter.freebsd.dk> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <20030205210307.GA1222@nagual.pp.ru>, "Andrey A. Chernov" writes: >On Wed, Feb 05, 2003 at 20:52:54 +0100, phk@freebsd.org wrote: >> >> My guess: Your RTC has the wrong time and ntpdate or similar stepped >> your clock to be correct. > >It is each boot repeated effect, not one time. >I run local clock in BIOS and use adjkerntz(8) to correct kernel time to >GMT, via standard /etc/wall_cmos_clock knob. It there any chance that >DEVFS comes up in the middle? If yes, is there any ideas for workaround? You can try this patch instead. It has a different side effect: if you reset your clock the (untouched) timestamps will change. Index: devfs_vnops.c =================================================================== RCS file: /home/ncvs/src/sys/fs/devfs/devfs_vnops.c,v retrieving revision 1.60 diff -u -r1.60 devfs_vnops.c --- devfs_vnops.c 29 Jan 2003 22:36:45 -0000 1.60 +++ devfs_vnops.c 5 Feb 2003 19:58:52 -0000 @@ -243,22 +243,19 @@ } while (0) if (vp->v_type != VCHR) { - fix(de->de_atime); vap->va_atime = de->de_atime; - fix(de->de_mtime); vap->va_mtime = de->de_mtime; - fix(de->de_ctime); vap->va_ctime = de->de_ctime; } else { dev = vp->v_rdev; - fix(dev->si_atime); vap->va_atime = dev->si_atime; - fix(dev->si_mtime); vap->va_mtime = dev->si_mtime; - fix(dev->si_ctime); vap->va_ctime = dev->si_ctime; vap->va_rdev = dev->si_udev; } + fix(vap->va_atime); + fix(vap->va_mtime); + fix(vap->va_ctime); vap->va_gen = 0; vap->va_flags = 0; vap->va_nlink = de->de_links; -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message