[PATCH] JBD: ordered-data commit cleanup
For data=ordered, kjournald at commit time has to write out and wait upon a long list of buffers. It does this in a rather awkward way with a single list. it causes complexity and long lock hold times, and makes the addition of rescheduling points quite hard So what we do instead (based on Chris Mason's suggestion) is to add a new buffer list (t_locked_list) to the journal. It contains buffers which have been placed under I/O. So as we walk the t_sync_datalist list we move buffers over to t_locked_list as they are written out. When t_sync_datalist is empty we may then walk t_locked_list waiting for the I/O to complete. As a side-effect this means that we can remove the nasty synchronous wait in journal_dirty_data which is there to avoid the kjournald livelock which would otherwise occur when someone is continuously dirtying a buffer.
Showing
Please register or sign in to comment