Skip to content

Address #256#293

Closed
taigrr wants to merge 4 commits into
jaypipes:mainfrom
taigrr:main
Closed

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

Conversation

@taigrr

@taigrr taigrr commented Dec 3, 2021

Copy link
Copy Markdown
Contributor

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

taigrr commented Dec 6, 2021

Copy link
Copy Markdown
Contributor Author

@fromanirh Could you take a look at this please?

@ffromani ffromani left a comment

Copy link
Copy Markdown
Collaborator

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.

Comment thread pkg/block/block_linux.go
Comment thread pkg/block/block_linux.go
Signed-off-by: Tai Groot <tai@taigrr.com>
Signed-off-by: Tai Groot <tai@taigrr.com>
@taigrr

taigrr commented Mar 19, 2022

Copy link
Copy Markdown
Contributor Author

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