Theodore Tso wrote:
On Thu, Jul 19, 2007 at 11:28:06PM +0530, Aneesh Kumar K.V wrote:
This patch fixes some bugs found during testing of the large
inode migration patches.
How are you testing it? I notice you haven't wired these into any of
the existing e2fsprogs programs.
Regards,
Attaching below is a simple test program i used to verify this. I also used
this along with the ext3 ext4 migration tool.
-aneesh
diff --git a/test.aneesh/test.c b/test.aneesh/test.c
new file mode 100644
index 0000000..7d0a3e3
--- /dev/null
+++ b/test.aneesh/test.c
@@ -0,0 +1,25 @@
+
+#include "ext2fs/ext2_fs.h"
+#include "ext2fs/ext2fs.h"
+
+main(int argc, char *argv[])
+{
+ char *dev_name, *file_name;
+ int flags, superblock = 0;
+ unsigned int block_size = 0;
+ ext2_filsys current_fs = NULL;
+
+ dev_name = argv[1];
+ file_name = argv[2];
+ flags = EXT2_FLAG_SOFTSUPP_FEATURES | EXT2_FLAG_RW;
+ set_undo_io_backing_manager(unix_io_manager);
+ set_undo_io_backup_file(file_name);
+ ext2fs_open2(dev_name, 0,
+ flags, superblock, block_size,
+ undo_io_manager, ¤t_fs);
+
+ /* Now write super block with junk */
+ memcpy(current_fs->super, "crash me", 8);
+ ext2fs_mark_super_dirty(current_fs);
+ ext2fs_close(current_fs);
+}
-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html