From owner-cvs-all Wed Dec 12 21: 7:52 2001 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 2BD7837B417; Wed, 12 Dec 2001 21:07:49 -0800 (PST) Received: (from mckusick@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id fBD57n063530; Wed, 12 Dec 2001 21:07:49 -0800 (PST) (envelope-from mckusick) Message-Id: <200112130507.fBD57n063530@freefall.freebsd.org> From: Kirk McKusick Date: Wed, 12 Dec 2001 21:07:49 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/ufs/ffs ffs_inode.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG mckusick 2001/12/12 21:07:49 PST Modified files: sys/ufs/ffs ffs_inode.c Log: When a file is partially truncated, we first check to see if the new file end will land in the middle of a file hole. Since the last block of a file must always be allocated, the hole is filled by allocating a block at that location. If the hole being filled is a direct block, then the truncation may eventually reduce the full sized block down to a fragment. When running with soft updates, it is necessary to FSYNC the file after allocating the block and before creating the fragment to avoid triggering a soft updates inconsistency when the block unexpectedly shrinks. Found by: Matthew Dillon MFC after: 1 week Revision Changes Path 1.73 +13 -1 src/sys/ufs/ffs/ffs_inode.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message