kernel -- ffs: Soft updates locking fixes
authorVenkatesh Srinivas <me@endeavour.zapto.org>
Sun, 22 Apr 2012 03:05:06 +0000 (20:05 -0700)
committerVenkatesh Srinivas <me@endeavour.zapto.org>
Sun, 22 Apr 2012 03:05:06 +0000 (20:05 -0700)
commit799ea500fc9a83af3435056a7fbc0a1aafb6bfc4
treeb0ccf9619acac3c2db2a24329974e36ea8c41e57
parenta0ae03a7d3b3fa1d249b77dacc6db4e4c913d76d
kernel -- ffs: Soft updates locking fixes

1) Do not take mplock in bioops callbacks; the lock was no longer synchronizing
   against mainline code.

2) Do not hold softdep lock around bwillinode()

3) Take softdep lock in softdep_process_worklist bioops callback. This callback
   was previously using the mplock for synchronization (insufficiently!)

4) Modify process_worklist_item to expect the softdep lock to be held on
   entry and release it at appropriate times.

Prevents a panic seen when running fsstress on a UFS+softdep fs, where fsync
finds a null buffer on vnode trees. This arose from a front-end/back-end
race in softdep_process_worklist.
sys/vfs/ufs/ffs_softdep.c