shithub: lwext4

Download patch

ref: c0f2dfea726520930b364a3a805d662ef5b4ebd8
parent: c6448a39371cb3d42b5ffb9d0f0a35648278506c
author: gkostka <kostka.grzegorz@gmail.com>
date: Wed Dec 30 04:43:27 EST 2015

lwext4_server: add journaling to filesystem test suite

--- a/fs_test/lwext4_server.c
+++ b/fs_test/lwext4_server.c
@@ -412,6 +412,17 @@
 	}
 
 	rc = ext4_mount(dev_name, mount_point);
+	if (rc != EOK)
+		return rc;
+
+	rc = ext4_recover(mount_point);
+	if (rc != EOK && rc != ENOTSUP)
+		return rc;
+
+	rc = ext4_journal_start(mount_point);
+	if (rc != EOK)
+		return rc;
+
 	if (cache_wb)
 		ext4_cache_write_back(mount_point, 1);
 	return rc;
@@ -420,6 +431,7 @@
 int _umount(char *p)
 {
 	char mount_point[32];
+	int rc;
 
 	if (sscanf(p, "%s", mount_point) != 1) {
 		printf("Param list error\n");
@@ -429,7 +441,15 @@
 	if (cache_wb)
 		ext4_cache_write_back(mount_point, 0);
 
-	return ext4_umount(mount_point);
+	rc = ext4_journal_stop(mount_point);
+	if (rc != EOK)
+		return rc;
+
+	rc = ext4_umount(mount_point);
+	if (rc != EOK)
+		return rc;
+
+	return rc;
 }
 
 int _mount_point_stats(char *p)