Date: Fri, 10 Jun 2011 22:48:35 +0000 (UTC) From: Jeff Roberson <jeff@FreeBSD.org> To: cvs-src-old@freebsd.org 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 Message-ID: <201106102249.p5AMnCwf090987@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106102249.p5AMnCwf090987>
