Skip to content

Address #256#293

Closed
taigrr wants to merge 4 commits intojaypipes:mainfrom
taigrr:main
Closed

Address #256#293
taigrr wants to merge 4 commits intojaypipes:mainfrom
taigrr:main

Conversation

@taigrr
Copy link
Contributor

@taigrr taigrr commented Dec 3, 2021

If a disk has no partitions, common use cases for looping over partitions on the disk array created by Block.New() don't work as expected.
Now, underlying partition functions detect partitionless disks and treat a full-disk filesystem as a partition.

The Partition UUID is set to the empty string (since there isn't one), so this behavior can be detected.

This issue will resolve #256

@taigrr
Copy link
Contributor Author

taigrr commented Dec 6, 2021

@fromanirh Could you take a look at this please?

Copy link
Collaborator

@ffromani ffromani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code per se looks fine and it is very much like how I'd solve this bug. I think we should have some (at least one) test to exercise the new code path though, also to prevent future regressions.

Signed-off-by: Tai Groot <tai@taigrr.com>
Signed-off-by: Tai Groot <tai@taigrr.com>
@taigrr
Copy link
Contributor Author

taigrr commented Mar 19, 2022

I am closing this PR since github doesn't let you change the name of the source branch for comparison and I now have multiple PRs. I'll reopen and reference this PR in the new one.

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.

can not show mountpoint for nvme disk

2 participants

Comments