* grub-core/kern/dl.c (grub_dl_load_segments) [__powerpc__]: Follow
__ia64__ path.
(grub_dl_load_segments): Set mod->sz.
(grub_dl_flush_cache): Flush whole space occupied by module, not just
segments.
* grub-core/kern/ia64/dl.c (nopm): Make const while on it.
(jump): Likewise.
* grub-core/kern/powerpc/dl.c (grub_arch_dl_get_tramp_got_size): New
function.
(trampoline): New struct.
(trampoline_template): New const.
(grub_arch_dl_relocate_symbols): Create trampolines on overflow.
* include/grub/dl.h (grub_dl): Add sz element.
[__powerpc__]: Follow __ia64__.
(GRUB_ARCH_DL_TRAMP_ALIGN): Define on ppc.
(GRUB_ARCH_DL_GOT_ALIGN): Likewise.
(GRUB_ARCH_DL_TRAMP_SIZE): Likewise.
(grub_arch_dl_get_tramp_got_size) [__powerpc__]: New proto.
* grub-core/fs/btrfs.c (grub_btrfs_embed) [GRUB_UTIL]: New function.
(grub_btrfs_fs) [GRUB_UTIL]: Set embed.
* include/grub/fs.h (grub_fs) [GRUB_UTIL]: New field embed.
* util/grub-setup.c (setup): Use fs embedding if available.
Add additional sanity check.
* grub-core/fs/zfs/zfs.c (recovery): Add Gauss for general case.
Return error on singularity. All users updated.
(read_device): Don't stop on 3rd failure on raidz3.
* grub-core/fs/zfs/zfs.c (mzap_lookup): New parameter case_insensitive.
All users updated.
(zap_hash): Likewise.
(name_cmp): New function.
(zap_leaf_array_equal): New parameter case_insensitive.
All users updated.
(zap_leaf_lookup): Likewise.
(fzap_lookup): Likewise.
(zap_lookup): Likewise.
(dnode_get_path): New parameter case_insensitive. Retrieve case
sensitiviness of a volume. All users updated.
(dnode_get_fullpath): New parameter case_insensitive.
All users updated.
(grub_zfs_dir): Set info.case_insensitiveness.
* grub-core/fs/zfs/zfs.c (powx): New array.
(powx_inv): Likewise.
(poly): New const.
(xor_out): New function.
(gf_mul): Likewise.
(recovery): Likewise.
(read_device): Use second redundancy strip.
to save space time and complexity.
* grub-core/disk/raid6_recover.c (raid6_table1): Removed.
(raid6_table2): Likewise.
(powx): New array.
(powx_inv): Likewise.
(poly): New const.
(grub_raid_block_mul): Replace with ...
(grub_raid_block_mulx): ...this.
(grub_raid6_init_table): Rewritten.
(grub_raid6_recover): Use power of generator representation.
* grub-core/fs/zfs/zfs.c (grub_zfs_device_desc): New member ashift.
(fill_vdev_info_real): Set ashift.
(read_device): Rewrite RAIDZ part based on reverse engineering.
* grub-core/fs/ufs.c (UFS_LOG_BLKSZ): New macro.
(grub_ufs_data): New field log2_blksz.
(grub_ufs_read_file): Use shifts.
(grub_ufs_mount): Check block size and logarithm it.
* grub-core/fs/cpio.c (ATTR_TYPE): New definition.
(ATTR_FILE): Likewise.
(ATTR_DIR): Likewise.
(ATTR_LNK): Likewise.
(grub_cpio_data) [MODE_USTAR]: New fields linkname and linkname_alloc.
(grub_cpio_find_file): Fill mode, handle linkname field as well as
L and K entries.
(grub_cpio_mount): Zero-fill data.
(handle_symlink): New function.
* grub-core/fs/iso9660.c (grub_iso9660_mount): Move rockridge detection
to ...
(set_rockridge): ... here.
(grub_iso9660_mount): Check rockridge on the primary label when
discovering. Ignore Joliet if Rockridge is present.
* grub-core/fs/minix.c (GRUB_MINIX_ZONESZ): Use log_block_size.
(GRUB_MINIX_ZONE2SECT): Likewise.
(grub_minix_data): Replace block_size with log_block_size.
(grub_minix_read_file): Use shifts.
(grub_minix_mount): Check block size and take a logarithm.
* grub-core/fs/afs.c (GRUB_AFS_BLOCKS_PER_DI_RUN): Replaced with...
(GRUB_AFS_LOG_BLOCKS_PER_DI_RUN): ... this.
(GRUB_AFS_BLOCKRUN_LOG_SIZE): New definition.
(grub_afs_read_inode): Use block_shift.
(RANGE_SHIFT): New definition.
(grub_afs_read_block): Account for RANGE_SHIFT, emit errors on
unexpected conditions, use shifts and appropriate types.
(GRUB_MOD_INIT): Check the value of GRUB_AFS_BLOCKRUN_LOG_SIZE.
* grub-core/fs/afs.c (grub_afs_inode): Make small_data zero-size.
(grub_afs_small_data_element_header): New struct.
(grub_afs_read_inode): Read complete inode. Fix ino type while on it.
(grub_afs_read_attribute) [MODE_BFS]: New function.
(grub_afs_iterate_dir): Allocate for complete inode.
(grub_afs_mount): Likewise.
(grub_afs_uuid) [MODE_BFS]: New function.
(grub_afs_fs) [MODE_BFS]: Add .uuid.