shithub: lwext4

Download patch

ref: cb10287db2a445ae90c5f432e158f141823d1cd9
parent: f92b4c68c201995176827593640c8104ed0feb0c
author: ngkaho1234 <ngkaho1234@gmail.com>
date: Thu Dec 17 16:21:23 EST 2015

ext4: enable write-back mode when undergoing journal test.

--- a/lwext4/ext4.c
+++ b/lwext4/ext4.c
@@ -2513,6 +2513,7 @@
 
 	int r = ENOTSUP;
 	EXT4_MP_LOCK(mp);
+	ext4_block_cache_write_back(mp->fs.bdev, 1);
 	if (ext4_sb_feature_com(&mp->fs.sb, EXT4_FCOM_HAS_JOURNAL)) {
 		struct jbd_fs *jbd_fs = calloc(1, sizeof(struct jbd_fs));
 		struct jbd_journal *journal;
@@ -2590,6 +2591,7 @@
 	}
 
 Finish:
+	ext4_block_cache_write_back(mp->fs.bdev, 0);
 	EXT4_MP_UNLOCK(mp);
 	return r;
 }