Page MenuHomeFreeBSD

Fix EFI UFS caching
ClosedPublic

Authored by smh on Jan 18 2016, 10:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 23 2024, 6:23 PM
Unknown Object (File)
Jan 4 2024, 6:31 PM
Unknown Object (File)
Jan 4 2024, 6:31 PM
Unknown Object (File)
Jan 4 2024, 6:31 PM
Unknown Object (File)
Jan 4 2024, 6:31 PM
Unknown Object (File)
Jan 4 2024, 6:31 PM
Unknown Object (File)
Jan 4 2024, 6:31 PM
Unknown Object (File)
Jan 4 2024, 7:49 AM
Subscribers

Details

Summary

EFI was mixing caching in two seperate places causing issues when
multiple partitions where tested.

Eliminate this by removing ffstat and refactoring fsread into fsread_size,
adding basic parameter validation.

Also:

  • Enhance some error print outs.
  • Fix compilation under UFS1_ONLY and UFS2_ONLY
  • Use sizeof on parameters instead of structs.
Test Plan

Boot from a UFS image which has 2 UFS partitions:

  1. First bootable, second NOT bootable
  2. First NOT bootable, second bootable

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

smh retitled this revision from to Fix EFI UFS caching.
smh updated this object.
smh edited the test plan for this revision. (Show Details)

Compile tested but not completed the test plan yet, will confirm once it's passed.

Fix lost dmadat definition and assignment and add check for invalid dmadat in fsread.

All test plan test pass here now under qemu.

sys/boot/common/ufsread.c
259 ↗(On Diff #12442)

as disk read in while loop below can fail, perhaps move this assignment to the end? it feels a bit wrong to set OUT value so early.

Move fsizep assignment to the end of fsread as requested by tsoome_me.com

smh marked an inline comment as done.Jan 19 2016, 6:51 PM
This revision was automatically updated to reflect the committed changes.