sysext: Refactor the merge hierarchy code
authorKrzesimir Nowak <knowak@microsoft.com>
Thu, 15 Feb 2024 14:12:24 +0000 (15:12 +0100)
committerKrzesimir Nowak <knowak@microsoft.com>
Thu, 22 Feb 2024 18:06:22 +0000 (19:06 +0100)
commit6cadc0bd75953600fd76b06b68191913fa40732c
tree925ab9513fc6bdd0ff7e06ed1dbf350c1529d930
parent1212c80c71a9c608ed182d2808273f7c93442121
sysext: Refactor the merge hierarchy code

Divide the merge_hierarchy function into code that:

- determines the lower directories for overlayfs

  - determination of lower directories was further split into top, middle and
    bottom directories:

    - bottom - possibly the hierarchy itself

    - middle - hierarchies from extensions

    - top - metadata directory

- mounts the overlayfs using determined directories

- writes information to the metadata directory

- makes the merged hierarchy read-only
src/sysext/sysext.c