mini-os: remove struct file dependency on config
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest5 patches 5 repliesIn review
- v218 patches 21 repliesSuperseded
- v115 patches 21 repliesSuperseded
Changes in v3 from the cover letter
- first 14 patches already applied
- added patch 5
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | introduce get_file_from_fd()include/ lib/ | +9 | 0 replies | |
| 2/5 | reset file type in close() in one place onlylib/ lib/ | +29 | 1 reply | |
| 3/5 | remove file type FTYPE_XCConfig.mk arch/ arch/ +3 more | +0 | 1 reply | |
| 4/5 | use function vectors instead of switch for file operationsinclude/ lib/ | +263 | 1 reply | |
| 5/5 | add CONFIG_LIBXS itemConfig.mk Makefile arch/ +3 more | +14 | 1 reply |
Reviews trailers per patch
All 5 patches have a Reviewed-by or Acked-by.
| Patch | Samuel Thibault |
|---|---|
| 1/5 | R-b |
| 2/5 | R-b |
| 3/5 | R-b |
| 4/5 | R-b |
| 5/5 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [MINIOS PATCH v3 0/5] mini-os: remove struct file dependency on config
Today the layout of struct file is depending on the Mini-OS configuration. This is especially bad as the layout is exported to external users like the Xen libraries built for Mini-OS, and those are being built only once for multiple stubdom configurations.
Today there is no direct problem resulting from this, as the main difference between struct file layouts is a large union containing all the device specific data for the different file types. The largest union member is not configuration dependant, so the build is currently not broken.
In order to avoid any future problems this patch series is eliminating the configuration dependency by replacing most of the device specific union members by a single pointer.
The two union members used by Xen libraries can't be replaced yet, as those need to be switched to use the generic pointer first.
In order to hide the Mini-OS internal implementation of the files array, patches 1, 2, and 4 are introducing a common framework to access a struct file via its file descriptor, and to allocate new file types dynamically instead of having them all pre-defined. The file type specific operations are supplied via a function vector in order to remove the dependency of lib/sys.c on all the various file types.
Patch 5 is preparing a possible future support of libxenstore instead of using the Mini-OS internal variant located in lib/xs.c.
Changes in v3:
- first 14 patches already applied
- added patch 5
Changes in V2:
- added 3 more patches
Juergen Gross (5):
introduce get_file_from_fd()
reset file type in close() in one place only remove file type FTYPE_XC
use function vectors instead of switch for file operations add CONFIG_LIBXS item
Config.mk | 11 +- Makefile | 2 +- arch/x86/testbuild/all-no | 2 +- arch/x86/testbuild/all-yes | 2 +- arch/x86/testbuild/newxen-yes | 2 +- include/lib.h | 59 ++++-- lib/sys.c | 345 ++++++++++++++++++++++++++-------- lib/xs.c | 1 - 8 files changed, 313 insertions(+), 111 deletions(-)
Signature · 1 line
2.26.2