-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Retrieving Disk Paths via DiskManager #440
base: main
Are you sure you want to change the base?
Conversation
{ | ||
List<string> diskPaths = new List<string>(); | ||
|
||
return this.Logger.LogMessageAsync($"{nameof(UnixDiskManager)}.GetDiskPaths", EventContext.Persisted(), async () => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You only need this wrap if you care about start and ends, do you need that information?
ErrorReason.DependencyNotFound); | ||
} | ||
|
||
foreach (Disk disk in disksToTest) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm understanding correctly, you just need the extension methods on Disks -> Disk.GetPreferredAccessPath? You don't need to put that into DiskManager if that's the case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GetPreferredAccessPath is leveraged to get the access paths of all the disks attached / filtered by DiskFilter. Since this method (GetDisks + Filtering Disks + GetPreferredAccessPath) appears in >2 workloads & dependencies, thought it would be appropriate as a method through the disk manager
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If that's the case you should call the GetDisks function above to avoid the duplicated filter code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to understand more about this. Could you use Disks.GetPreferredPath in the component that needs this? If you don't want to use foreach, you could write an extension just on the Disks.
ErrorReason.DependencyNotFound); | ||
} | ||
|
||
if (await this.CreateMountPointsAsync(disksToTest, cancellationToken).ConfigureAwait(false)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In FIO we still need to create mount points,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the profile to reflect that
No description provided.