)]}'
{"nova/virt/libvirt/imagebackend.py":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"fff7fc9bdf875436ca3e1e7d59cac23bebdea00d","unresolved":false,"context_lines":[{"line_number":266,"context_line":"        can_fallocate \u003d getattr(self.__class__, \u0027can_fallocate\u0027, None)"},{"line_number":267,"context_line":"        if can_fallocate is None:"},{"line_number":268,"context_line":"            _out, err \u003d utils.trycmd(\u0027fallocate\u0027, \u0027-n\u0027, \u0027-l\u0027, \u00271\u0027,"},{"line_number":269,"context_line":"                                     self.path + \u0027.fallocate_test\u0027)"},{"line_number":270,"context_line":"            fileutils.delete_if_exists(self.path + \u0027.fallocate_test\u0027)"},{"line_number":271,"context_line":"            can_fallocate \u003d not err"},{"line_number":272,"context_line":"            self.__class__.can_fallocate \u003d can_fallocate"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_fa261ab9","line":269,"updated":"2016-02-04 11:42:37.000000000","message":"Not strictly related to what you\u0027re fixing, but it\u0027s on your critical path. Have you actually tested that this works? I believe the above command will never succeed as it passes the \u0027-n\u0027 flag to fallocate, which fails if the file doesn\u0027t already exist, which in this case it doesn\u0027t. The result of this would be that we never preallocate anything in any circumstances.","commit_id":"66bb49bfbc7ccc82c0e4a86a9d0ea61b0f8c5627"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"68c3948152419ca831b0012cae0ee6c89c4df2aa","unresolved":false,"context_lines":[{"line_number":570,"context_line":"    def _preallocate(self, path, size):"},{"line_number":571,"context_line":"        # Ignore the passed size."},{"line_number":572,"context_line":"        # Qcow should have been metadata preallocated. Just need to"},{"line_number":573,"context_line":"        # fallocate on the reported size of the image."},{"line_number":574,"context_line":"        size \u003d os.path.getsize(path)"},{"line_number":575,"context_line":"        super(Qcow2, self)._preallocate(path, size)"},{"line_number":576,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa80f949_7f99f16d","line":573,"updated":"2015-11-04 09:56:47.000000000","message":"This is a change in semantics - the preallocate_images option is about reserving the full amount of space for an image.\n\nWe should probably *always* be doing preallocate of metadata, even when preallocate_images\u003dFalse, as that\u0027s a significant performance win for no significant disk space usage.\n\nWhen preallocate_image\u003d\u003dTrue though, we should be preallocating the full disk space for the qemu image, either with prealloc\u003dfull or prealloc\u003dfalloc.","commit_id":"66bb49bfbc7ccc82c0e4a86a9d0ea61b0f8c5627"},{"author":{"_account_id":18247,"name":"Mark Doffman","email":"mdoffman@linux.vnet.ibm.com","username":"doffm"},"change_message_id":"6171a8d80bec3ffafcca5ba8485731a207b9024e","unresolved":false,"context_lines":[{"line_number":570,"context_line":"    def _preallocate(self, path, size):"},{"line_number":571,"context_line":"        # Ignore the passed size."},{"line_number":572,"context_line":"        # Qcow should have been metadata preallocated. Just need to"},{"line_number":573,"context_line":"        # fallocate on the reported size of the image."},{"line_number":574,"context_line":"        size \u003d os.path.getsize(path)"},{"line_number":575,"context_line":"        super(Qcow2, self)._preallocate(path, size)"},{"line_number":576,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa80f949_d7c8f976","line":573,"in_reply_to":"fa80f949_7f99f16d","updated":"2015-11-04 14:34:34.000000000","message":"The preallocate \u0027falloc\u0027 and \u0027full\u0027 versions have only been available since v2.1.0 is that correct?\n\nI\u0027d be more than happy to switch on metadata preallocation permanently since it seems like a performance improvement for little overhead.\n\nWhat I was trying to do here though is make sure that the full space for the image is reserved without relying on version v2.1.0 of qemu-img.\n\nWhen \u0027preallocation\u003dmetadata\u0027 is used the full size of the image is reported without being reserved. After the image is created using \u0027preallocation metadata\u0027 it is fallocated in the usual way using the reported size of that image. This ensures that the fallocate is big enough to hold the image and the metadata. (Correct reservation of space)","commit_id":"66bb49bfbc7ccc82c0e4a86a9d0ea61b0f8c5627"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"4db427ce1ff8c65d34cccae88c35e841a4a6fe14","unresolved":false,"context_lines":[{"line_number":570,"context_line":"    def _preallocate(self, path, size):"},{"line_number":571,"context_line":"        # Ignore the passed size."},{"line_number":572,"context_line":"        # Qcow should have been metadata preallocated. Just need to"},{"line_number":573,"context_line":"        # fallocate on the reported size of the image."},{"line_number":574,"context_line":"        size \u003d os.path.getsize(path)"},{"line_number":575,"context_line":"        super(Qcow2, self)._preallocate(path, size)"},{"line_number":576,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa80f949_ac19438a","line":573,"in_reply_to":"fa80f949_d7c8f976","updated":"2015-11-05 11:10:59.000000000","message":"\u003e The preallocate \u0027falloc\u0027 and \u0027full\u0027 versions have only been available since v2.1.0 is that correct?\n\nIt was introduced in v2.2.0 and above, looking at QEMU Git for that commit[1] that introduced it:\n\n    $ git tag --contains 0e4271b | head -1\n    v2.2.0\n\n[1] http://git.qemu.org/?p\u003dqemu.git;a\u003dcommit;h\u003d0e4271b","commit_id":"66bb49bfbc7ccc82c0e4a86a9d0ea61b0f8c5627"},{"author":{"_account_id":18247,"name":"Mark Doffman","email":"mdoffman@linux.vnet.ibm.com","username":"doffm"},"change_message_id":"6171a8d80bec3ffafcca5ba8485731a207b9024e","unresolved":false,"context_lines":[{"line_number":572,"context_line":"        # Qcow should have been metadata preallocated. Just need to"},{"line_number":573,"context_line":"        # fallocate on the reported size of the image."},{"line_number":574,"context_line":"        size \u003d os.path.getsize(path)"},{"line_number":575,"context_line":"        super(Qcow2, self)._preallocate(path, size)"},{"line_number":576,"context_line":""},{"line_number":577,"context_line":"    def resize_image(self, size):"},{"line_number":578,"context_line":"        image \u003d imgmodel.LocalFileImage(self.path, imgmodel.FORMAT_QCOW2)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa80f949_97883124","line":575,"updated":"2015-11-04 14:34:34.000000000","message":"Call to \u0027fallocate\u0027 takes place in the \u0027super\u0027 call based on the reported size of the image, which with metadata preallocation should be the full image + metadata size.","commit_id":"66bb49bfbc7ccc82c0e4a86a9d0ea61b0f8c5627"}]}
