a new filessytem module for nilfs2
PATCH 1/1 a new filessytem module for nilfs2
Hi,
This is a patch to support nilfs2 filesystem.
I would like you to review the patch.
I've checked with revno 2153 and kvm(qemu) environment.
Also the patch has already an ability to boot the kernel from the nilfs partition, I have a following ToDo list to improve the module.
1. revision check for future disk layout changes
2. CRC check for superblock to ensure the partition is a nilfs2 partition
3. CRC check latest log block to ensure valid log
4. search the latest log in case unclean unmount happened
nilfs2 stands for New Implementation of Log Filesystem version2. nilfs2 has been merged into linux main line kernel since 2.6.30.
Please give me any comments or advice.
thank you very much in advance
Signature · 1 line
Jiro SEKIBA <[email protected]>
=== modified file 'conf/any-emu.rmk'
any-emu.rmk +1 -1
@@ -38,7 +38,7 @@ \ fs/affs.c fs/cpio.c fs/fat.c fs/ext2.c fs/hfs.c \ fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c \ - fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c \ + fs/nilfs2.c fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c \ fs/ufs.c fs/ufs2.c fs/xfs.c fs/afs.c fs/afs_be.c \ fs/befs.c fs/befs_be.c fs/tar.c \ \
=== modified file 'conf/common.rmk'
common.rmk +11 -6
@@ -28,9 +28,9 @@ \ fs/affs.c fs/cpio.c fs/fat.c fs/ext2.c fs/hfs.c \ fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c \ - fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c \ - fs/ufs.c fs/ufs2.c fs/xfs.c fs/afs.c fs/afs_be.c \ - fs/befs.c fs/befs_be.c fs/tar.c \ + fs/nilfs2.c fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c \ + fs/sfs.c fs/ufs.c fs/ufs2.c fs/xfs.c fs/afs.c \ + fs/afs_be.c fs/befs.c fs/befs_be.c fs/tar.c \ \ partmap/msdos.c partmap/apple.c partmap/sun.c partmap/gpt.c\ kern/fs.c kern/env.c fs/fshelp.c \
@@ -65,7 +65,7 @@ \ fs/affs.c fs/cpio.c fs/fat.c fs/ext2.c fs/hfs.c \ fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c \ - fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c \ + fs/nilfs2.c fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c \ fs/ufs.c fs/ufs2.c fs/xfs.c fs/afs.c fs/afs_be.c fs/befs.c \ fs/befs_be.c fs/tar.c \ \
@@ -224,8 +224,8 @@ CLEANFILES += grub-reboot # Filing systems. -pkglib_MODULES += fshelp.mod fat.mod ufs1.mod ufs2.mod ext2.mod ntfs.mod \ - ntfscomp.mod minix.mod hfs.mod jfs.mod iso9660.mod xfs.mod \ +pkglib_MODULES += fshelp.mod fat.mod ufs1.mod ufs2.mod ext2.mod nilfs2.mod \ + ntfs.mod ntfscomp.mod minix.mod hfs.mod jfs.mod iso9660.mod xfs.mod \ affs.mod sfs.mod hfsplus.mod reiserfs.mod cpio.mod tar.mod \ udf.mod afs.mod afs_be.mod befs.mod befs_be.mod
@@ -269,6 +269,11 @@ minix_mod_CFLAGS = $(COMMON_CFLAGS) minix_mod_LDFLAGS = $(COMMON_LDFLAGS) +# For nilfs2.mod. +nilfs2_mod_SOURCES = fs/nilfs2.c +nilfs2_mod_CFLAGS = $(COMMON_CFLAGS) +nilfs2_mod_LDFLAGS = $(COMMON_LDFLAGS) + # For hfs.mod. hfs_mod_SOURCES = fs/hfs.c hfs_mod_CFLAGS = $(COMMON_CFLAGS)
=== modified file 'conf/i386-pc.rmk'
i386-pc.rmk +3 -3
@@ -100,9 +100,9 @@ \ fs/affs.c fs/cpio.c fs/ext2.c fs/fat.c fs/hfs.c \ fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c \ - fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c \ - fs/ufs.c fs/ufs2.c fs/xfs.c fs/afs.c fs/afs_be.c \ - fs/befs.c fs/befs_be.c fs/tar.c \ + fs/nilfs2.c fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c \ + fs/sfs.c fs/ufs.c fs/ufs2.c fs/xfs.c fs/afs.c \ + fs/afs_be.c fs/befs.c fs/befs_be.c fs/tar.c \ \ partmap/msdos.c partmap/gpt.c \ \
=== modified file 'conf/sparc64-ieee1275.rmk'
sparc64-ieee1275.rmk +3 -3
@@ -74,9 +74,9 @@ \ fs/affs.c fs/cpio.c fs/ext2.c fs/fat.c fs/hfs.c \ fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c \ - fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c \ - fs/ufs.c fs/ufs2.c fs/xfs.c fs/afs.c fs/afs_be.c \ - fs/befs.c fs/befs_be.c fs/tar.c \ + fs/nilfs2.c fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c \ + fs/sfs.c fs/ufs.c fs/ufs2.c fs/xfs.c fs/afs.c \ + fs/afs_be.c fs/befs.c fs/befs_be.c fs/tar.c \ \ partmap/amiga.c partmap/apple.c partmap/msdos.c \ partmap/sun.c partmap/acorn.c \
=== added file 'fs/nilfs2.c'
nilfs2.c +1115 -0
1,115 lines not on this page · raw message
Hello
Quoted 10 lines · Jiro SEKIBA
Hi,
This is a patch to support nilfs2 filesystem.
I would like you to review the patch.I've checked with revno 2153 and kvm(qemu) environment.
Also the patch has already an ability to boot the kernel from the nilfs partition, I have a following ToDo list to improve the module.
Is your code written from scratch or is it based on some other code? If later can you tell exactly which so we can verify license compatibility?
Quoted 23 lines
1. revision check for future disk layout changes
2. CRC check for superblock to ensure the partition is a nilfs2 partition
3. CRC check latest log block to ensure valid log
4. search the latest log in case unclean unmount happenednilfs2 stands for New Implementation of Log Filesystem version2. nilfs2 has been merged into linux main line kernel since 2.6.30.
Please give me any comments or advice.
thank you very much in advance
------------------------------------------------------------------------
------------------------------------------------------------------------
_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
Signature · 2 lines
Regards Vladimir 'φ-coder/phcoder' Serbinenko
Hi,
At Fri, 05 Feb 2010 17:36:43 +0100,
Quoted 8 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Hello
Quoted 5 lines · Jiro SEKIBA
Hi,
This is a patch to support nilfs2 filesystem.
I would like you to review the patch.
Quoted 7 lines
Quoted 5 lines
I've checked with revno 2153 and kvm(qemu) environment.
Also the patch has already an ability to boot the kernel from the nilfs partition, I have a following ToDo list to improve the module.
Is your code written from scratch or is it based on some other code? If later can you tell exactly which so we can verify license compatibility?
Thank you for the attention. That is very important issue, sorry that I didn't describe it explicitly.
The code is based on fs/ext2.c in grub-1.97.1 release. I reused the file/directory iteration code from it.
Other nilfs2 specific code is writte by me from scratch. I referred the original implementation, but have never borrowed any code from it.
So I'm thinking the license would be gpl3, for it is derived from gpl3(fs/ext2.c) code.
thanks,
regards,
Quoted 30 lines
Quoted 23 lines
1. revision check for future disk layout changes
2. CRC check for superblock to ensure the partition is a nilfs2 partition
3. CRC check latest log block to ensure valid log
4. search the latest log in case unclean unmount happenednilfs2 stands for New Implementation of Log Filesystem version2. nilfs2 has been merged into linux main line kernel since 2.6.30.
Please give me any comments or advice.
thank you very much in advance
------------------------------------------------------------------------
------------------------------------------------------------------------
_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-develSignature · 2 lines
Regards Vladimir 'φ-coder/phcoder' Serbinenko
Signature · 1 line
Jiro SEKIBA <[email protected]>
Quoted 15 lines · Jiro SEKIBA
Hi,
This is a patch to support nilfs2 filesystem.
I would like you to review the patch.I've checked with revno 2153 and kvm(qemu) environment.
Also the patch has already an ability to boot the kernel from the nilfs partition, I have a following ToDo list to improve the module.
1. revision check for future disk layout changes
2. CRC check for superblock to ensure the partition is a nilfs2 partition
3. CRC check latest log block to ensure valid log
4. search the latest log in case unclean unmount happened
Quoted 7 lines
nilfs2 stands for New Implementation of Log Filesystem version2. nilfs2 has been merged into linux main line kernel since 2.6.30.
Please give me any comments or advice.
thank you very much in advance
+pkglib_MODULES += fshelp.mod fat.mod ufs1.mod ufs2.mod ext2.mod nilfs2.mod \
+ ntfs.mod ntfscomp.mod minix.mod hfs.mod jfs.mod iso9660.mod
xfs.mod \
For new modules we prefer to add pkglib_MODULES+= directly before the module itself
+/* ext2.c - Second Extended filesystem */
+/*
Leftover
+#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
This can go into misc.hiterate_dir:
+ /* Search the file. */
+ while (fpos < grub_le_to_cpu64 (diro->inode.i_size))
+ {
Another leftover
I'm no nilfs2 expert but assuming that it works it's a good patch. Have you tested it on big-endian system? If no nd you have no access to such send me testing instructions, I have a powerpc machine (or one can use qemu).
Nice job
Quoted 11 lines
------------------------------------------------------------------------
------------------------------------------------------------------------
_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
Signature · 2 lines
Regards Vladimir 'φ-coder/phcoder' Serbinenko
Hi,
At Wed, 10 Feb 2010 01:31:35 +0100,
Quoted 41 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 15 lines · Jiro SEKIBA
Hi,
This is a patch to support nilfs2 filesystem.
I would like you to review the patch.I've checked with revno 2153 and kvm(qemu) environment.
Also the patch has already an ability to boot the kernel from the nilfs partition, I have a following ToDo list to improve the module.
1. revision check for future disk layout changes
2. CRC check for superblock to ensure the partition is a nilfs2 partition
3. CRC check latest log block to ensure valid log
4. search the latest log in case unclean unmount happenedQuoted 7 lines
nilfs2 stands for New Implementation of Log Filesystem version2. nilfs2 has been merged into linux main line kernel since 2.6.30.
Please give me any comments or advice.
thank you very much in advance
+pkglib_MODULES += fshelp.mod fat.mod ufs1.mod ufs2.mod ext2.mod nilfs2.mod \
+ ntfs.mod ntfscomp.mod minix.mod hfs.mod jfs.mod iso9660.mod
xfs.mod \For new modules we prefer to add pkglib_MODULES+= directly before the module itself
nilfs2.c +2
-0+/* ext2.c - Second Extended filesystem */ +/* Leftover
+#defineDIV_ROUND_UP(n,d)(((n) + (d) - 1) / (d)) This can go intomisc.hiterate_dir:nilfs2.c +3
-0+/* Search the file. */ +while (fpos <grub_le_to_cpu64 (diro->inode.i_size)) + {
Quoted 6 lines
Another leftover
I'm no nilfs2 expert but assuming that it works it's a good patch. Have you tested it on big-endian system? If no nd you have no access to such send me testing instructions, I have a powerpc machine (or one can use qemu).
Nice job
Thank you very much for the reviews and comments!
I'll revise the patch.
Also, I'll try the patch on qemu to check for big-endian system.
Thank you very much again!
regards,
Quoted 18 lines
Quoted 11 lines
------------------------------------------------------------------------
------------------------------------------------------------------------
_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-develSignature · 2 lines
Regards Vladimir 'φ-coder/phcoder' Serbinenko
Signature · 1 line
Jiro SEKIBA <[email protected]>