-
Notifications
You must be signed in to change notification settings - Fork 84
thin provisioning xlvhd #168
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import from https://github.com/germanop/blktap: - branch kuiper-rebased - commit e645079 Signed-off-by: Germano Percossi <germano.percossi@citrix.com>
Signed-off-by: Germano Percossi <germano.percossi@citrix.com>
We ran out of flags (we have 9 now) so the size of the flag is not sufficient. In theory there should not be any problem but it is not clear if this flag is used to be written somewhere where it is expected to be 8 bits. To be checked later Signed-off-by: Germano Percossi <germano.percossi@citrix.com>
Signed-off-by: Chandrika Srinivasan <chandrikas.srinivasan@citrix.com> Reviewed-by: Germano Percossi <germano.percossi@citrix.com>
Signed-off-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com> Reviewed-by: Germano Percossi <germano.percossi@citrix.com>
Signed-off-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com> Reviewed-by: Germano Percossi <germano.percossi@citrix.com>
Signed-off-by: Germano Percossi <germano.percossi@citrix.com>
Signed-off-by: Germano Percossi <germano.percossi@citrix.com>
Not very reliable implementation, too many assumptions and not taken into account possible problems associated with threads. Signed-off-by: Germano Percossi <germano.percossi@citrix.com>
Signed-off-by: Germano Percossi <germano.percossi@citrix.com>
Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com> Acked-by: Germano Percossi <germano.percossi@citrix.com>
Signed-off-by: Stefano Panella <Stefano.Panella@citrix.com> Reviewed-by: Germano Percossi <germano.percossi@citrix.com>
This change involves few things: - New transport based on DGRAM - New packet/messages protocol - Server runs in one fixed mode, dropped support for master and slave - Because of protocol change now we do not use anymore condition wait but just eventfd so we can use poll to block for socket read and reading reqs from the queue from the same context. - Only bare minimal part of protocol implemented, server only supports PAYLOAD_CB_NONE Signed-off-by: Stefano Panella <stefano.panella@citrix.com> Reviewed-by: Germano Percossi <germano.percossi@citrix.com>
When the SR blktap is operating on is thinly provisioned, pass all lvm commands as arguments to /bin/xenvm. Signed-off-by: Kostas Ladopoulos <konstantinos.ladopoulos@citrix.com> Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com> Reviewed-by: Germano Percossi <germano.percossi@citrix.com>
Signed-off-by: Stefano Panella <Stefano.Panella@citrix.com> Reviewed-by: Germano Percossi <germano.percossi@citrix.com>
Added init script that will start the thinprovd daemon at boot time. Signed-off-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com> Reviewed-by: Germano Percossi <germano.percossi@citrix.com>
Signed-off-by: Germano Percossi <germano.percossi@citrix.com>
Signed-off-by: Germano Percossi <germano.percossi@citrix.com>
Signed-off-by: Germano Percossi <germano.percossi@citrix.com>
Signed-off-by: Germano Percossi <germano.percossi@citrix.com>
Signed-off-by: Kostas Ladopoulos <konstantinos.ladopoulos@citrix.com> Reviewed-by: Stefano Panella <stefano.panella@citrix.com>
From: Stefano Panella <Stefano.Panella@citrix.com> - 'tap-ctl open' and 'tap-ctl create' are accepting an extra optional parameter "-q XXX" meaning allocation quantum size in MB. - to make use of this new parameter the logic of the thin_check function has changed a bit since before all was just hardcoded - rearranging the thin_check has lead to a fix for [CA-172442], no sleep if not strictly needed - Now the hook is going to sleep only if available_bytes is negative (e.g. no space to perform any further operation) - I have also fixed [CA-173081] since now when we reach the end of the size we decrease the quantum allocation to the minimum (16MBytes) to avoid wasting too much space, so a maximum of 16 MB are wasted Signed-off-by: Stefano Panella <stefano.panella@citrix.com> Acked-by: Germano Percossi <germano.percossi@citrix.com>
Signed-off-by: Stefano Panella <stefano.panella@citrix.com> Acked-by: Germano Percossi <germano.percossi@citrix.com>
Signed-off-by: Stefano Panella <stefano.panella@citrix.com> Acked-by: Germano Percossi <germano.percossi@citrix.com>
Signed-off-by: Stefano Panella <stefano.panella@citrix.com> Acked-by: Germano Percossi <germano.percossi@citrix.com>
The argument addrlen is a value-result argument, which the caller should initialize before the call to the size of the buffer associated with src_addr, and modified on return to indicate the actual size of the source address. The returned address is truncated if the buffer provided is too small; in this case, addrlen will return a value greater than was supplied to the call Signed-off-by: Stefano Panella <stefano.panella@citrix.com> Acked-by: Germano Percossi <germano.percossi@citrix.com>
Now thinprovd, if restarted, will automatically manage the same VGs it was already managing before the crash. This has been implemented changing thin-cli to create/delete a file with the name of the VG just after the VG has been successfully added/deleted from the server, so there is no race. The files are created/removed in /var/run/thinprovd/ On a machine just booted, /var/run/thinprovd/ does not exists and is created by thinprovd when started. Signed-off-by: Stefano Panella <stefano.panella@citrix.com> Reviewed-by: Germano Percossi <germano.percossi@citrix.com>
This so we can use previous thinprovd_log stuff in a more general way and not only for thinprovd. - thinprovd_log[c,h] renamed to thin_log[c,h] - all THINPROVD_LOG renamed to THIN_LOG - all thinpd_ renamed to thin_ - thin_openlog now accepts a string for the log name so it can be used for different modules/executables Signed-off-by: Stefano Panella <stefano.panella@citrix.com> Reviewed-by: Germano Percossi <germano.percossi@citrix.com>
We need this otherwise we do not get any log when thinprovd is started as a daemon. Signed-off-by: Stefano Panella <stefano.panella@citrix.com> Reviewed-by: Germano Percossi <germano.percossi@citrix.com>
Thinprovd has been modified to remove '-L' from the size parameter for resize-demo, which means the wrapper script needed to be changed as well. As part of this change we have agreed to move resize-demo and refresh-demo scripts from the xenvm repo to the blktap repo with new names: xlvhd-refresh xlvhd-resize These two new scripts will be installed in /usr/sbin/ while resize-demo and refresh-demo were installed in /opt/xensource/sm/ Signed-off-by: Stefano Panella <stefano.panella@citrix.com> Reviewed-by: Germano Percossi <germano.percossi@citrix.com>
Every SR has their allocation type written in '/var/run/nonpersistent/sr_alloc_<sr_uuid>'. blktap reads it from there and defaults to 'thick' if it doesn't exist. Signed-off-by: Kostas Ladopoulos <konstantinos.ladopoulos@citrix.com> Acked-by: Germano Percossi <germano.percossi@citrix.com>
Thinprovd and tapdisk need to retry if a send/recv or read/write returns -1 and errno == EINTR Signed-off-by: Stefano Panella <stefano.panella@citrix.com> Reviewed-by: Germano Percossi <germano.percossi@citrix.com>
There was a corner case triggered when thinprovd was killed where thin_check_warn_2 was declaring a request completed even if the request was not pending at all (in fact req_bytes was 0). The request is now completed only if it was pending already (req_bytes != 0) Signed-off-by: Stefano Panella <stefano.panella@citrix.com> Reviewed-by: Germano Percossi <germano.percossi@citrix.com>
If file '/etc/xenvm.d/VG_XenStorage-<UUID>' exists, the SR's allocation is 'dynamic' and 'xenvm' is called. If not, the normal lvm commands are used. Signed-off-by: Kostas Ladopoulos <konstantinos.ladopoulos@citrix.com> Reviewed-by: Jorge Martin <jorge.martin@citrix.com>
In case of unpause (resume) operation the -T and -q parameters are not passed and the ones from open/create should be used. This is saving in the vbd structure the xlvhd_allocation_quantum for future use during unpause. Signed-off-by: Stefano Panella <stefano.panella@citrix.com> Reviewed-by: Germano Percossi <germano.percossi@citrix.com>
Moved xenvm config files from /etc/xenvm.d to /var/run/nonpersistent/xenvm.d Signed-off-by: Chandrika Srinivasan <chandrika.srinivasan@citrix.com> Acked-by: Germano Percossi <germano.percossi@citrix.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a dump of all the internal code we had of implementing part of the xlvhd (the part that belongs
to tapdisk)