From owner-cvs-src-old@FreeBSD.ORG Fri Jun 10 22:49:12 2011 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89DBA1065670 for ; Fri, 10 Jun 2011 22:49:12 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5C83B8FC1B for ; Fri, 10 Jun 2011 22:49:12 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id p5AMnClZ090988 for ; Fri, 10 Jun 2011 22:49:12 GMT (envelope-from jeff@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id p5AMnCwf090987 for cvs-src-old@freebsd.org; Fri, 10 Jun 2011 22:49:12 GMT (envelope-from jeff@repoman.freebsd.org) Message-Id: <201106102249.p5AMnCwf090987@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to jeff@repoman.freebsd.org using -f From: Jeff Roberson Date: Fri, 10 Jun 2011 22:48:35 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sbin/fsck_ffs suj.c src/sys/sys vnode.h src/sys/ufs/ffs ffs_alloc.c ffs_balloc.c ffs_extern.h ffs_inode.c ffs_softdep.c ffs_vfsops.c ffs_vnops.c fs.h softdep.h src/sys/ufs/ufs inode.h ufsmount.h X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jun 2011 22:49:12 -0000 jeff 2011-06-10 22:48:35 UTC FreeBSD src repository Modified files: sbin/fsck_ffs suj.c sys/sys vnode.h sys/ufs/ffs ffs_alloc.c ffs_balloc.c ffs_extern.h ffs_inode.c ffs_softdep.c ffs_vfsops.c ffs_vnops.c fs.h softdep.h sys/ufs/ufs inode.h ufsmount.h Log: SVN rev 222958 on 2011-06-10 22:48:35Z by jeff Implement fully asynchronous partial truncation with softupdates journaling to resolve errors which can cause corruption on recovery with the old synchronous mechanism. - Append partial truncation freework structures to indirdeps while truncation is proceeding. These prevent new block pointers from becoming valid until truncation completes and serialize truncations. - On completion of a partial truncate journal work waits for zeroed pointers to hit indirects. - softdep_journal_freeblocks() handles last frag allocation and last block zeroing. - vtruncbuf/ffs_page_remove moved into softdep_*_freeblocks() so it is only implemented in one place. - Block allocation failure handling moved up one level so it does not proceed with buf locks held. This permits us to do more extensive reclaims when filesystem space is exhausted. - softdep_sync_metadata() is broken into two parts, the first executes once at the start of ffs_syncvnode() and flushes truncations and inode dependencies. The second is called on each locked buf. This eliminates excessive looping and rollbacks. - Improve the mechanism in process_worklist_item() that handles acquiring vnode locks for handle_workitem_remove() so that it works more generally and does not loop excessively over the same worklist items on each call. - Don't corrupt directories by zeroing the tail in fsck. This is only done for regular files. - Push a fsync complete record for files that need it so the checker knows a truncation in the journal is no longer valid. Discussed with: mckusick, kib (ffs_pages_remove and ffs_truncate parts) Tested by: pho Revision Changes Path 1.8 +16 -36 src/sbin/fsck_ffs/suj.c 1.375 +1 -0 src/sys/sys/vnode.h 1.168 +2 -2 src/sys/ufs/ffs/ffs_alloc.c 1.57 +40 -6 src/sys/ufs/ffs/ffs_balloc.c 1.82 +5 -2 src/sys/ufs/ffs/ffs_extern.h 1.121 +52 -74 src/sys/ufs/ffs/ffs_inode.c 1.276 +2407 -1320 src/sys/ufs/ffs/ffs_softdep.c 1.383 +2 -4 src/sys/ufs/ffs/ffs_vfsops.c 1.198 +79 -97 src/sys/ufs/ffs/ffs_vnops.c 1.60 +2 -1 src/sys/ufs/ffs/fs.h 1.27 +69 -35 src/sys/ufs/ffs/softdep.h 1.59 +2 -0 src/sys/ufs/ufs/inode.h 1.45 +3 -2 src/sys/ufs/ufs/ufsmount.h