git: hammer2 - Add hammer2 boot support

Matthew Dillon dillon at crater.dragonflybsd.org
Tue Sep 24 15:30:51 PDT 2013


commit cdfd0a3e265fcdd4e2200620157aaeebe6bfd8f8
Author: Matthew Dillon <dillon at backplane.com>
Date:   Tue Sep 24 15:14:26 2013 -0700

    hammer2 - Add hammer2 boot support
    
    * Add hammer2 boot loader support.  The hammer2 boot loader accesses the
      hammer2 mount starting at the super-root.  To use hammer2 boot support
      you need to have a PFS called 'boot', which will be seen as "/boot" by
      the boot loader.
    
      The 'boot' PFS can be created either by creating a boot-specific H2
      partition with 'newfs_hammer2 -L boot ...', or by using
      'hammer2 pfs-create boot' to create a PFS called 'boot'.
    
      You can access any super-root if desired.
    
    * Since boot is a super-root you can mix boot PFS's and other PFS's on the
      same hammer2 filesystem, including creating a boot PFS far later on.
    
    * WARNING!!!!!  The 'boot' PFS must be configured without compression.
      i.e. 'hammer2 setcomp autozero /boot' (assuming you've mounted it on /boot),
      before you install anything.  The newfs_hammer2 utility will automatically
      handle this if you specify a label name of 'boot' (i.e. -L boot).
    
    * WARNING!!!!!  The BIOS may not be able to reliably access very high
      sector numbers on large hard drives, so to be safe we recommend creating
      a small 'a' partition anyway, unless the drive / main hammer2 filesystem
      is small enough to not cause problems.
    
    * Add %qx support to boot2's mini printf().
    
    * Fix ipdata->comp_algo propagation bug in hammer2_inode_create()
    
    * newfs_hammer2 and the pfs_create ioctl will set comp_algo to AUTOZERO
      for PFS's called "boot" automatically.

Summary of changes:
 lib/libstand/Makefile                    |   6 +-
 lib/libstand/{hammerread.c => hammer1.c} |   0
 lib/libstand/hammer2.c                   | 849 ++++++++++++++++++++++++++++---
 lib/libstand/printf.c                    |   1 +
 lib/libstand/read.c                      |   2 +
 lib/libstand/stand.h                     |   1 +
 sbin/newfs_hammer2/newfs_hammer2.c       |   8 +-
 sys/boot/Makefile                        |   4 +
 sys/boot/common/boot2.h                  |   8 +-
 sys/boot/common/help.common              |   6 +-
 sys/boot/common/loader.8                 |   6 +-
 sys/boot/pc32/boot2/Makefile             |  14 +-
 sys/boot/pc32/boot2/boot2.c              |  45 +-
 sys/boot/pc32/libi386/biosdisk.c         |   3 +
 sys/boot/pc32/loader/dloader.rc          |   2 +-
 sys/vfs/hammer2/hammer2_inode.c          |   4 +-
 sys/vfs/hammer2/hammer2_ioctl.c          |   7 +
 17 files changed, 864 insertions(+), 102 deletions(-)
 copy lib/libstand/{hammerread.c => hammer1.c} (100%)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/cdfd0a3e265fcdd4e2200620157aaeebe6bfd8f8


-- 
DragonFly BSD source repository


More information about the Commits mailing list