Skip to content

Merging from OpenZFS

John Baldwin edited this page Nov 11, 2025 · 1 revision

Updating subrepo-openzfs

  1. Update freebsd, cheri-purecap, and cheri-hybrid branches in CTRSD-CHERI/zfs.git
  • git fetch upstream
  • git checkout master
  • git merge
  • git checkout freebsd
  • git rebase master

Manually compare sys/contrib/openzfs and ensure any local diffs from the FreeBSD import are committed on the 'freebsd' branch

  • kompare ~/work/cheri/git/cheribsd/sys/contrib/openzfs ~/work/cheri/git/zfs

    To merge over an upstream FreeBSD commit to the 'freebsd' branch:

    • git format-patch -1
    • git am -p4 < ~/work/cheri/git/cheribsd/0001-.patch
  • git checkout cheri-hybrid

  • git rebase --update-refs --onto freebsd origin/freebsd

  1. Test result with CheriBSD
  • git checkout -b zfsmerge dev
  • mv subrepo-openzfs subrepo-openzfs.old
  • ln -s ~/work/cheri/git/zfs subrepo-openzfs
  • cheribuild all the things
  1. Test morello disk image
  • start_morello -drive if=none,file=/dev/zvol/ssd/bhyve/cheri-zfs,format=raw,id=hd1 -device virtio-blk-pci,drive=hd1

Initializing the pool in the image for the first time:

  • zpool create pool /dev/vtbd1
  • cp -Rp /boot/kernel /pool/
  • zpool export pool

Testing in the image otherwise:

  • zpool import pool
  • zfs list
  • ls /pool/kernel
  • zpool export pool
  1. Tag new version
  • git tag cheribsd-20230504
  • git push origin master +freebsd +cheri-hybrid +cheri-purecap
  1. Update CheriBSD subrepo
  • git subrepo pull --force sys/contrib/subrepo-openzfs
  1. New PR
  • gh pr create --base dev --title "Merge OpenZFS@57cfae4a2"
  1. Push once CI passes
  • git push origin HEAD:dev

Applying a commit to sys/contrib/openzfs to sys/contrib/subrepo-openzfs:

sed -e 's.contrib/openzfs.contrib/subrepo-openzfs.' < 0001-.patch | git am

Clone this wiki locally