Jeff Roberson 280e091a99 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
2011-06-10 22:48:35 +00:00
..
2010-08-23 22:24:11 +00:00
2010-11-22 07:00:47 +00:00
2010-02-15 14:07:40 +00:00
2010-08-06 14:33:42 +00:00
2010-08-23 22:24:11 +00:00
2010-03-02 16:58:04 +00:00
2011-01-25 22:25:16 +00:00
2011-03-23 13:44:09 +00:00
2010-08-23 22:24:11 +00:00
2010-03-10 18:51:13 +00:00
2010-06-20 12:52:33 +00:00
2010-12-19 13:40:38 +00:00
2011-06-06 13:18:29 +00:00
2011-04-14 08:53:04 +00:00
2010-12-08 15:12:37 +00:00
2011-06-02 09:56:42 +00:00