static int ll_writepages(struct address_space *mapping,
struct writeback_control *wbc)
{
- struct timeval tstart, now;
+ struct ll_sb_info *sbi = ll_s2sbi(mapping->host->i_sb);
int rc;
+ struct timeval tstart, now;
do_gettimeofday(&tstart);
rc = generic_writepages(mapping, wbc);
- if (rc == 0 && wbc->sync_mode == WB_SYNC_ALL) {
+ /* this synchronization (even being implemented via Writeback)
+ * makes recovery much more sad, because iget() can get stuck
+ * on I_LOCK the kernel helds over ->writepages() -bzzz */
+ if (rc == 0 && wbc->sync_mode == WB_SYNC_ALL
+ && sbi->ll_flags & LL_SBI_UMOUNT) {
/* as we don't use Writeback bit to track pages
* under I/O, filemap_fdatawait() doesn't work
* for us. let's wait for I/O completion here */
wait_event(lli->lli_dirty_wait,
ll_is_inode_dirty(mapping->host) == 0);
do_gettimeofday(&now);
- if (now.tv_sec - tstart.tv_sec > obd_timeout) {
+ if (now.tv_sec - tstart.tv_sec > obd_timeout * 6) {
CDEBUG(D_ERROR, "synching inode 0x%p "DLID4" took %ds\n",
mapping->host, OLID4(&lli->lli_id),
(int) (now.tv_sec - tstart.tv_sec));