10173 loader: support newer ZFS versions

Review Request #1340 — Created Jan. 4, 2019 and submitted

tsoome
illumos-gate
10173
d184b69...
general
zfsboot: support newer ZFS versions
declare v3 objset size/layout to fix userboot and possibly other loader issues

- fix for userboot assertion failure in zfs_dev_close in free due to out of bounds write
- fix for zfs_alloc / zfs_free mismatch assertion failure when booting GPT on BIOS

https://svnweb.freebsd.org/changeset/base/342747


  • 0
  • 0
  • 2
  • 0
  • 2
Description From Last Updated
domag02
    1. Missing blanks around binary operators.
    2. New constants for padding sizes. (Optional)
  1. #define OBJSET_PAD0_SIZE    (OBJSET_PHYS_SIZE_V2 -  \
        sizeof (dnode_phys_t) * 3 - sizeof (zil_header_t) - \
        sizeof (uint64_t) * 2 - 2 * ZIO_OBJSET_MAC_LEN)
    #define OBJSET_PAD1_SIZE    (OBJSET_PHYS_SIZE_V3 -  \
        OBJSET_PHYS_SIZE_V2 - sizeof (dnode_phys_t))
    
    typedef struct objset_phys {
        dnode_phys_t os_meta_dnode;
        zil_header_t os_zil_header;
        uint64_t os_type;
        uint64_t os_flags;
        uint8_t os_portable_mac[ZIO_OBJSET_MAC_LEN];
        uint8_t os_local_mac[ZIO_OBJSET_MAC_LEN];
        char os_pad0[OBJSET_PAD0_SIZE];
        dnode_phys_t os_userused_dnode;
        dnode_phys_t os_groupused_dnode;
        dnode_phys_t os_projectused_dnode;
        char os_pad1[OBJSET_PAD1_SIZE];
    } objset_phys_t;
    
  2. 
      
domag02
  1. 
      
  2. Please, remove the hyphen.
  3. 
      
tsoome
citrus
  1. Ship It!
  2. 
      
tsoome
domag02
  1. Ship It!
  2. 
      
tsoome
Review request changed

Status: Closed (submitted)

Loading...