Re: [patch 0/2] grub-0.97: btrfs support

Johannes Hirte
2009-12-11T00:04:34Z

Am Freitag 11 Dezember 2009 00:15:46 schrieb Johannes Hirte:
> Am Freitag 25 September 2009 00:06:23 schrieb Edward Shishkin:
> > Hello everyone.
>
> ...
>
> > The following patches are for Fedora 10(**).
> > The distro-independent package will be put to kernel.org a bit later.
> >
> >
> > All comments, bugreports, etc. are welcome as usual.
>
> Ok, I have another comment/bugreport *g*.
>
> I'm testing this patch with gentoo, so the grub sources are not identicaly
> the same. With this patches applied, grub is unable to detect JFS or XFS
> filesystems. XFS is reported as unknown, JFS is reported as btrfs.
> Reiserfs and ext2/3 are detected as expected.

A possible solution is to put FSYS_BTRFS on the end of struct fsys_entry
fsys_table. I've tested with FSYS_BTFS as the second last entry, the last is
still FFS.

diff -Nru grub-0.97-r9/stage2/disk_io.c grub-0.97-r10/stage2/disk_io.c
--- grub-0.97-r9/stage2/disk_io.c 2009-12-10 23:41:37.000000000 +0100
+++ grub-0.97-r10/stage2/disk_io.c 2009-12-11 00:50:51.555007247 +0100
@@ -79,6 +79,9 @@
# ifdef FSYS_ISO9660
{"iso9660", iso9660_mount, iso9660_read, iso9660_dir, 0, 0},
# endif
+# ifdef FSYS_BTRFS
+ {"btrfs", btrfs_mount, btrfs_read, btrfs_dir, 0, btrfs_embed},
+# endif
/* XX FFS should come last as it's superblock is commonly crossing tracks
on floppies from track 1 to 2, while others only use 1. */
# ifdef FSYS_FFS

With this order, XFS and JFS filesystems are identified correct. But I think,
this is just a workaround.

regards,
Johannes