diff options
author | jeff <jeff@FreeBSD.org> | 2011-06-10 22:48:35 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2011-06-10 22:48:35 +0000 |
commit | 6ba8b7f04c93a101c89962061bbd3307c0c54379 (patch) | |
tree | 726fa846f4feafabb50d0587401cbe7f12059336 /sys/ufs/ffs/ffs_vfsops.c | |
parent | 742a97ee0a4a2d4cabdc097c1fed047d490b5ffb (diff) | |
download | FreeBSD-src-6ba8b7f04c93a101c89962061bbd3307c0c54379.zip FreeBSD-src-6ba8b7f04c93a101c89962061bbd3307c0c54379.tar.gz |
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
Diffstat (limited to 'sys/ufs/ffs/ffs_vfsops.c')
-rw-r--r-- | sys/ufs/ffs/ffs_vfsops.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 68b9619..c7e0bd1 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -2034,12 +2034,10 @@ ffs_geom_strategy(struct bufobj *bo, struct buf *bp) static void db_print_ffs(struct ufsmount *ump) { - db_printf("mp %p %s devvp %p fs %p su_wl %d su_wl_in %d su_deps %d " - "su_req %d\n", + db_printf("mp %p %s devvp %p fs %p su_wl %d su_deps %d su_req %d\n", ump->um_mountp, ump->um_mountp->mnt_stat.f_mntonname, ump->um_devvp, ump->um_fs, ump->softdep_on_worklist, - ump->softdep_on_worklist_inprogress, ump->softdep_deps, - ump->softdep_req); + ump->softdep_deps, ump->softdep_req); } DB_SHOW_COMMAND(ffs, db_show_ffs) |