/* generic */
#define LL_SBI_NOLCK 0x1
#define LL_SBI_READAHEAD 0x2
+#define LL_SBI_UMOUNT 0x4
#define LL_SUPER_MAGIC 0x0BD00BD0
#define LL_MAX_BLKSIZE (4UL * 1024 * 1024)
static int ll_writepages(struct address_space *mapping,
struct writeback_control *wbc)
{
+ struct ll_sb_info *sbi = ll_s2sbi(mapping->host->i_sb);
int rc;
-#if 0
struct timeval tstart, now;
do_gettimeofday(&tstart);
-#endif
rc = generic_writepages(mapping, wbc);
-#if 0
/* this syncronization (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) {
+ 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 */
portals_debug_dumplog();
}
}
-#endif
return rc;
}
static void ll_umount_lustre(struct super_block *sb)
{
struct ll_sb_info *sbi = ll_s2sbi(sb);
+ LASSERT((sbi->ll_flags & LL_SBI_UMOUNT) == 0);
+ sbi->ll_flags |= LL_SBI_UMOUNT;
ll_gns_check_mounts(sbi, LL_GNS_UMOUNT);
}