Skip to content

sled-agent: minor cleanup/refactoring around Disk#10737

Open
jgallagher wants to merge 3 commits into
mainfrom
john/minor-disk-cleanups
Open

sled-agent: minor cleanup/refactoring around Disk#10737
jgallagher wants to merge 3 commits into
mainfrom
john/minor-disk-cleanups

Conversation

@jgallagher

Copy link
Copy Markdown
Contributor

I was poking around in here to remind myself of how some things worked, and did a little bit of cleanup:

  1. Remove the variant field from PooledDisk (this information is now also present in the ZpoolName, so this field had become entirely superfluous)
  2. Remove the Disk::is_synthetic() and Disk::is_real() methods. The only callers of these were using them to avoid calling methods that panicked on synthetic disks, so instead, we change those methods to return errors. The callers should handle this fine, and it makes the synthetic disk abstraction a little less leaky.
  3. Remove RawDisk::is_real() (no callers).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants