)]}'
{"nova/virt/libvirt/connection.py":[{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"5a0ba5a146d446f4963bed207b56853c60a1bb29","unresolved":false,"context_lines":[{"line_number":851,"context_line":"                # naively copying the whole image file."},{"line_number":852,"context_line":"                if size:"},{"line_number":853,"context_line":"                    # FIXME(p-draigbrady) the first call here is probably"},{"line_number":854,"context_line":"                    # redundant, as it\u0027s of no benefit have full size in base?"},{"line_number":855,"context_line":"                    disk.extend(base, size)"},{"line_number":856,"context_line":"                    disk.extend(target, size)"},{"line_number":857,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEH%2F%2F8XA%3D","line":854,"updated":"2012-02-01 17:45:43.000000000","message":"potential issue: The base image is going to be named \u003cid\u003e_\u003csize\u003e, so it will be recopied every time. for different images.  If we are not using copy_on_write and we are extending the target, it seems like it would be way better to cache the image without the _size parameter and not extend the base image.  I think we could accomplish this by moving the \"_\u003csize\u003e\" append into this method and we will get even more efficiency without cow images.\n\nAnother optimization: for cow version we should always cache the unresized image as well. so we would download the image as \u003cid\u003e, then resize to \u003cid\u003e_size if cow is set. Then if we launch the image with a new size, we can resize \u003cid\u003e to \u003cid\u003e_size without redownloading.\n\nBasically i think it is like this.  Pass in name without size.  Grab the image.\ncow:\n if size is set, cp and resize in base to _\u003csize\u003e, then create cow image\nnotcow:\n cp image into target and resize\n\n(when we add the option to not cache we can just change the cp into a mv.)\n\nDoes that make sense:","commit_id":"d20b48bd9662a31918631ad1de2e25a6084046c7"},{"author":{"_account_id":1812,"name":"p-draigbrady","email":"P@draigBrady.com","username":"p-draigbrady"},"change_message_id":"da360068c79d34b825fe458a20decdbe2c28cdf6","unresolved":false,"context_lines":[{"line_number":851,"context_line":"                # naively copying the whole image file."},{"line_number":852,"context_line":"                if size:"},{"line_number":853,"context_line":"                    # FIXME(p-draigbrady) the first call here is probably"},{"line_number":854,"context_line":"                    # redundant, as it\u0027s of no benefit have full size in base?"},{"line_number":855,"context_line":"                    disk.extend(base, size)"},{"line_number":856,"context_line":"                    disk.extend(target, size)"},{"line_number":857,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAEH%2F%2F8SU%3D","line":854,"in_reply_to":"AAAAEH%2F%2F8XA%3D","updated":"2012-02-01 19:03:44.000000000","message":"That does clarify my FIXMEs. I.E. what is acceptable in _base.\n\nThis is a more extensive and separate change really though as it changes the contents of the cache, rather than just the I/O mechanisms.\nHow about I do this as a follow up patch (as it affects the cow case too).\n\nFor my reference, the logic presented above will use less space\n(albeit mostly sparse) for the the raw case, while the cow logic\nwill use more disk space, but minimize downloads.\nI.E. it will use extra space for the original downloaded image.\nI agree with these tradeoffs.","commit_id":"d20b48bd9662a31918631ad1de2e25a6084046c7"}]}
