Skip to content
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

OS-8136 Add DISCARD/TRIM support to bhyve (illumos specific bits) #270

Merged
merged 5 commits into from
Mar 23, 2020

Conversation

jasonbking
Copy link

No description provided.

usr/src/cmd/bhyve/block_if.c Show resolved Hide resolved
@@ -630,6 +650,10 @@ blockif_open(const char *optstr, const char *ident)
}
}
}

if (nodelete == 0 && ioctl(fd, DKIOC_CANFREE, &candelete))
Copy link

Choose a reason for hiding this comment

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

ioctl() does not return a bool or boolean_t, so its return value should be compared to 0 or -1.

Copy link
Author

Choose a reason for hiding this comment

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

The extant freebsd code uses this style, so I opted for consistency with it (though I agree that being explicit would be better). We don't upstream the stuff in #ifndef __FreeBSD__ blocks AFAIK, so there's no upstream issue though that would cause conflicts there, so I don't feel too strongly either way.

Copy link

Choose a reason for hiding this comment

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

I guess this isn't the only place where I hold my nose in the bhyve code.

usr/src/cmd/bhyve/block_if.c Show resolved Hide resolved
mgerdts
mgerdts previously approved these changes Mar 19, 2020
usr/src/cmd/bhyve/block_if.c Show resolved Hide resolved
@@ -630,6 +650,10 @@ blockif_open(const char *optstr, const char *ident)
}
}
}

if (nodelete == 0 && ioctl(fd, DKIOC_CANFREE, &candelete))
Copy link

Choose a reason for hiding this comment

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

I guess this isn't the only place where I hold my nose in the bhyve code.

@jasonbking jasonbking changed the title OS 8136 Add DISCARD/TRIM support to bhyve (illumos specific bits) OS-8136 Add DISCARD/TRIM support to bhyve (illumos specific bits) Mar 20, 2020
@papertigers papertigers self-requested a review March 20, 2020 19:37
papertigers
papertigers previously approved these changes Mar 20, 2020
@jasonbking jasonbking dismissed stale reviews from papertigers and mgerdts via 751d341 March 20, 2020 19:42
Copy link

@mgerdts mgerdts left a comment

Choose a reason for hiding this comment

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

We should be sure the smartos-live changes make it into the same biweekly build. Please hold integration of this until the smartos-live changes are ready to land.

@jasonbking jasonbking merged commit da036f5 into master Mar 23, 2020
@jasonbking jasonbking deleted the bhyve-unmap branch March 23, 2020 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants