Skip to contentSkip to conversation

OCFS2 support

PATCH Mark Fasheh 2 participants 6 messages Nov 3, 2005 – Nov 4, 2005 VFS

lore
Share & tools
lore
#0 lore raw

Hi,
Attached is a diff which adds OCFS2 support for GRUB 2. I used the
Ext2 and XFS drivers as templates while developing the OCFS2 code. Also, I used the 2005-09-28 patch by Marco Gerards (which added XFS support) as a template for my build system changes.

Things have been tested mostly using grub-emu - this should be able to read any OCFS2 inode, including those which have a b-tree. It's also been tested under multiple block / cluster size combinations. Typically I 'cat' a few large files, 'cmp' some others and follow a few symlinks to verify that everything is working.

I've tried to test an actual kernel boot but I get an error telling me that the kernel is too large (it's typically about 1.4 megs). Trying to boot an identical kernel file under ext2 gives me the same message. So I don't think that's an OCFS2 problem. Any help with that would be appreciated. Otherwise, even from boot I can still ls, cat, cmp, etc my OCFS2 file systems just fine.

Comments are appreciated :)

	--Mark

--
Mark Fasheh
Senior Software Developer, Oracle
[email protected]

ChangeLog renamed from tmp/grub2/ChangeLog +29 -0
diff -uprN --exclude='*~' --exclude=CVS --exclude=configure ../tmp/grub2/ChangeLog ./ChangeLog
@@ -1,3 +1,32 @@
+2005-11-03  Mark Fasheh  <[email protected]>
+
+	Adds support for the OCFS2 filesystem.
+
+	* fs/ocfs2.c: New file.
+
+	* DISTLIST: Added `fs/ocfs2.c'.
+
+	* conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/ocfs2.c'.
+	(grub_probefs_SOURCES): Likewise.
+	(grub_emu_SOURCES): Likewise.
+	(pkgdata_MODULES): Add `ocfs2.mod'.
+	(ocfs2_mod_SOURCES): New variable.
+	(ocfs2_mod_CFLAGS): Likewise.
+
+	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/ocfs2.c'.
+	(pkgdata_MODULES): Add `ocfs2.mod'.
+	(ocfs2_mod_SOURCES): New variable.
+	(ocfs2_mod_CFLAGS): Likewise.
+
+	* util/grub-emu.c (main): Call `grub_ocfs2_init' and
+	`grub_ocfs2_fini'.
+
+	* include/grub/fs.h (grub_ocfs2_init): New prototype.
+	(grub_ocfs2_fini): Likewise.
+
+	* util/i386/pc/grub-probefs.c Call grub_ocfs2_init and
+	grub_ocfs2_fini.
+
 2005-10-28  Yoshinori K. Okuji  <[email protected]>
 
 	From Timothy Baldwin:
conf/i386-pc.mk renamed from tmp/grub2/conf/i386-pc.mk +88 -13

158 lines not on this page · raw message

conf/i386-pc.rmk renamed from tmp/grub2/conf/i386-pc.rmk +9 -4
diff -uprN --exclude='*~' --exclude=CVS --exclude=configure ../tmp/grub2/conf/i386-pc.rmk ./conf/i386-pc.rmk
@@ -64,7 +64,7 @@ grub_setup_SOURCES = util/i386/pc/grub-s
 	util/misc.c util/i386/pc/getroot.c kern/device.c kern/disk.c \
 	kern/err.c kern/misc.c fs/fat.c fs/ext2.c fs/xfs.c fs/affs.c  \
 	fs/sfs.c kern/parser.c kern/partition.c partmap/pc.c \
-	fs/ufs.c fs/minix.c fs/hfs.c fs/jfs.c kern/file.c kern/fs.c kern/env.c fs/fshelp.c
+	fs/ufs.c fs/minix.c fs/hfs.c fs/jfs.c fs/ocfs2.c kern/file.c kern/fs.c kern/env.c fs/fshelp.c
 
 # For grub-mkdevicemap.
 grub_mkdevicemap_SOURCES = util/i386/pc/grub-mkdevicemap.c util/misc.c
@@ -75,7 +75,7 @@ grub_probefs_SOURCES = util/i386/pc/grub
 	kern/device.c kern/disk.c kern/err.c kern/misc.c fs/fat.c	\
 	fs/ext2.c kern/parser.c kern/partition.c partmap/pc.c fs/ufs.c 	\
 	fs/minix.c fs/hfs.c fs/jfs.c kern/fs.c kern/env.c fs/fshelp.c 	\
-	fs/xfs.c fs/affs.c fs/sfs.c
+	fs/xfs.c fs/affs.c fs/sfs.c fs/ocfs2.c
 
 # For grub-emu.
 grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c 	\
@@ -85,7 +85,7 @@ grub_emu_SOURCES = commands/boot.c comma
 	commands/i386/pc/halt.c commands/i386/pc/reboot.c		\
 	disk/loopback.c							\
 	fs/affs.c fs/ext2.c fs/fat.c fs/fshelp.c fs/hfs.c fs/iso9660.c	\
-	fs/jfs.c fs/minix.c fs/sfs.c fs/ufs.c fs/xfs.c			\
+	fs/jfs.c fs/minix.c fs/sfs.c fs/ufs.c fs/xfs.c fs/ocfs2.c	\
 	io/gzio.c							\
 	kern/device.c kern/disk.c kern/dl.c kern/env.c kern/err.c 	\
 	kern/file.c kern/fs.c kern/loader.c kern/main.c kern/misc.c	\
@@ -117,7 +117,7 @@ pkgdata_MODULES = _chain.mod _linux.mod 
 	apple.mod pc.mod sun.mod loopback.mod reboot.mod halt.mod	\
 	help.mod default.mod timeout.mod configfile.mod vbe.mod		\
 	vesafb.mod vbetest.mod vbeinfo.mod search.mod gzio.mod		\
-	terminfo.mod serial.mod xfs.mod affs.mod sfs.mod
+	terminfo.mod serial.mod xfs.mod affs.mod sfs.mod ocfs2.mod
 
 # For _chain.mod.
 _chain_mod_SOURCES = loader/i386/pc/chainloader.c
@@ -184,6 +184,11 @@ sfs_mod_SOURCES = fs/sfs.c
 sfs_mod_CFLAGS = $(COMMON_CFLAGS)
 sfs_mod_LDFLAGS = $(COMMON_LDFLAGS)
 
+# For ocfs2.mod.
+ocfs2_mod_SOURCES = fs/ocfs2.c
+ocfs2_mod_CFLAGS = $(COMMON_CFLAGS)
+ocfs2_mod_LDFLAGS = $(COMMON_LDFLAGS)
+
 # For _linux.mod.
 _linux_mod_SOURCES = loader/i386/pc/linux.c
 _linux_mod_CFLAGS = $(COMMON_CFLAGS)
conf/powerpc-ieee1275.mk renamed from tmp/grub2/conf/powerpc-ieee1275.mk +63 -5

99 lines not on this page · raw message

conf/powerpc-ieee1275.rmk renamed from tmp/grub2/conf/powerpc-ieee1275.rmk +6 -2
diff -uprN --exclude='*~' --exclude=CVS --exclude=configure ../tmp/grub2/conf/powerpc-ieee1275.rmk ./conf/powerpc-ieee1275.rmk
@@ -41,7 +41,7 @@ grub_emu_SOURCES = commands/boot.c comma
 	commands/ieee1275/halt.c commands/ieee1275/reboot.c		\
 	disk/loopback.c							\
 	fs/affs.c fs/ext2.c fs/fat.c fs/fshelp.c fs/hfs.c fs/iso9660.c	\
-	fs/jfs.c fs/minix.c fs/sfs.c fs/ufs.c fs/xfs.c			\
+	fs/jfs.c fs/minix.c fs/sfs.c fs/ufs.c fs/xfs.c fs.ocfs2.c	\
 	io/gzio.c							\
 	kern/device.c kern/disk.c kern/dl.c kern/env.c kern/err.c 	\
 	kern/file.c kern/fs.c kern/loader.c kern/main.c kern/misc.c	\
@@ -84,7 +84,7 @@ pkgdata_MODULES = _linux.mod linux.mod f
 	boot.mod cmp.mod cat.mod terminal.mod fshelp.mod amiga.mod apple.mod \
 	pc.mod suspend.mod loopback.mod help.mod reboot.mod halt.mod sun.mod \
 	default.mod timeout.mod configfile.mod search.mod gzio.mod xfs.mod \
-	affs.mod sfs.mod
+	affs.mod sfs.mod ocfs2.mod
 
 # For fshelp.mod.
 fshelp_mod_SOURCES = fs/fshelp.c
@@ -130,6 +130,10 @@ affs_mod_CFLAGS = $(COMMON_CFLAGS)
 sfs_mod_SOURCES = fs/sfs.c
 sfs_mod_CFLAGS = $(COMMON_CFLAGS)
 
+# For ocfs2.mod.
+ocfs2_mod_SOURCES = fs/ocfs2.c
+ocfs2_mod_CFLAGS = $(COMMON_CFLAGS)
+
 # For _linux.mod.
 _linux_mod_SOURCES = loader/powerpc/ieee1275/linux.c
 _linux_mod_CFLAGS = $(COMMON_CFLAGS)
DISTLIST renamed from tmp/grub2/DISTLIST +1 -0
diff -uprN --exclude='*~' --exclude=CVS --exclude=configure ../tmp/grub2/DISTLIST ./DISTLIST
@@ -66,6 +66,7 @@ fs/minix.c
 fs/ufs.c
 fs/sfs.c
 fs/xfs.c
+fs/ocfs2.c
 hello/hello.c
 include/grub/arg.h
 include/grub/boot.h
fs/ocfs2.c renamed from tmp/grub2/fs/ocfs2.c +692 -0

692 lines not on this page · raw message

include/grub/fs.h renamed from tmp/grub2/include/grub/fs.h +2 -0
diff -uprN --exclude='*~' --exclude=CVS --exclude=configure ../tmp/grub2/include/grub/fs.h ./include/grub/fs.h
@@ -91,6 +91,8 @@ void grub_affs_init (void);
 void grub_affs_fini (void);
 void grub_sfs_init (void);
 void grub_sfs_fini (void);
+void grub_ocfs2_init (void);
+void grub_ocfs2_fini (void);
 void grub_iso9660_init (void);
 #endif /* GRUB_UTIL */
 
util/grub-emu.c renamed from tmp/grub2/util/grub-emu.c +2 -0
diff -uprN --exclude='*~' --exclude=CVS --exclude=configure ../tmp/grub2/util/grub-emu.c ./util/grub-emu.c
@@ -206,6 +206,7 @@ main (int argc, char *argv[])
   grub_xfs_init ();
   grub_sfs_init ();
   grub_affs_init ();
+  grub_ocfs2_init ();
   grub_ls_init ();
   grub_boot_init ();
   grub_cmp_init ();
@@ -237,6 +238,7 @@ main (int argc, char *argv[])
   grub_loop_fini ();
   grub_util_biosdisk_fini ();
   grub_normal_fini ();
+  grub_ocfs2_fini ();
   grub_affs_fini ();
   grub_sfs_fini ();
   grub_xfs_fini ();
util/i386/pc/grub-probefs.c renamed from tmp/grub2/util/i386/pc/grub-probefs.c +2 -0
diff -uprN --exclude='*~' --exclude=CVS --exclude=configure ../tmp/grub2/util/i386/pc/grub-probefs.c ./util/i386/pc/grub-probefs.c
@@ -188,6 +188,7 @@ main (int argc, char *argv[])
   grub_minix_init ();
   grub_jfs_init ();
   grub_xfs_init ();
+  grub_ocfs2_init ();
 
   /* Do it.  */
   probe (path);
@@ -199,6 +200,7 @@ main (int argc, char *argv[])
   grub_minix_fini ();
   grub_jfs_fini ();
   grub_xfs_fini ();
+  grub_ocfs2_fini ();
   
   grub_pc_partition_map_fini ();
   grub_util_biosdisk_fini ();
#1 lore raw

Mark Fasheh <[email protected]> writes:

Hi Mark,

Quoted 4 lines

Attached is a diff which adds OCFS2 support for GRUB 2. I used the
Ext2 and XFS drivers as templates while developing the OCFS2 code. Also, I used the 2005-09-28 patch by Marco Gerards (which added XFS support) as a template for my build system changes.

Cool! Thanks a lot for your work.

For GRUB 2 we use the GCS coding style:
http://www.gnu.org/prep/standards/

A consistent coding style is quite important for us. Would it be a problem for you to have a look at the GCS and make the required changes to your code? If you need any help, pointers, etc. I am more than willing to help.

A more important issue is the copyright. For GRUB 2 all copyrights are assigned to the FSF. Would it be possible to do this for your code as well? I assume it would mean Oracle has to agree with this. If you have any questions about this, feel free to contact me.

Thanks,
Marco

#2 lore raw

Hi,

Quoted 4 lines · Marco Gerards

A consistent coding style is quite important for us. Would it be a problem for you to have a look at the GCS and make the required changes to your code? If you need any help, pointers, etc. I am more than willing to help.

Yeah no problem at all. If you don't mind, it'd help alot if you could point out the problems - I thought I was being very thorough but clearly I was wrong :)

Basically with respect to coding style I copied what I saw in ext2.c / xfs.c. Also, I set the emacs c-style to 'gnu'.

Maybe there's a .indent file or something I could run it through?

Quoted 3 lines

A more important issue is the copyright. For GRUB 2 all copyrights are assigned to the FSF. Would it be possible to do this for your code as well? I assume it would mean Oracle has to agree with this.

I suspect this will be ok - my boss is contacting our legal department to make sure.

	--Mark

--
Mark Fasheh
Senior Software Developer, Oracle
[email protected]

#3 lore raw
Quoted 6 lines · Mark Fasheh

Hi,

Quoted 4 lines · Marco Gerards

A consistent coding style is quite important for us. Would it be a problem for you to have a look at the GCS and make the required changes to your code? If you need any help, pointers, etc. I am more than willing to help.

Quoted 8 lines

Yeah no problem at all. If you don't mind, it'd help alot if you could point out the problems - I thought I was being very thorough but clearly I was wrong :)

Basically with respect to coding style I copied what I saw in ext2.c / xfs.c. Also, I set the emacs c-style to 'gnu'.

Maybe there's a .indent file or something I could run it through?

I think GNU indent defaults to the GCS. The GCS is a bit more than just indentation, for example it also says stuff about naming variables, the maximum line lengths, how comments are formatted, etc.

Quoted 5 lines
Quoted 3 lines

A more important issue is the copyright. For GRUB 2 all copyrights are assigned to the FSF. Would it be possible to do this for your code as well? I assume it would mean Oracle has to agree with this.

I suspect this will be ok - my boss is contacting our legal department to make sure.

Cool.

--
Marco

#4 lore raw
Quoted 3 lines · Marco Gerards

I think GNU indent defaults to the GCS. The GCS is a bit more than just indentation, for example it also says stuff about naming variables, the maximum line lengths, how comments are formatted, etc.

Ok. Attached is an updated patch. I read through what seemed like the most appropriate parts of GCS and I took another look at the other code in fs/*.c. A list of what I changed is below. If there's still anything wrong, I'd really appreciate some more direct pointers :)

* Remove extra whitespace between structure member declarations and their type

* Insert some formfeed characters to indicate logical divisions within the code

* Split lines before the operator, not after it

* Put two newlines between functions (copied from xfs.c)

* Put two spaces after the end of a sentence comment blocks

* Reformat a couple of comments. I'm not sure about the comment above the declaration of OCFS2_SUPER_BLOCK_BLKNO so I left it alone.

* Remove the member variable prefixes on structure declarations - this is more in line with the rest of the grub fs/*.c code.

* Prefix some of the macro functions with "GRUB"

* Change variable declaration style in functions to be consistent

* Break up some lines so they don't wrap at 80 columns any more

	--Mark

--
Mark Fasheh
Senior Software Developer, Oracle
[email protected]

ChangeLog renamed from tmp/grub2/ChangeLog +29 -0
diff -uprN --exclude='*~' --exclude=CVS --exclude=configure ../tmp/grub2/ChangeLog ./ChangeLog
@@ -1,3 +1,32 @@
+2005-11-03  Mark Fasheh  <[email protected]>
+
+	Adds support for the OCFS2 filesystem.
+
+	* fs/ocfs2.c: New file.
+
+	* DISTLIST: Added `fs/ocfs2.c'.
+
+	* conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/ocfs2.c'.
+	(grub_probefs_SOURCES): Likewise.
+	(grub_emu_SOURCES): Likewise.
+	(pkgdata_MODULES): Add `ocfs2.mod'.
+	(ocfs2_mod_SOURCES): New variable.
+	(ocfs2_mod_CFLAGS): Likewise.
+
+	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/ocfs2.c'.
+	(pkgdata_MODULES): Add `ocfs2.mod'.
+	(ocfs2_mod_SOURCES): New variable.
+	(ocfs2_mod_CFLAGS): Likewise.
+
+	* util/grub-emu.c (main): Call `grub_ocfs2_init' and
+	`grub_ocfs2_fini'.
+
+	* include/grub/fs.h (grub_ocfs2_init): New prototype.
+	(grub_ocfs2_fini): Likewise.
+
+	* util/i386/pc/grub-probefs.c Call grub_ocfs2_init and
+	grub_ocfs2_fini.
+
 2005-10-28  Yoshinori K. Okuji  <[email protected]>
 
 	From Timothy Baldwin:
conf/i386-pc.mk renamed from tmp/grub2/conf/i386-pc.mk +88 -13

158 lines not on this page · raw message

conf/i386-pc.rmk renamed from tmp/grub2/conf/i386-pc.rmk +9 -4
diff -uprN --exclude='*~' --exclude=CVS --exclude=configure ../tmp/grub2/conf/i386-pc.rmk ./conf/i386-pc.rmk
@@ -64,7 +64,7 @@ grub_setup_SOURCES = util/i386/pc/grub-s
 	util/misc.c util/i386/pc/getroot.c kern/device.c kern/disk.c \
 	kern/err.c kern/misc.c fs/fat.c fs/ext2.c fs/xfs.c fs/affs.c  \
 	fs/sfs.c kern/parser.c kern/partition.c partmap/pc.c \
-	fs/ufs.c fs/minix.c fs/hfs.c fs/jfs.c kern/file.c kern/fs.c kern/env.c fs/fshelp.c
+	fs/ufs.c fs/minix.c fs/hfs.c fs/jfs.c fs/ocfs2.c kern/file.c kern/fs.c kern/env.c fs/fshelp.c
 
 # For grub-mkdevicemap.
 grub_mkdevicemap_SOURCES = util/i386/pc/grub-mkdevicemap.c util/misc.c
@@ -75,7 +75,7 @@ grub_probefs_SOURCES = util/i386/pc/grub
 	kern/device.c kern/disk.c kern/err.c kern/misc.c fs/fat.c	\
 	fs/ext2.c kern/parser.c kern/partition.c partmap/pc.c fs/ufs.c 	\
 	fs/minix.c fs/hfs.c fs/jfs.c kern/fs.c kern/env.c fs/fshelp.c 	\
-	fs/xfs.c fs/affs.c fs/sfs.c
+	fs/xfs.c fs/affs.c fs/sfs.c fs/ocfs2.c
 
 # For grub-emu.
 grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c 	\
@@ -85,7 +85,7 @@ grub_emu_SOURCES = commands/boot.c comma
 	commands/i386/pc/halt.c commands/i386/pc/reboot.c		\
 	disk/loopback.c							\
 	fs/affs.c fs/ext2.c fs/fat.c fs/fshelp.c fs/hfs.c fs/iso9660.c	\
-	fs/jfs.c fs/minix.c fs/sfs.c fs/ufs.c fs/xfs.c			\
+	fs/jfs.c fs/minix.c fs/sfs.c fs/ufs.c fs/xfs.c fs/ocfs2.c	\
 	io/gzio.c							\
 	kern/device.c kern/disk.c kern/dl.c kern/env.c kern/err.c 	\
 	kern/file.c kern/fs.c kern/loader.c kern/main.c kern/misc.c	\
@@ -117,7 +117,7 @@ pkgdata_MODULES = _chain.mod _linux.mod 
 	apple.mod pc.mod sun.mod loopback.mod reboot.mod halt.mod	\
 	help.mod default.mod timeout.mod configfile.mod vbe.mod		\
 	vesafb.mod vbetest.mod vbeinfo.mod search.mod gzio.mod		\
-	terminfo.mod serial.mod xfs.mod affs.mod sfs.mod
+	terminfo.mod serial.mod xfs.mod affs.mod sfs.mod ocfs2.mod
 
 # For _chain.mod.
 _chain_mod_SOURCES = loader/i386/pc/chainloader.c
@@ -184,6 +184,11 @@ sfs_mod_SOURCES = fs/sfs.c
 sfs_mod_CFLAGS = $(COMMON_CFLAGS)
 sfs_mod_LDFLAGS = $(COMMON_LDFLAGS)
 
+# For ocfs2.mod.
+ocfs2_mod_SOURCES = fs/ocfs2.c
+ocfs2_mod_CFLAGS = $(COMMON_CFLAGS)
+ocfs2_mod_LDFLAGS = $(COMMON_LDFLAGS)
+
 # For _linux.mod.
 _linux_mod_SOURCES = loader/i386/pc/linux.c
 _linux_mod_CFLAGS = $(COMMON_CFLAGS)
conf/powerpc-ieee1275.mk renamed from tmp/grub2/conf/powerpc-ieee1275.mk +63 -5

99 lines not on this page · raw message

conf/powerpc-ieee1275.rmk renamed from tmp/grub2/conf/powerpc-ieee1275.rmk +6 -2
diff -uprN --exclude='*~' --exclude=CVS --exclude=configure ../tmp/grub2/conf/powerpc-ieee1275.rmk ./conf/powerpc-ieee1275.rmk
@@ -41,7 +41,7 @@ grub_emu_SOURCES = commands/boot.c comma
 	commands/ieee1275/halt.c commands/ieee1275/reboot.c		\
 	disk/loopback.c							\
 	fs/affs.c fs/ext2.c fs/fat.c fs/fshelp.c fs/hfs.c fs/iso9660.c	\
-	fs/jfs.c fs/minix.c fs/sfs.c fs/ufs.c fs/xfs.c			\
+	fs/jfs.c fs/minix.c fs/sfs.c fs/ufs.c fs/xfs.c fs.ocfs2.c	\
 	io/gzio.c							\
 	kern/device.c kern/disk.c kern/dl.c kern/env.c kern/err.c 	\
 	kern/file.c kern/fs.c kern/loader.c kern/main.c kern/misc.c	\
@@ -84,7 +84,7 @@ pkgdata_MODULES = _linux.mod linux.mod f
 	boot.mod cmp.mod cat.mod terminal.mod fshelp.mod amiga.mod apple.mod \
 	pc.mod suspend.mod loopback.mod help.mod reboot.mod halt.mod sun.mod \
 	default.mod timeout.mod configfile.mod search.mod gzio.mod xfs.mod \
-	affs.mod sfs.mod
+	affs.mod sfs.mod ocfs2.mod
 
 # For fshelp.mod.
 fshelp_mod_SOURCES = fs/fshelp.c
@@ -130,6 +130,10 @@ affs_mod_CFLAGS = $(COMMON_CFLAGS)
 sfs_mod_SOURCES = fs/sfs.c
 sfs_mod_CFLAGS = $(COMMON_CFLAGS)
 
+# For ocfs2.mod.
+ocfs2_mod_SOURCES = fs/ocfs2.c
+ocfs2_mod_CFLAGS = $(COMMON_CFLAGS)
+
 # For _linux.mod.
 _linux_mod_SOURCES = loader/powerpc/ieee1275/linux.c
 _linux_mod_CFLAGS = $(COMMON_CFLAGS)

Binary files ../tmp/grub2/core.img and ./core.img differ

DISTLIST renamed from tmp/grub2/DISTLIST +1 -0
diff -uprN --exclude='*~' --exclude=CVS --exclude=configure ../tmp/grub2/DISTLIST ./DISTLIST
@@ -66,6 +66,7 @@ fs/minix.c
 fs/ufs.c
 fs/sfs.c
 fs/xfs.c
+fs/ocfs2.c
 hello/hello.c
 include/grub/arg.h
 include/grub/boot.h
fs/gnu.ocfs2.c renamed from tmp/grub2/fs/gnu.ocfs2.c +661 -0

661 lines not on this page · raw message

fs/ocfs2.c renamed from tmp/grub2/fs/ocfs2.c +717 -0

717 lines not on this page · raw message

include/grub/fs.h renamed from tmp/grub2/include/grub/fs.h +2 -0
diff -uprN --exclude='*~' --exclude=CVS --exclude=configure ../tmp/grub2/include/grub/fs.h ./include/grub/fs.h
@@ -91,6 +91,8 @@ void grub_affs_init (void);
 void grub_affs_fini (void);
 void grub_sfs_init (void);
 void grub_sfs_fini (void);
+void grub_ocfs2_init (void);
+void grub_ocfs2_fini (void);
 void grub_iso9660_init (void);
 #endif /* GRUB_UTIL */
 
util/grub-emu.c renamed from tmp/grub2/util/grub-emu.c +2 -0
diff -uprN --exclude='*~' --exclude=CVS --exclude=configure ../tmp/grub2/util/grub-emu.c ./util/grub-emu.c
@@ -206,6 +206,7 @@ main (int argc, char *argv[])
   grub_xfs_init ();
   grub_sfs_init ();
   grub_affs_init ();
+  grub_ocfs2_init ();
   grub_ls_init ();
   grub_boot_init ();
   grub_cmp_init ();
@@ -237,6 +238,7 @@ main (int argc, char *argv[])
   grub_loop_fini ();
   grub_util_biosdisk_fini ();
   grub_normal_fini ();
+  grub_ocfs2_fini ();
   grub_affs_fini ();
   grub_sfs_fini ();
   grub_xfs_fini ();
util/i386/pc/grub-probefs.c renamed from tmp/grub2/util/i386/pc/grub-probefs.c +2 -0
diff -uprN --exclude='*~' --exclude=CVS --exclude=configure ../tmp/grub2/util/i386/pc/grub-probefs.c ./util/i386/pc/grub-probefs.c
@@ -188,6 +188,7 @@ main (int argc, char *argv[])
   grub_minix_init ();
   grub_jfs_init ();
   grub_xfs_init ();
+  grub_ocfs2_init ();
 
   /* Do it.  */
   probe (path);
@@ -199,6 +200,7 @@ main (int argc, char *argv[])
   grub_minix_fini ();
   grub_jfs_fini ();
   grub_xfs_fini ();
+  grub_ocfs2_fini ();
   
   grub_pc_partition_map_fini ();
   grub_util_biosdisk_fini ();
#5 lore raw
Quoted 1 line · Mark Fasheh

Ok. Attached is an updated patch.

Oops. That last patch was no good. A better one is attached. Sorry about that!

	--Mark

--
Mark Fasheh
Senior Software Developer, Oracle
[email protected]

ChangeLog renamed from tmp/grub2/ChangeLog +29 -0
diff -uprN --exclude='*~' --exclude=CVS --exclude=configure ../tmp/grub2/ChangeLog ./ChangeLog
@@ -1,3 +1,32 @@
+2005-11-03  Mark Fasheh  <[email protected]>
+
+	Adds support for the OCFS2 filesystem.
+
+	* fs/ocfs2.c: New file.
+
+	* DISTLIST: Added `fs/ocfs2.c'.
+
+	* conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/ocfs2.c'.
+	(grub_probefs_SOURCES): Likewise.
+	(grub_emu_SOURCES): Likewise.
+	(pkgdata_MODULES): Add `ocfs2.mod'.
+	(ocfs2_mod_SOURCES): New variable.
+	(ocfs2_mod_CFLAGS): Likewise.
+
+	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/ocfs2.c'.
+	(pkgdata_MODULES): Add `ocfs2.mod'.
+	(ocfs2_mod_SOURCES): New variable.
+	(ocfs2_mod_CFLAGS): Likewise.
+
+	* util/grub-emu.c (main): Call `grub_ocfs2_init' and
+	`grub_ocfs2_fini'.
+
+	* include/grub/fs.h (grub_ocfs2_init): New prototype.
+	(grub_ocfs2_fini): Likewise.
+
+	* util/i386/pc/grub-probefs.c Call grub_ocfs2_init and
+	grub_ocfs2_fini.
+
 2005-10-28  Yoshinori K. Okuji  <[email protected]>
 
 	From Timothy Baldwin:
conf/i386-pc.mk renamed from tmp/grub2/conf/i386-pc.mk +88 -13

158 lines not on this page · raw message

conf/i386-pc.rmk renamed from tmp/grub2/conf/i386-pc.rmk +9 -4
diff -uprN --exclude='*~' --exclude=CVS --exclude=configure ../tmp/grub2/conf/i386-pc.rmk ./conf/i386-pc.rmk
@@ -64,7 +64,7 @@ grub_setup_SOURCES = util/i386/pc/grub-s
 	util/misc.c util/i386/pc/getroot.c kern/device.c kern/disk.c \
 	kern/err.c kern/misc.c fs/fat.c fs/ext2.c fs/xfs.c fs/affs.c  \
 	fs/sfs.c kern/parser.c kern/partition.c partmap/pc.c \
-	fs/ufs.c fs/minix.c fs/hfs.c fs/jfs.c kern/file.c kern/fs.c kern/env.c fs/fshelp.c
+	fs/ufs.c fs/minix.c fs/hfs.c fs/jfs.c fs/ocfs2.c kern/file.c kern/fs.c kern/env.c fs/fshelp.c
 
 # For grub-mkdevicemap.
 grub_mkdevicemap_SOURCES = util/i386/pc/grub-mkdevicemap.c util/misc.c
@@ -75,7 +75,7 @@ grub_probefs_SOURCES = util/i386/pc/grub
 	kern/device.c kern/disk.c kern/err.c kern/misc.c fs/fat.c	\
 	fs/ext2.c kern/parser.c kern/partition.c partmap/pc.c fs/ufs.c 	\
 	fs/minix.c fs/hfs.c fs/jfs.c kern/fs.c kern/env.c fs/fshelp.c 	\
-	fs/xfs.c fs/affs.c fs/sfs.c
+	fs/xfs.c fs/affs.c fs/sfs.c fs/ocfs2.c
 
 # For grub-emu.
 grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c 	\
@@ -85,7 +85,7 @@ grub_emu_SOURCES = commands/boot.c comma
 	commands/i386/pc/halt.c commands/i386/pc/reboot.c		\
 	disk/loopback.c							\
 	fs/affs.c fs/ext2.c fs/fat.c fs/fshelp.c fs/hfs.c fs/iso9660.c	\
-	fs/jfs.c fs/minix.c fs/sfs.c fs/ufs.c fs/xfs.c			\
+	fs/jfs.c fs/minix.c fs/sfs.c fs/ufs.c fs/xfs.c fs/ocfs2.c	\
 	io/gzio.c							\
 	kern/device.c kern/disk.c kern/dl.c kern/env.c kern/err.c 	\
 	kern/file.c kern/fs.c kern/loader.c kern/main.c kern/misc.c	\
@@ -117,7 +117,7 @@ pkgdata_MODULES = _chain.mod _linux.mod 
 	apple.mod pc.mod sun.mod loopback.mod reboot.mod halt.mod	\
 	help.mod default.mod timeout.mod configfile.mod vbe.mod		\
 	vesafb.mod vbetest.mod vbeinfo.mod search.mod gzio.mod		\
-	terminfo.mod serial.mod xfs.mod affs.mod sfs.mod
+	terminfo.mod serial.mod xfs.mod affs.mod sfs.mod ocfs2.mod
 
 # For _chain.mod.
 _chain_mod_SOURCES = loader/i386/pc/chainloader.c
@@ -184,6 +184,11 @@ sfs_mod_SOURCES = fs/sfs.c
 sfs_mod_CFLAGS = $(COMMON_CFLAGS)
 sfs_mod_LDFLAGS = $(COMMON_LDFLAGS)
 
+# For ocfs2.mod.
+ocfs2_mod_SOURCES = fs/ocfs2.c
+ocfs2_mod_CFLAGS = $(COMMON_CFLAGS)
+ocfs2_mod_LDFLAGS = $(COMMON_LDFLAGS)
+
 # For _linux.mod.
 _linux_mod_SOURCES = loader/i386/pc/linux.c
 _linux_mod_CFLAGS = $(COMMON_CFLAGS)
conf/powerpc-ieee1275.mk renamed from tmp/grub2/conf/powerpc-ieee1275.mk +63 -5

99 lines not on this page · raw message

conf/powerpc-ieee1275.rmk renamed from tmp/grub2/conf/powerpc-ieee1275.rmk +6 -2
diff -uprN --exclude='*~' --exclude=CVS --exclude=configure ../tmp/grub2/conf/powerpc-ieee1275.rmk ./conf/powerpc-ieee1275.rmk
@@ -41,7 +41,7 @@ grub_emu_SOURCES = commands/boot.c comma
 	commands/ieee1275/halt.c commands/ieee1275/reboot.c		\
 	disk/loopback.c							\
 	fs/affs.c fs/ext2.c fs/fat.c fs/fshelp.c fs/hfs.c fs/iso9660.c	\
-	fs/jfs.c fs/minix.c fs/sfs.c fs/ufs.c fs/xfs.c			\
+	fs/jfs.c fs/minix.c fs/sfs.c fs/ufs.c fs/xfs.c fs.ocfs2.c	\
 	io/gzio.c							\
 	kern/device.c kern/disk.c kern/dl.c kern/env.c kern/err.c 	\
 	kern/file.c kern/fs.c kern/loader.c kern/main.c kern/misc.c	\
@@ -84,7 +84,7 @@ pkgdata_MODULES = _linux.mod linux.mod f
 	boot.mod cmp.mod cat.mod terminal.mod fshelp.mod amiga.mod apple.mod \
 	pc.mod suspend.mod loopback.mod help.mod reboot.mod halt.mod sun.mod \
 	default.mod timeout.mod configfile.mod search.mod gzio.mod xfs.mod \
-	affs.mod sfs.mod
+	affs.mod sfs.mod ocfs2.mod
 
 # For fshelp.mod.
 fshelp_mod_SOURCES = fs/fshelp.c
@@ -130,6 +130,10 @@ affs_mod_CFLAGS = $(COMMON_CFLAGS)
 sfs_mod_SOURCES = fs/sfs.c
 sfs_mod_CFLAGS = $(COMMON_CFLAGS)
 
+# For ocfs2.mod.
+ocfs2_mod_SOURCES = fs/ocfs2.c
+ocfs2_mod_CFLAGS = $(COMMON_CFLAGS)
+
 # For _linux.mod.
 _linux_mod_SOURCES = loader/powerpc/ieee1275/linux.c
 _linux_mod_CFLAGS = $(COMMON_CFLAGS)
DISTLIST renamed from tmp/grub2/DISTLIST +1 -0
diff -uprN --exclude='*~' --exclude=CVS --exclude=configure ../tmp/grub2/DISTLIST ./DISTLIST
@@ -66,6 +66,7 @@ fs/minix.c
 fs/ufs.c
 fs/sfs.c
 fs/xfs.c
+fs/ocfs2.c
 hello/hello.c
 include/grub/arg.h
 include/grub/boot.h
fs/ocfs2.c renamed from tmp/grub2/fs/ocfs2.c +717 -0

717 lines not on this page · raw message

include/grub/fs.h renamed from tmp/grub2/include/grub/fs.h +2 -0
diff -uprN --exclude='*~' --exclude=CVS --exclude=configure ../tmp/grub2/include/grub/fs.h ./include/grub/fs.h
@@ -91,6 +91,8 @@ void grub_affs_init (void);
 void grub_affs_fini (void);
 void grub_sfs_init (void);
 void grub_sfs_fini (void);
+void grub_ocfs2_init (void);
+void grub_ocfs2_fini (void);
 void grub_iso9660_init (void);
 #endif /* GRUB_UTIL */
 
util/grub-emu.c renamed from tmp/grub2/util/grub-emu.c +2 -0
diff -uprN --exclude='*~' --exclude=CVS --exclude=configure ../tmp/grub2/util/grub-emu.c ./util/grub-emu.c
@@ -206,6 +206,7 @@ main (int argc, char *argv[])
   grub_xfs_init ();
   grub_sfs_init ();
   grub_affs_init ();
+  grub_ocfs2_init ();
   grub_ls_init ();
   grub_boot_init ();
   grub_cmp_init ();
@@ -237,6 +238,7 @@ main (int argc, char *argv[])
   grub_loop_fini ();
   grub_util_biosdisk_fini ();
   grub_normal_fini ();
+  grub_ocfs2_fini ();
   grub_affs_fini ();
   grub_sfs_fini ();
   grub_xfs_fini ();
util/i386/pc/grub-probefs.c renamed from tmp/grub2/util/i386/pc/grub-probefs.c +2 -0
diff -uprN --exclude='*~' --exclude=CVS --exclude=configure ../tmp/grub2/util/i386/pc/grub-probefs.c ./util/i386/pc/grub-probefs.c
@@ -188,6 +188,7 @@ main (int argc, char *argv[])
   grub_minix_init ();
   grub_jfs_init ();
   grub_xfs_init ();
+  grub_ocfs2_init ();
 
   /* Do it.  */
   probe (path);
@@ -199,6 +200,7 @@ main (int argc, char *argv[])
   grub_minix_fini ();
   grub_jfs_fini ();
   grub_xfs_fini ();
+  grub_ocfs2_fini ();
   
   grub_pc_partition_map_fini ();
   grub_util_biosdisk_fini ();