From owner-freebsd-hackers Thu May 30 03:15:55 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id DAA20520 for hackers-outgoing; Thu, 30 May 1996 03:15:55 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id DAA20507 for ; Thu, 30 May 1996 03:15:47 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.12/8.6.9) id UAA14948; Thu, 30 May 1996 20:11:19 +1000 Date: Thu, 30 May 1996 20:11:19 +1000 From: Bruce Evans Message-Id: <199605301011.UAA14948@godzilla.zeta.org.au> To: rashid@rk.ios.com, terry@lambert.org Subject: Re: Breaking ffs - speed enhancement? Cc: davidg@Root.COM, hackers@freebsd.org, jgreco@solaria.sol.net Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >There is a school of thought that says "shall be updated" in POSIX is >not the same as "shall be committed to stable storage" (the traditional >BSD implementation). When was this traditional? >This would let access times be updated in core, but only scheduled to >be written at a later time (not forced out immediately). 4.4BSD and I think Net/2 always only scheduled them to be written at a later time. At the end of every read (incorrectly including unsuccessful ones), access times are marked for update: ip->i_flag |= IN_ACCESS; /* see ufs_readwrite.c */ At certain checkpoints, the access times are updated. E.g., in ufs_close() if (inuse && !locked) ITIMES(ip, &time, &time); If IN_ACCESS is set, this sets the access time in-core, sets IN_MODIFIED, and clears IN_ACCESS. It doesn't write the inode. Setting IN_MODIFIED schedules the inode to be written on the next sync, or when it is reused. ffs_sync() calls VOP_UPDATE() with the sync-update flag clear and ffs_update() schedules a delayed write. Bruce