Hi Bart, On 08/10, Bart Van Assche wrote: > > That's an excellent catch. With your previous patch and this patch applied I > can't reproduce the hang in truncate_inode_pages_range() anymore.
Great, thanks. I'll send another debugging patch tomorrow, I was a bit busy today. The next step is obvious, we need to know the caller. But just in case, this doesn't necessarily mean that the usage of __ClearPageLocked() is actually buggy, we don't really know this so far... And I can't understand another oddity. Your test-case hangs in kill_bdev() path which sleeps with bdev->bd_openers == 0 under bdev->bd_mutex so it can't be re-opened. However, since your change in abort_exclusive_wait() helped, there should be the readers sleeping in lock_killable() and thus bd_openers can't be zero. Nevermind, I don't understand this code even remotely, we will see later who should be asked. > I still > see some other wait_on_page_bit() hangs after an I/O error has occurred. > However, the hangs that I still see are related to waiting on buffer head > state changes and not on the PG_locked page flag. I don't know if this is right or not... lets discuss this later. Thanks! Oleg.