1. 18 Apr, 2012 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      Scan mdraid before LVM. · b72d44a1
      Vladimir 'phcoder' Serbinenko authored
      	* include/grub/diskfilter.h (grub_diskfilter_register): Renamed to ..
      	(grub_diskfilter_register_front): ... this.
      	(grub_diskfilter_register_back): New function.
      	All users of grub_diskfilter_register updated.
      b72d44a1
  2. 26 Mar, 2012 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      Handle big-endian mdraid. · 22e6a774
      Vladimir 'phcoder' Serbinenko authored
      	* Makefile.util.def (libgrubkern): Add mdraid_linux_be.c.
      	* grub-core/Makefile.core.def (mdraid09_be): New module.
      	* grub-core/disk/mdraid_linux.c: Use grub_md_to_cpu* and grub_cpu_to_md*
      	rather than grub_le_to_cpu* and grub_cpu_to_le*.
      	* grub-core/disk/mdraid_linux_be.c: New file.
      22e6a774
  3. 26 Feb, 2012 2 commits
  4. 29 Jan, 2012 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      Merge common RAID and LVM logic to an abstract diskfilter. · 076e7c0f
      Vladimir 'phcoder' Serbinenko authored
      	Add LDM support using the same framework.
      
      	* Makefile.util.def (libgrubkern): Add grub-core/disk/ldm.c,
      	grub-core/disk/diskfilter.c and grub-core/partmap/gpt.c.
      	(libgrubmods): Remove grub-core/disk/raid.c and
      	grub-core/partmap/gpt.c.
      	* grub-core/Makefile.core.def (ldm): New module.
      	(raid): Renamed to diskfilter. All users updated.
      	* grub-core/disk/raid.c: Moved to ...
      	* grub-core/disk/diskfilter.c: ... here.
      	* grub-core/disk/diskfilter.c: Rename grub_raid_ to grub_diskfilter_.
      	(lv_num): New var.
      	(find_array): Renamed to ...
      	(find_lv): ... this. Support multi-LV. Skip nameless LVs
      	(grub_is_array_readable): Renamed to ...
      	(grub_is_lv_readable): ... this. Support multinode hierarchy.
      	(insert_array): New argument id.
      	(is_node_readable): New function.
      	(scan_device): Rename to ...
      	(scan_disk): .. this. Restrict to one disk.
      	(scan_devices): New function.
      	(grub_diskfilter_iterate): Support multi-LV.
      	Skip invisible and nameless LVs.
      	(grub_diskfilter_memberlist): Support multi-LV.
      	(grub_diskfilter_read_node): New function.
      	(grub_raid_read): Most of logic moved to ...
      	(read_segment): ... here
      	(read_lv): New function.
      	(grub_diskfilter_get_vg_by_uuid): New function.
      	(grub_diskfilter_make_raid): Likewise.
      	* grub-core/disk/ldm.c: New file.
      	* grub-core/disk/lvm.c (vg_list): Removed.
      	(lv_count): Likewise.
      	(scan_depth): Likewise.
      	(is_lv_readable): Likewise.
      	(grub_lvm_getvalue): Advance pointer past the number.
      	(find_lv): Removed.
      	(do_lvm_scan): Refactored into ...
      	(grub_lvm_detect): ... this. Support raid.
      	(grub_lvm_iterate): Removed.
      	(grub_lvm_memberlist): Likewise.
      	(grub_lvm_open): Likewise.
      	(grub_lvm_close): Likewise.
      	(read_lv): Likewise.
      	(read_node): Likewise.
      	(is_node_readable): Likewise.
      	(is_lv_readable): Likewise.
      	(grub_lvm_read): Likewise.
      	(grub_lvm_write): Likewise.
      	(grub_lvm_dev): Use diskfilter
      	(GRUB_MOD_INIT): Likewise.
      	(GRUB_MOD_FINI): Likewise.
      	* grub-core/disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Use
      	new interface.
      	* grub-core/disk/mdraid1x_linux.c (grub_mdraid_detect): Likewise.
      	* grub-core/disk/mdraid_linux.c (grub_mdraid_detect): Likewise.
      	* grub-core/disk/raid5_recover.c (grub_raid5_recover): Use
      	grub_diskfilter_read_node.
      	Fix a bug with xor.
      	* grub-core/disk/raid6_recover.c (grub_raid6_recover): Use
      	grub_diskfilter_read_node.
      	Support GRUB_RAID_LAYOUT_MUL_FROM_POS.
      	* grub-core/kern/disk.c (grub_disk_dev_list): Make global.
      	(grub_disk_dev_iterate): Move from here...
      	* include/grub/disk.h (grub_disk_dev_iterate): ... to here. Inlined.
      	* grub-core/kern/emu/hostdisk.c (grub_hostdisk_find_partition_start):
      	Make global.
      	(grub_hostdisk_find_partition_start): Likewise.
      	(grub_hostdisk_os_dev_to_grub_drive): New function.
      	(grub_util_biosdisk_get_osdev): Check that disk is biosdisk.
      	* grub-core/kern/emu/hostdisk.c (make_device_name): Move to ...
      	* util/getroot.c (make_device_name): ... here.
      	* grub-core/kern/emu/hostdisk.c (grub_util_get_dm_node_linear_info):
      	Move to ...
      	* util/getroot.c (grub_util_get_dm_node_linear_info): ...here.
      	* grub-core/kern/emu/hostdisk.c
      	(convert_system_partition_to_system_disk): Move to ...
      	* util/getroot.c (convert_system_partition_to_system_disk): ...here.
      	* grub-core/kern/emu/hostdisk.c (device_is_wholedisk): Move to ...
      	* util/getroot.c (device_is_wholedisk): ... here.
      	* grub-core/kern/emu/hostdisk.c (find_system_device): Move to ...
      	* util/getroot.c (find_system_device): ... here.
      	* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_is_present):
      	Move to ...
      	* util/getroot.c (grub_util_biosdisk_is_present): ...here.
      	* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_get_grub_dev):
      	Move to ...
      	* util/getroot.c (grub_util_biosdisk_get_grub_dev): ... here.
      	Handle LDM.
      	* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_is_floppy):
      	Move to ...
      	* util/getroot.c (grub_util_biosdisk_is_floppy): ... here.
      	* grub-core/partmap/gpt.c (grub_gpt_partition_map_iterate): Made global.
      	* include/grub/disk.h (grub_disk_dev_id): Replaced RAID and LVM with
      	DISKFILTER.
      	* include/grub/raid.h: Renamed to ...
      	* include/grub/diskfilter.h: ... this.
      	* include/grub/diskfilter.h: Rename grub_raid_* to grub_diskfilter_*
      	(GRUB_RAID_LAYOUT_*): Make into array.
      	(GRUB_RAID_LAYOUT_MUL_FROM_POS): New value.
      	(grub_diskfilter_vg): New struct.
      	(grub_diskfilter_pv_id): Likewise.
      	(grub_raid_member): Removed.
      	(grub_raid_array): Likewise.
      	(grub_diskfilter_pv): New struct.
      	(grub_diskfilter_lv): Likewise.
      	(grub_diskfilter_segment): Likewise.
      	(grub_diskfilter_node): Likewise.
      	(grub_diskfilter_get_vg_by_uuid): New proto.
      	(grub_raid_register): Inline.
      	(grub_diskfilter_unregister): Likewise.
      	(grub_diskfilter_make_raid): New proto.
      	(grub_diskfilter_vg_register): Likewise.
      	(grub_diskfilter_read_node): Likewise.
      	(grub_diskfilter_get_pv_from_disk) [GRUB_UTIL]: Likewise.
      	* include/grub/emu/hostdisk.h (grub_util_get_ldm): New proto.
      	(grub_util_is_ldm): Likewise.
      	(grub_util_ldm_embed) [GRUB_UTIL]: Likewise.
      	(grub_hostdisk_find_partition_start): Likewise.
      	(grub_hostdisk_os_dev_to_grub_drive): Likewise.
      	* include/grub/gpt_partition.h (GRUB_GPT_PARTITION_TYPE_LDM):
      	New definition.
      	(grub_gpt_partition_map_iterate): New proto.
      	* include/grub/lvm.h (grub_lvm_vg): Removed.
      	(grub_lvm_pv): Likewise.
      	(grub_lvm_lv): Likewise.
      	(grub_lvm_segment): Likewise.
      	(grub_lvm_node): Likewise.
      	* util/getroot.c [...]
      	* util/grub-probe.c (probe_raid_level): Handle diskfilter.
      	(probe_abstraction): Likewise.
      	* util/grub-setup.c (setup): Remove must_embed. Support LDM.
      	(main): Remove dead logic.
      076e7c0f
  5. 12 Dec, 2011 1 commit
  6. 25 Apr, 2011 1 commit
  7. 11 Apr, 2011 1 commit
  8. 06 Apr, 2011 1 commit
  9. 07 Jan, 2011 1 commit
  10. 19 Nov, 2010 1 commit
  11. 01 Nov, 2010 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      * grub-core/disk/mdraid1x_linux.c (grub_mdraid_detect): Do not put · 3a1197cd
      Vladimir 'phcoder' Serbinenko authored
      	elements with invlid index.
      	* grub-core/disk/mdraid_linux.c (grub_mdraid_detect): Likewise.
      	* grub-core/disk/raid.c (insert_array): Automatically reallocate
      	members.
      	* include/grub/raid.h (grub_raid_member): New struct.
      	(grub_raid_array): Transform devices and start_sector into usage of
      	grub_raid_member. All users updated
      	(allocated_devs): New member.
      3a1197cd
  12. 20 Sep, 2010 1 commit
    • Vladimir 'phcoder' Serbinenko's avatar
      Split mdraid.mod into mdraid09.mod and mdraid1x.mod. · 1e8d555b
      Vladimir 'phcoder' Serbinenko authored
      	* Makefile.util.def (libgrub.a): Add grub-core/disk/mdraid1x_linux.c.
      	* grub-core/Makefile.core.def (mdraid): Renamed to ...
      	(mdraid09): ... this.
      	(mdraid1x): New module.
      	* grub-core/disk/mdraid_linux.c: Move 1.x parts ...
      	* grub-core/disk/mdraid1x_linux.c: ...here. All users updated.
      1e8d555b
  13. 06 May, 2010 1 commit
  14. 24 Dec, 2009 1 commit
    • carles's avatar
      2009-12-24 Carles Pina i Estany <carles@pina.cat> · 7fd0baee
      carles authored
      	* bus/usb/usbhub.c: Fix capitalization, fullstop and newlines in
      	grub_errno calls.
      	* commands/acpi.c: Likewise.
      	* commands/blocklist.c: Likewise.
      	* commands/efi/loadbios.c: Likewise.
      	* commands/i386/pc/drivemap.c: Likewise.
      	* commands/loadenv.c: Likewise.
      	* commands/memrw.c: Likewise.
      	* commands/password.c: Likewise.
      	* commands/videotest.c: Likewise.
      	* disk/ata.c: Likewise.
      	* disk/ata_pthru.c: Likewise.
      	* disk/dmraid_nvidia.c: Likewise.
      	* disk/ieee1275/nand.c: Likewise.
      	* disk/ieee1275/ofdisk.c: Likewise.
      	* disk/loopback.c: Likewise.
      	* disk/lvm.c: Likewise.
      	* disk/mdraid_linux.c: Likewise.
      	* disk/raid.c: Likewise.
      	* disk/raid6_recover.c: Likewise.
      	* disk/scsi.c: Likewise.
      	* efiemu/main.c: Likewise.
      	* efiemu/mm.c: Likewise.
      	* efiemu/pnvram.c: Likewise.
      	* efiemu/symbols.c: Likewise.
      	* font/font.c: Likewise.
      	* fs/cpio.c: Likewise.
      	* fs/hfsplus.c: Likewise.
      	* fs/iso9660.c: Likewise.
      	* fs/jfs.c: Likewise.
      	* fs/minix.c: Likewise.
      	* fs/ntfs.c: Likewise.
      	* fs/ntfscomp.c: Likewise.
      	* fs/reiserfs.c: Likewise.
      	* fs/ufs.c: Likewise.
      	* fs/xfs.c: Likewise.
      	* gettext/gettext.c: Likewise.
      	* include/grub/auth.h: Likewise.
      	* kern/elf.c: Likewise.
      	* kern/file.c: Likewise.
      	* kern/ieee1275/init.c: Likewise.
      	* kern/ieee1275/mmap.c: Likewise.
      	* kern/ieee1275/openfw.c: Likewise.
      	* kern/powerpc/dl.c: Likewise.
      	* kern/sparc64/dl.c: Likewise.
      	* lib/arg.c: Likewise.
      	* loader/i386/bsd.c: Likewise.
      	* loader/i386/bsdXX.c: Likewise.
      	* loader/i386/efi/linux.c: Likewise.
      	* loader/i386/efi/xnu.c: Likewise.
      	* loader/i386/ieee1275/linux.c: Likewise.
      	* loader/i386/linux.c: Likewise.
      	* loader/i386/multiboot.c: Likewise.
      	* loader/i386/pc/linux.c: Likewise.
      	* loader/i386/pc/multiboot2.c: Likewise.
      	* loader/i386/xnu.c: Likewise.
      	* loader/ieee1275/multiboot2.c: Likewise.
      	* loader/macho.c: Likewise.
      	* loader/machoXX.c: Likewise.
      	* loader/multiboot2.c: Likewise.
      	* loader/multiboot_loader.c: Likewise.
      	* loader/powerpc/ieee1275/linux.c: Likewise.
      	* loader/sparc64/ieee1275/linux.c: Likewise.
      	* loader/xnu.c: Likewise.
      	* loader/xnu_resume.c: Likewise.
      	* mmap/i386/pc/mmap.c: Likewise.
      	* normal/menu_viewer.c: Likewise.
      	* partmap/acorn.c: Likewise.
      	* partmap/amiga.c: Likewise.
      	* partmap/apple.c: Likewise.
      	* script/lexer.c: Likewise.
      	* term/gfxterm.c: Likewise.
      	* term/i386/pc/serial.c: Likewise.
      	* term/i386/pc/vga.c: Likewise.
      	* term/ieee1275/ofconsole.c: Likewise.
      	* term/terminfo.c: Likewise.
      	* video/bitmap.c: Likewise.
      	* video/efi_gop.c: Likewise.
      	* video/efi_uga.c: Likewise.
      	* video/fb/video_fb.c: Likewise.
      	* video/i386/pc/vbe.c: Likewise.
      	* video/readers/tga.c: Likewise.
      	* video/video.c: Likewise.
      7fd0baee
  15. 18 Dec, 2009 1 commit
  16. 16 Nov, 2009 2 commits
  17. 07 Nov, 2009 1 commit
    • Felix Zielcke's avatar
      2009-11-06 Felix Zielcke <fzielcke@z-51.de> · c8ec30a0
      Felix Zielcke authored
      	* disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Set array->name to NULL.
      	* disk/mdraid_linux.c (grub_raid_super_1x): New structure.
      	(WriteMostly1): New macro.
      	Set array->name to NULL for metadata format 0.90.  Add support for
      	metadata 1.x.  Fix some comments.
      	* disk/raid.c (): Add support for name based RAID arrays.  Fix a
      	few comments.
      	* util/getroot.c (grub_util_get_grub_dev): Add support for
      	/dev/md/name style devices.
      c8ec30a0
  18. 19 Jun, 2009 1 commit
  19. 13 May, 2009 1 commit
    • proski's avatar
      2009-05-13 Pavel Roskin <proski@gnu.org> · 238e871f
      proski authored
      	* kernel/disk.c (grub_disk_read): Use void pointer for the
      	buffer.
      	(grub_disk_write): Use const void pointer for the buffer.
      	Adjust all callers.  Remove unnecessary casts.
      238e871f
  20. 23 Aug, 2008 1 commit
    • bean's avatar
      2008-08-23 Bean <bean123ch@gmail.com> · 5ed20adc
      bean authored
      	* conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
      	(grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
      	disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
      	(pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
      	dm_nv.mod.
      	(raid5rec_mod_SOURCES): New macro.
      	(raid5rec_mod_CFLAGS): Likewise.
      	(raid5rec_mod_LDFLAGS): Likewise.
      	(raid6rec_mod_SOURCES): Likewise.
      	(raid6rec_mod_CFLAGS): Likewise.
      	(raid6rec_mod_LDFLAGS): Likewise.
      	(mdraid_mod_SOURCES): Likewise.
      	(mdraid_mod_CFLAGS): Likewise.
      	(mdraid_mod_LDFLAGS): Likewise.
      	(dm_nv_mod_SOURCES): Likewise.
      	(dm_nv_mod_CFLAGS): Likewise.
      	(dm_nv_mod_LDFLAGS): Likewise.
      
      	* conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
      	(grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
      	disk/mdraid_linux.c and disk/dmraid_nvidia.c.
      
      	* conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
      	disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
      
      	* conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
      
      	* conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
      
      	* conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
      
      	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
      
      	* disk/raid5_recover.c: New file.
      
      	* disk/raid6_recover.c: Likewise.
      
      	* disk/mdraid_linux.c: Likewise.
      
      	* disk/dmraid_nvidia.c: Likewise.
      
      	* disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
      	ULONG_MAX.
      
      	* disk/raid.c (grub_raid_open): Use the size of the smallest disk to
      	calculate the size of raid device.
      	(grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
      	different layout of raid5.
      	(grub_raid_scan_device): Remove code specific to mdraid.
      	(grub_raid_list): New variable.
      	(free_array): New function.
      	(grub_raid_register): Likewise.
      	(grub_raid_unregister): Likewise.
      	(grub_raid_rescan): Likewise.
      	(GRUB_MOD_INIT): Don't iterate device here.
      	(GRUB_MOD_FINI): Use free_array to release resource.
      
      	* include/grub/raid.h: Remove macro and structure specific to mdraid.
      	(grub_raid5_recover_func_t): New function variable type.
      	(grub_raid6_recover_func_t): Likewise.
      	(grub_raid5_recover_func): New variable.
      	(grub_raid6_recover_func): Likewise.
      	(grub_raid_register): New function.
      	(grub_raid_unregister): Likewise.
      	(grub_raid_rescan): Likewise.
      	(grub_raid_block_xor): Likewise.
      
      	* util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
      	(CMD_CRC): New macro.
      	(part): Removed.
      	(read_file): Handle device as well as file.
      	(cmd_crc): New function.
      	(fstest): Handle multiple disks.
      	(options): Remove part, raw and long, add root and diskcount.
      	(usage): Add crc, remove -p, -r, -l, add -r and -c.
      	(main): Find the first non option entry and ignore subsequence options,
      	add handling for the new options, support multiple disks.
      
      	* util/grub-probe.c (probe): Add mdraid to abstraction_name.
      5ed20adc