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

[RFC]: add discard support for vhd #265

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion control/tap-ctl-info.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
#include "tap-ctl.h"

int tap_ctl_info(pid_t pid, unsigned long long *sectors,
unsigned int *sector_size, unsigned int *info, const int minor)
unsigned int *sector_size, unsigned int *info,
bool *discard, const int minor)
{
tapdisk_message_t message;
int err;
Expand All @@ -60,6 +61,7 @@ int tap_ctl_info(pid_t pid, unsigned long long *sectors,
*sectors = message.u.image.sectors;
*sector_size = message.u.image.sector_size;
*info = message.u.image.info;
*discard = message.u.image.discard;
return 0;
} else if (TAPDISK_MESSAGE_ERROR == message.type) {
return -message.u.response.error;
Expand Down