One of my disks has a bad block and hung while syncing (as the source of
the sync) when it was read. A patch is attached for the fix.
The sync_request_done function is called after each sync I/O request
completes regardless of the error outcome.
See end_sync_write and the "!sum_bhs" case a few lines above the patch
location for references. If sync_request_done is not called the
accounting is not updated and sooner or later things will hang. The
R1BH_Uptodate not set case (read I/O error) does not do this and the
problem occurs.
mark