)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":20599,"name":"Jason Dillaman","email":"dillaman@redhat.com","username":"dillaman"},"change_message_id":"d2d4519dc5dabd0ad6d44fdc1431c2cdff3e82d3","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     tianqing \u003ctianqing@unitedstack.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-02-10 09:43:17 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"add hole when uploading rbd image"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently, we do not check hole when uploading rbd image."},{"line_number":10,"context_line":"So add the logic to check that."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"fa31d9ce_7683ce04","line":7,"updated":"2017-02-13 16:14:39.000000000","message":"Support sparse uploads to RBD images","commit_id":"794f58713310ccfde87e1a65eed9144148cdf1de"}],"glance_store/_drivers/rbd.py":[{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"bb5af227aaa7074f1cef4fa8792f5ace0cda7f05","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":"Currently, the glance use python binding to do with rbd."},{"line_number":82,"context_line":"So the upload image will fill zero to a hole, and it will"},{"line_number":83,"context_line":"wast space. So we should check the hole by ourselves."},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"There are two way to check hole:"},{"line_number":86,"context_line":"One is read n, check n."}],"source_content_type":"text/x-python","patch_set":8,"id":"1a430d35_4b4ed8c1","line":83,"range":{"start_line":83,"start_character":0,"end_line":83,"end_character":11},"updated":"2017-02-08 14:52:29.000000000","message":"This implies there\u0027s a bug but there\u0027s no corresponding bug report for this. Please file one.","commit_id":"f10aae411f0430f363e44381aa8bcdeafc2fc8f9"},{"author":{"_account_id":12484,"name":"jazeltq","email":"tianqing@unitedstack.com","username":"litianqing"},"change_message_id":"467ea8c512da1abda74dfbce294da6fa9897625c","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":"Currently, the glance use python binding to do with rbd."},{"line_number":82,"context_line":"So the upload image will fill zero to a hole, and it will"},{"line_number":83,"context_line":"wast space. So we should check the hole by ourselves."},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"There are two way to check hole:"},{"line_number":86,"context_line":"One is read n, check n."}],"source_content_type":"text/x-python","patch_set":8,"id":"1a430d35_20b34f0b","line":83,"range":{"start_line":83,"start_character":0,"end_line":83,"end_character":11},"in_reply_to":"1a430d35_4b4ed8c1","updated":"2017-02-09 02:36:04.000000000","message":"You can have a look on this http://tracker.ceph.com/issues/17178","commit_id":"f10aae411f0430f363e44381aa8bcdeafc2fc8f9"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"bb5af227aaa7074f1cef4fa8792f5ace0cda7f05","unresolved":false,"context_lines":[{"line_number":82,"context_line":"So the upload image will fill zero to a hole, and it will"},{"line_number":83,"context_line":"wast space. So we should check the hole by ourselves."},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"There are two way to check hole:"},{"line_number":86,"context_line":"One is read n, check n."},{"line_number":87,"context_line":"The another is read n, check m (where n \u003d am + b)"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a430d35_ebd304d3","line":85,"updated":"2017-02-08 14:52:29.000000000","message":"What is a hole?","commit_id":"f10aae411f0430f363e44381aa8bcdeafc2fc8f9"},{"author":{"_account_id":12484,"name":"jazeltq","email":"tianqing@unitedstack.com","username":"litianqing"},"change_message_id":"467ea8c512da1abda74dfbce294da6fa9897625c","unresolved":false,"context_lines":[{"line_number":82,"context_line":"So the upload image will fill zero to a hole, and it will"},{"line_number":83,"context_line":"wast space. So we should check the hole by ourselves."},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"There are two way to check hole:"},{"line_number":86,"context_line":"One is read n, check n."},{"line_number":87,"context_line":"The another is read n, check m (where n \u003d am + b)"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a430d35_20fd0f6e","line":85,"in_reply_to":"1a430d35_ebd304d3","updated":"2017-02-09 02:36:04.000000000","message":"A file hole is a portion of a regular file that contains null characters and is not stored in any data block on disk.\nYou can have a look on https://linux.die.net/man/5/srec_binary","commit_id":"f10aae411f0430f363e44381aa8bcdeafc2fc8f9"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"bb5af227aaa7074f1cef4fa8792f5ace0cda7f05","unresolved":false,"context_lines":[{"line_number":515,"context_line":"                                tmp \u003d j"},{"line_number":516,"context_line":"                                j \u003d min(j + self.CHECK_EXTENT, chunk_length)"},{"line_number":517,"context_line":"                                # not hole"},{"line_number":518,"context_line":"                                if cmp(memoryview(chunk[tmp:j]).tobytes(),"},{"line_number":519,"context_line":"                                       \"\\x00\" * (j - tmp)):"},{"line_number":520,"context_line":"                                    image.write(chunk[tmp:j], offset)"},{"line_number":521,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a430d35_eb0ea48a","line":518,"updated":"2017-02-08 14:52:29.000000000","message":"Why do you need to use a memoryview here to retrieve bytes from the chunk? That seems like you\u0027re creating unnecessary objects to create new objects from the slice.\n\nFurther, why are you using the `cmp` function here? That\u0027s not appropriate and it\u0027s likely not doing what you expect.","commit_id":"f10aae411f0430f363e44381aa8bcdeafc2fc8f9"},{"author":{"_account_id":12484,"name":"jazeltq","email":"tianqing@unitedstack.com","username":"litianqing"},"change_message_id":"467ea8c512da1abda74dfbce294da6fa9897625c","unresolved":false,"context_lines":[{"line_number":515,"context_line":"                                tmp \u003d j"},{"line_number":516,"context_line":"                                j \u003d min(j + self.CHECK_EXTENT, chunk_length)"},{"line_number":517,"context_line":"                                # not hole"},{"line_number":518,"context_line":"                                if cmp(memoryview(chunk[tmp:j]).tobytes(),"},{"line_number":519,"context_line":"                                       \"\\x00\" * (j - tmp)):"},{"line_number":520,"context_line":"                                    image.write(chunk[tmp:j], offset)"},{"line_number":521,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1a430d35_e062273d","line":518,"in_reply_to":"1a430d35_eb0ea48a","updated":"2017-02-09 02:36:04.000000000","message":"what\u0027s you prefer? just loop in chunk, and check one by one?","commit_id":"f10aae411f0430f363e44381aa8bcdeafc2fc8f9"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"bb5af227aaa7074f1cef4fa8792f5ace0cda7f05","unresolved":false,"context_lines":[{"line_number":516,"context_line":"                                j \u003d min(j + self.CHECK_EXTENT, chunk_length)"},{"line_number":517,"context_line":"                                # not hole"},{"line_number":518,"context_line":"                                if cmp(memoryview(chunk[tmp:j]).tobytes(),"},{"line_number":519,"context_line":"                                       \"\\x00\" * (j - tmp)):"},{"line_number":520,"context_line":"                                    image.write(chunk[tmp:j], offset)"},{"line_number":521,"context_line":""},{"line_number":522,"context_line":"                                checksum.update(chunk[tmp:j])"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a430d35_0b71300f","line":519,"range":{"start_line":519,"start_character":49,"end_line":519,"end_character":56},"updated":"2017-02-08 14:52:29.000000000","message":"There\u0027s no check here to ensure that this won\u0027t be a negative number (e.g., `tmp \u003e j`)","commit_id":"f10aae411f0430f363e44381aa8bcdeafc2fc8f9"},{"author":{"_account_id":12484,"name":"jazeltq","email":"tianqing@unitedstack.com","username":"litianqing"},"change_message_id":"467ea8c512da1abda74dfbce294da6fa9897625c","unresolved":false,"context_lines":[{"line_number":516,"context_line":"                                j \u003d min(j + self.CHECK_EXTENT, chunk_length)"},{"line_number":517,"context_line":"                                # not hole"},{"line_number":518,"context_line":"                                if cmp(memoryview(chunk[tmp:j]).tobytes(),"},{"line_number":519,"context_line":"                                       \"\\x00\" * (j - tmp)):"},{"line_number":520,"context_line":"                                    image.write(chunk[tmp:j], offset)"},{"line_number":521,"context_line":""},{"line_number":522,"context_line":"                                checksum.update(chunk[tmp:j])"}],"source_content_type":"text/x-python","patch_set":8,"id":"1a430d35_c0436bad","line":519,"range":{"start_line":519,"start_character":49,"end_line":519,"end_character":56},"in_reply_to":"1a430d35_0b71300f","updated":"2017-02-09 02:36:04.000000000","message":"j \u003d min(j +self.CHECK_EXTENT, chunk_length), if the old j is \u003e chunk_length, then it will not in the loop.","commit_id":"f10aae411f0430f363e44381aa8bcdeafc2fc8f9"},{"author":{"_account_id":20599,"name":"Jason Dillaman","email":"dillaman@redhat.com","username":"dillaman"},"change_message_id":"d2d4519dc5dabd0ad6d44fdc1431c2cdff3e82d3","unresolved":false,"context_lines":[{"line_number":47,"context_line":"DEFAULT_USER \u003d None    # let librados decide based on the Ceph conf file"},{"line_number":48,"context_line":"DEFAULT_CHUNKSIZE \u003d 8  # in MiB"},{"line_number":49,"context_line":"DEFAULT_SNAPNAME \u003d \u0027snap\u0027"},{"line_number":50,"context_line":"DEFAULT_CHUNK_EXTENT_SIZE \u003d 1024  # in KB"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":53,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"fa31d9ce_cb47731b","line":50,"updated":"2017-02-13 16:14:39.000000000","message":"Perhaps it would have more meaning to refer to this as the \"sparse size\" -- that is the term most commonly used (i.e. qemu-img -S xyz). Same comment applies below for the actual config option name.","commit_id":"794f58713310ccfde87e1a65eed9144148cdf1de"},{"author":{"_account_id":12484,"name":"jazeltq","email":"tianqing@unitedstack.com","username":"litianqing"},"change_message_id":"7f2d24713907dbe98253d82090a63245325db606","unresolved":false,"context_lines":[{"line_number":47,"context_line":"DEFAULT_USER \u003d None    # let librados decide based on the Ceph conf file"},{"line_number":48,"context_line":"DEFAULT_CHUNKSIZE \u003d 8  # in MiB"},{"line_number":49,"context_line":"DEFAULT_SNAPNAME \u003d \u0027snap\u0027"},{"line_number":50,"context_line":"DEFAULT_CHUNK_EXTENT_SIZE \u003d 1024  # in KB"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":53,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"fa31d9ce_cb7037df","line":50,"in_reply_to":"fa31d9ce_cb47731b","updated":"2017-02-14 06:29:25.000000000","message":"Ok.","commit_id":"794f58713310ccfde87e1a65eed9144148cdf1de"},{"author":{"_account_id":20599,"name":"Jason Dillaman","email":"dillaman@redhat.com","username":"dillaman"},"change_message_id":"d2d4519dc5dabd0ad6d44fdc1431c2cdff3e82d3","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    cfg.IntOpt(\u0027rbd_store_chunk_extent_size\u0027,"},{"line_number":77,"context_line":"               default\u003dDEFAULT_CHUNK_EXTENT_SIZE,"},{"line_number":78,"context_line":"               help\u003d_(\"\"\""},{"line_number":79,"context_line":"The fineness we check the hole is in object."},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"Currently, the glance use python binding to do with rbd."},{"line_number":82,"context_line":"So the upload image will fill zero to a hole, and it will"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa31d9ce_2ba2cfae","line":79,"updated":"2017-02-13 16:14:39.000000000","message":"This description is pretty hard to understand. Perhaps something simpler like:\n\nSize, in kilobytes, for sparsifying uploaded images.\n\nIndicates the consecutive number of bytes that must contain only zeros for the RBD glance-store driver to create a sparse image during image creation.","commit_id":"794f58713310ccfde87e1a65eed9144148cdf1de"},{"author":{"_account_id":12484,"name":"jazeltq","email":"tianqing@unitedstack.com","username":"litianqing"},"change_message_id":"7f2d24713907dbe98253d82090a63245325db606","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    cfg.IntOpt(\u0027rbd_store_chunk_extent_size\u0027,"},{"line_number":77,"context_line":"               default\u003dDEFAULT_CHUNK_EXTENT_SIZE,"},{"line_number":78,"context_line":"               help\u003d_(\"\"\""},{"line_number":79,"context_line":"The fineness we check the hole is in object."},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"Currently, the glance use python binding to do with rbd."},{"line_number":82,"context_line":"So the upload image will fill zero to a hole, and it will"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa31d9ce_cb475775","line":79,"in_reply_to":"fa31d9ce_2ba2cfae","updated":"2017-02-14 06:29:25.000000000","message":"Ok. Your words is more simple and directive. Thanks...","commit_id":"794f58713310ccfde87e1a65eed9144148cdf1de"},{"author":{"_account_id":20599,"name":"Jason Dillaman","email":"dillaman@redhat.com","username":"dillaman"},"change_message_id":"d2d4519dc5dabd0ad6d44fdc1431c2cdff3e82d3","unresolved":false,"context_lines":[{"line_number":510,"context_line":"                                image.resize(length)"},{"line_number":511,"context_line":"                            LOG.debug(_(\"writing chunk at offset %s\") %"},{"line_number":512,"context_line":"                                      (offset))"},{"line_number":513,"context_line":"                            j \u003d 0"},{"line_number":514,"context_line":"                            while j \u003c chunk_length:"},{"line_number":515,"context_line":"                                tmp \u003d j"},{"line_number":516,"context_line":"                                j \u003d min(j + self.CHECK_EXTENT, chunk_length)"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa31d9ce_b04c6e43","line":513,"updated":"2017-02-13 16:14:39.000000000","message":"Use meaningful variable names here and below","commit_id":"794f58713310ccfde87e1a65eed9144148cdf1de"},{"author":{"_account_id":12484,"name":"jazeltq","email":"tianqing@unitedstack.com","username":"litianqing"},"change_message_id":"7f2d24713907dbe98253d82090a63245325db606","unresolved":false,"context_lines":[{"line_number":510,"context_line":"                                image.resize(length)"},{"line_number":511,"context_line":"                            LOG.debug(_(\"writing chunk at offset %s\") %"},{"line_number":512,"context_line":"                                      (offset))"},{"line_number":513,"context_line":"                            j \u003d 0"},{"line_number":514,"context_line":"                            while j \u003c chunk_length:"},{"line_number":515,"context_line":"                                tmp \u003d j"},{"line_number":516,"context_line":"                                j \u003d min(j + self.CHECK_EXTENT, chunk_length)"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa31d9ce_2b571327","line":513,"in_reply_to":"fa31d9ce_b04c6e43","updated":"2017-02-14 06:29:25.000000000","message":"Ok. Use start, and end instead of tmp and j..","commit_id":"794f58713310ccfde87e1a65eed9144148cdf1de"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"68cf3f3bb1e8b3a1c829668021619e3a1725f0f3","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    cfg.IntOpt(\u0027rbd_store_sparse_size\u0027,"},{"line_number":77,"context_line":"               default\u003dDEFAULT_SPARSE_SIZE,"},{"line_number":78,"context_line":"               help\u003d_(\"\"\""},{"line_number":79,"context_line":"Size, in kilobytes, for sparsifying uploaded images."},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"Indicates the consecutive number of bytes that must"},{"line_number":82,"context_line":"contain only zeros for the RBD glance-store driver"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa31d9ce_4bd35104","line":79,"updated":"2017-02-14 15:00:57.000000000","message":"Let\u0027s rewrite this to\n\n    Size in kilobytes that determines if this is a sparse image.\n\n    The specified size indicates the consecutive number of\n    zero bytes that will cause the Ceph/RBD driver to create\n    the image as a \"sparse\" image.","commit_id":"b4280e28ee4bf0b9ec37e9d4f44d1ab6fa52a430"},{"author":{"_account_id":12484,"name":"jazeltq","email":"tianqing@unitedstack.com","username":"litianqing"},"change_message_id":"55677ec5699fad2fffdd3a90defefddbe347b342","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    cfg.IntOpt(\u0027rbd_store_sparse_size\u0027,"},{"line_number":77,"context_line":"               default\u003dDEFAULT_SPARSE_SIZE,"},{"line_number":78,"context_line":"               help\u003d_(\"\"\""},{"line_number":79,"context_line":"Size, in kilobytes, for sparsifying uploaded images."},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"Indicates the consecutive number of bytes that must"},{"line_number":82,"context_line":"contain only zeros for the RBD glance-store driver"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa31d9ce_28be07ff","line":79,"in_reply_to":"fa31d9ce_4bd35104","updated":"2017-02-15 06:54:42.000000000","message":"All right. Thank you.","commit_id":"b4280e28ee4bf0b9ec37e9d4f44d1ab6fa52a430"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"68cf3f3bb1e8b3a1c829668021619e3a1725f0f3","unresolved":false,"context_lines":[{"line_number":83,"context_line":"to create a sparse image during image creation."},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"Possible Values:"},{"line_number":86,"context_line":"     * Any positive interger value less than rbd_store_chunk_size"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"Related options:"},{"line_number":89,"context_line":"     * rbd_store_chunk_size"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa31d9ce_abd68dee","line":86,"updated":"2017-02-14 15:00:57.000000000","message":"Nit: *integer* not *interger*","commit_id":"b4280e28ee4bf0b9ec37e9d4f44d1ab6fa52a430"},{"author":{"_account_id":12484,"name":"jazeltq","email":"tianqing@unitedstack.com","username":"litianqing"},"change_message_id":"55677ec5699fad2fffdd3a90defefddbe347b342","unresolved":false,"context_lines":[{"line_number":83,"context_line":"to create a sparse image during image creation."},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"Possible Values:"},{"line_number":86,"context_line":"     * Any positive interger value less than rbd_store_chunk_size"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"Related options:"},{"line_number":89,"context_line":"     * rbd_store_chunk_size"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa31d9ce_683abf9a","line":86,"in_reply_to":"fa31d9ce_abd68dee","updated":"2017-02-15 06:54:42.000000000","message":"Oh. My fault. Thank you.","commit_id":"b4280e28ee4bf0b9ec37e9d4f44d1ab6fa52a430"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"68cf3f3bb1e8b3a1c829668021619e3a1725f0f3","unresolved":false,"context_lines":[{"line_number":308,"context_line":"            self.chunk_size \u003d chunk * units.Mi"},{"line_number":309,"context_line":"            self.READ_CHUNKSIZE \u003d self.chunk_size"},{"line_number":310,"context_line":"            self.WRITE_CHUNKSIZE \u003d self.READ_CHUNKSIZE"},{"line_number":311,"context_line":"            sparse_size \u003d self.conf.glance_store.rbd_store_sparse_size"},{"line_number":312,"context_line":"            self.SPARSE_SIZE \u003d sparse_size * units.Ki"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"            # these must not be unicode since they will be passed to a"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa31d9ce_6bf7358b","line":311,"updated":"2017-02-14 15:00:57.000000000","message":"There should be an assertion that matches the \"Possible Values\" description above (namely that it\u0027s less than the chunk size).","commit_id":"b4280e28ee4bf0b9ec37e9d4f44d1ab6fa52a430"},{"author":{"_account_id":12484,"name":"jazeltq","email":"tianqing@unitedstack.com","username":"litianqing"},"change_message_id":"55677ec5699fad2fffdd3a90defefddbe347b342","unresolved":false,"context_lines":[{"line_number":308,"context_line":"            self.chunk_size \u003d chunk * units.Mi"},{"line_number":309,"context_line":"            self.READ_CHUNKSIZE \u003d self.chunk_size"},{"line_number":310,"context_line":"            self.WRITE_CHUNKSIZE \u003d self.READ_CHUNKSIZE"},{"line_number":311,"context_line":"            sparse_size \u003d self.conf.glance_store.rbd_store_sparse_size"},{"line_number":312,"context_line":"            self.SPARSE_SIZE \u003d sparse_size * units.Ki"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"            # these must not be unicode since they will be passed to a"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa31d9ce_c85acbf1","line":311,"in_reply_to":"fa31d9ce_6bf7358b","updated":"2017-02-15 06:54:42.000000000","message":"If the value is bigger than chunk size, we will use chunk size as the sparse_size.","commit_id":"b4280e28ee4bf0b9ec37e9d4f44d1ab6fa52a430"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"68cf3f3bb1e8b3a1c829668021619e3a1725f0f3","unresolved":false,"context_lines":[{"line_number":507,"context_line":"                                end \u003d min(start + self.SPARSE_SIZE,"},{"line_number":508,"context_line":"                                          chunk_length)"},{"line_number":509,"context_line":"                                # not hole"},{"line_number":510,"context_line":"                                if memoryview(chunk[start:end]).tobytes() !\u003d \\"},{"line_number":511,"context_line":"                                        \"\\x00\" * (end - start):"},{"line_number":512,"context_line":"                                    image.write(chunk[start:end], offset)"},{"line_number":513,"context_line":"                                # after we write, or ingore write,"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa31d9ce_0b8159c3","line":510,"updated":"2017-02-14 15:00:57.000000000","message":"chunk is already a bytes object. Again, I ask why we\u0027re converting a slice of it to a memoryview and then back to bytes. You didn\u0027t answer this before. All you should need is `chunk[start:end]`.","commit_id":"b4280e28ee4bf0b9ec37e9d4f44d1ab6fa52a430"},{"author":{"_account_id":12484,"name":"jazeltq","email":"tianqing@unitedstack.com","username":"litianqing"},"change_message_id":"55677ec5699fad2fffdd3a90defefddbe347b342","unresolved":false,"context_lines":[{"line_number":507,"context_line":"                                end \u003d min(start + self.SPARSE_SIZE,"},{"line_number":508,"context_line":"                                          chunk_length)"},{"line_number":509,"context_line":"                                # not hole"},{"line_number":510,"context_line":"                                if memoryview(chunk[start:end]).tobytes() !\u003d \\"},{"line_number":511,"context_line":"                                        \"\\x00\" * (end - start):"},{"line_number":512,"context_line":"                                    image.write(chunk[start:end], offset)"},{"line_number":513,"context_line":"                                # after we write, or ingore write,"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa31d9ce_2b9fe15f","line":510,"in_reply_to":"fa31d9ce_0b8159c3","updated":"2017-02-15 06:54:42.000000000","message":"en... U are right. It is my fault. Thank you.","commit_id":"b4280e28ee4bf0b9ec37e9d4f44d1ab6fa52a430"},{"author":{"_account_id":24849,"name":"yao ning","email":"zay11022@163.com","username":"mslovy"},"change_message_id":"395d8b330b4a094310f71ba5d40b3dd77920dda6","unresolved":false,"context_lines":[{"line_number":307,"context_line":"            self.chunk_size \u003d chunk * units.Mi"},{"line_number":308,"context_line":"            self.READ_CHUNKSIZE \u003d self.chunk_size"},{"line_number":309,"context_line":"            self.WRITE_CHUNKSIZE \u003d self.READ_CHUNKSIZE"},{"line_number":310,"context_line":"            sparse_size \u003d self.conf.glance_store.rbd_store_sparse_size"},{"line_number":311,"context_line":"            self.SPARSE_SIZE \u003d sparse_size * units.Ki"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"            # these must not be unicode since they will be passed to a"}],"source_content_type":"text/x-python","patch_set":18,"id":"ff0f0b1f_d27901c8","line":310,"range":{"start_line":310,"start_character":12,"end_line":310,"end_character":70},"updated":"2017-05-24 08:05:49.000000000","message":"why we need sparse_size variable? no use except in \"self.SPARSE_SIZE \u003d\"","commit_id":"09f81d807d5b94a254753ad388a5cf07c71bc97f"},{"author":{"_account_id":24849,"name":"yao ning","email":"zay11022@163.com","username":"mslovy"},"change_message_id":"395d8b330b4a094310f71ba5d40b3dd77920dda6","unresolved":false,"context_lines":[{"line_number":308,"context_line":"            self.READ_CHUNKSIZE \u003d self.chunk_size"},{"line_number":309,"context_line":"            self.WRITE_CHUNKSIZE \u003d self.READ_CHUNKSIZE"},{"line_number":310,"context_line":"            sparse_size \u003d self.conf.glance_store.rbd_store_sparse_size"},{"line_number":311,"context_line":"            self.SPARSE_SIZE \u003d sparse_size * units.Ki"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"            # these must not be unicode since they will be passed to a"},{"line_number":314,"context_line":"            # non-unicode-aware C library"}],"source_content_type":"text/x-python","patch_set":18,"id":"ff0f0b1f_6d2b7682","line":311,"range":{"start_line":311,"start_character":12,"end_line":311,"end_character":28},"updated":"2017-05-24 08:05:49.000000000","message":"what if the SPARSE_SIZE is negative or zero.  I think we need some branch to consider those cases in function \"def add()\"  and as well as in the unittest case","commit_id":"09f81d807d5b94a254753ad388a5cf07c71bc97f"},{"author":{"_account_id":24849,"name":"yao ning","email":"zay11022@163.com","username":"mslovy"},"change_message_id":"395d8b330b4a094310f71ba5d40b3dd77920dda6","unresolved":false,"context_lines":[{"line_number":505,"context_line":"                            while start \u003c chunk_length:"},{"line_number":506,"context_line":"                                end \u003d min(start + self.SPARSE_SIZE,"},{"line_number":507,"context_line":"                                          chunk_length)"},{"line_number":508,"context_line":"                                # not hole"},{"line_number":509,"context_line":"                                if chunk[start:end] !\u003d \\"},{"line_number":510,"context_line":"                                        b\u0027\\x00\u0027 * (end - start):"},{"line_number":511,"context_line":"                                    image.write(chunk[start:end], offset)"}],"source_content_type":"text/x-python","patch_set":18,"id":"ff0f0b1f_d2b46182","line":508,"range":{"start_line":508,"start_character":0,"end_line":508,"end_character":42},"updated":"2017-05-24 08:05:49.000000000","message":"I think comment here is  unnecessary.  maybe we need LOG.debug something instead to trace the process is working properly","commit_id":"09f81d807d5b94a254753ad388a5cf07c71bc97f"},{"author":{"_account_id":24849,"name":"yao ning","email":"zay11022@163.com","username":"mslovy"},"change_message_id":"395d8b330b4a094310f71ba5d40b3dd77920dda6","unresolved":false,"context_lines":[{"line_number":507,"context_line":"                                          chunk_length)"},{"line_number":508,"context_line":"                                # not hole"},{"line_number":509,"context_line":"                                if chunk[start:end] !\u003d \\"},{"line_number":510,"context_line":"                                        b\u0027\\x00\u0027 * (end - start):"},{"line_number":511,"context_line":"                                    image.write(chunk[start:end], offset)"},{"line_number":512,"context_line":"                                # after we write, or ingore write,"},{"line_number":513,"context_line":"                                # we add the offset."}],"source_content_type":"text/x-python","patch_set":18,"id":"ff0f0b1f_527cd1ea","line":510,"range":{"start_line":510,"start_character":51,"end_line":510,"end_character":62},"updated":"2017-05-24 08:05:49.000000000","message":"use end - start mutiple times,  so can we use a variable to instead?","commit_id":"09f81d807d5b94a254753ad388a5cf07c71bc97f"},{"author":{"_account_id":24849,"name":"yao ning","email":"zay11022@163.com","username":"mslovy"},"change_message_id":"395d8b330b4a094310f71ba5d40b3dd77920dda6","unresolved":false,"context_lines":[{"line_number":509,"context_line":"                                if chunk[start:end] !\u003d \\"},{"line_number":510,"context_line":"                                        b\u0027\\x00\u0027 * (end - start):"},{"line_number":511,"context_line":"                                    image.write(chunk[start:end], offset)"},{"line_number":512,"context_line":"                                # after we write, or ingore write,"},{"line_number":513,"context_line":"                                # we add the offset."},{"line_number":514,"context_line":"                                offset +\u003d (end - start)"},{"line_number":515,"context_line":"                                start \u003d end"},{"line_number":516,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"ff0f0b1f_f2b9a578","line":513,"range":{"start_line":512,"start_character":0,"end_line":513,"end_character":52},"updated":"2017-05-24 08:05:49.000000000","message":"I think comment here is  unnecessary.  maybe we need LOG.debug something instead to trace the process is working properly","commit_id":"09f81d807d5b94a254753ad388a5cf07c71bc97f"},{"author":{"_account_id":24849,"name":"yao ning","email":"zay11022@163.com","username":"mslovy"},"change_message_id":"395d8b330b4a094310f71ba5d40b3dd77920dda6","unresolved":false,"context_lines":[{"line_number":517,"context_line":"                            checksum.update(chunk)"},{"line_number":518,"context_line":"                            if verifier:"},{"line_number":519,"context_line":"                                verifier.update(chunk)"},{"line_number":520,"context_line":""},{"line_number":521,"context_line":"                        if loc.snapshot:"},{"line_number":522,"context_line":"                            image.create_snap(loc.snapshot)"},{"line_number":523,"context_line":"                            image.protect_snap(loc.snapshot)"}],"source_content_type":"text/x-python","patch_set":18,"id":"ff0f0b1f_d206a152","line":520,"updated":"2017-05-24 08:05:49.000000000","message":"empty line here should be removed","commit_id":"09f81d807d5b94a254753ad388a5cf07c71bc97f"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"e6e421624a57debdff2e46ac3610057729137ba6","unresolved":false,"context_lines":[{"line_number":73,"context_line":"    * None"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"\"\"\")),"},{"line_number":76,"context_line":"    cfg.IntOpt(\u0027rbd_store_sparse_size\u0027,"},{"line_number":77,"context_line":"               default\u003dDEFAULT_SPARSE_SIZE,"},{"line_number":78,"context_line":"               min\u003d1,"},{"line_number":79,"context_line":"               help\u003d_(\"\"\""}],"source_content_type":"text/x-python","patch_set":26,"id":"7f231b9d_51319759","line":76,"range":{"start_line":76,"start_character":16,"end_line":76,"end_character":37},"updated":"2017-06-15 15:06:12.000000000","message":"Since a new config option is being added, a release note should be included with this change to let deployers know about the new setting.","commit_id":"6f2a82612f45085a238359a23eb30593fa492032"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"35f6875f0971a1a91d843cd3c5249fb41df3051e","unresolved":false,"context_lines":[{"line_number":500,"context_line":"                                LOG.debug(_(\"resizing image to %s KiB\") %"},{"line_number":501,"context_line":"                                          (length / units.Ki))"},{"line_number":502,"context_line":"                                image.resize(length)"},{"line_number":503,"context_line":"                            LOG.debug(_(\"writing chunk at offset %s\") %"},{"line_number":504,"context_line":"                                      (offset))"},{"line_number":505,"context_line":"                            start \u003d 0"},{"line_number":506,"context_line":"                            while start \u003c chunk_length:"}],"source_content_type":"text/x-python","patch_set":33,"id":"1f1a1f67_d1fdbf6e","line":503,"updated":"2017-07-17 10:59:44.000000000","message":"shouldn\u0027t we move this to line 515?cause we do not write chunks in some cases","commit_id":"044184d8a01d49353b749be273c94dd1261ac18d"},{"author":{"_account_id":12484,"name":"jazeltq","email":"tianqing@unitedstack.com","username":"litianqing"},"change_message_id":"b82aa56c849e7c3ff03cedecf695ab8347d1d43c","unresolved":false,"context_lines":[{"line_number":500,"context_line":"                                LOG.debug(_(\"resizing image to %s KiB\") %"},{"line_number":501,"context_line":"                                          (length / units.Ki))"},{"line_number":502,"context_line":"                                image.resize(length)"},{"line_number":503,"context_line":"                            LOG.debug(_(\"writing chunk at offset %s\") %"},{"line_number":504,"context_line":"                                      (offset))"},{"line_number":505,"context_line":"                            start \u003d 0"},{"line_number":506,"context_line":"                            while start \u003c chunk_length:"}],"source_content_type":"text/x-python","patch_set":33,"id":"1f1a1f67_c60bab27","line":503,"in_reply_to":"1f1a1f67_d1fdbf6e","updated":"2017-07-18 03:00:46.000000000","message":"agree","commit_id":"044184d8a01d49353b749be273c94dd1261ac18d"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"35f6875f0971a1a91d843cd3c5249fb41df3051e","unresolved":false,"context_lines":[{"line_number":507,"context_line":"                                end \u003d min(start + self.SPARSE_SIZE,"},{"line_number":508,"context_line":"                                          chunk_length)"},{"line_number":509,"context_line":"                                length \u003d end - start"},{"line_number":510,"context_line":"                                if chunk[start:end] !\u003d b\u0027\\x00\u0027 * length:"},{"line_number":511,"context_line":"                                    LOG.debug("},{"line_number":512,"context_line":"                                        _(\"write to %(off)s: %(len)s bytes\") %"},{"line_number":513,"context_line":"                                        {\u0027off\u0027: offset,"}],"source_content_type":"text/x-python","patch_set":33,"id":"1f1a1f67_1108d78f","line":510,"updated":"2017-07-17 10:59:44.000000000","message":"where do we store \"hole\" information? i mean position ans number of zeroed bytes.","commit_id":"044184d8a01d49353b749be273c94dd1261ac18d"},{"author":{"_account_id":12484,"name":"jazeltq","email":"tianqing@unitedstack.com","username":"litianqing"},"change_message_id":"b82aa56c849e7c3ff03cedecf695ab8347d1d43c","unresolved":false,"context_lines":[{"line_number":507,"context_line":"                                end \u003d min(start + self.SPARSE_SIZE,"},{"line_number":508,"context_line":"                                          chunk_length)"},{"line_number":509,"context_line":"                                length \u003d end - start"},{"line_number":510,"context_line":"                                if chunk[start:end] !\u003d b\u0027\\x00\u0027 * length:"},{"line_number":511,"context_line":"                                    LOG.debug("},{"line_number":512,"context_line":"                                        _(\"write to %(off)s: %(len)s bytes\") %"},{"line_number":513,"context_line":"                                        {\u0027off\u0027: offset,"}],"source_content_type":"text/x-python","patch_set":33,"id":"1f1a1f67_c674cbd1","line":510,"in_reply_to":"1f1a1f67_1108d78f","updated":"2017-07-18 03:00:46.000000000","message":"we do not store hole information.","commit_id":"044184d8a01d49353b749be273c94dd1261ac18d"},{"author":{"_account_id":20599,"name":"Jason Dillaman","email":"dillaman@redhat.com","username":"dillaman"},"change_message_id":"8aacb8968417ce180b874f10c0f3f3e638511116","unresolved":false,"context_lines":[{"line_number":507,"context_line":"                                end \u003d min(start + self.SPARSE_SIZE,"},{"line_number":508,"context_line":"                                          chunk_length)"},{"line_number":509,"context_line":"                                length \u003d end - start"},{"line_number":510,"context_line":"                                if chunk[start:end] !\u003d b\u0027\\x00\u0027 * length:"},{"line_number":511,"context_line":"                                    LOG.debug("},{"line_number":512,"context_line":"                                        _(\"write to %(off)s: %(len)s bytes\") %"},{"line_number":513,"context_line":"                                        {\u0027off\u0027: offset,"}],"source_content_type":"text/x-python","patch_set":33,"id":"1f1a1f67_2587e7b7","line":510,"in_reply_to":"1f1a1f67_8eb5bd80","updated":"2017-07-18 11:59:27.000000000","message":"RBD images are naturally sparse and the sparse holes are naturally zeroed if they have never been written to or have been discarded. Therefore, if you detect that a chunk is all zeroes, you can safely skip writing it and any attempt to read that chunk from the backing RBD image would still return zeroes.","commit_id":"044184d8a01d49353b749be273c94dd1261ac18d"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"bcf368da12755b6307417760931fcb15fa72f545","unresolved":false,"context_lines":[{"line_number":507,"context_line":"                                end \u003d min(start + self.SPARSE_SIZE,"},{"line_number":508,"context_line":"                                          chunk_length)"},{"line_number":509,"context_line":"                                length \u003d end - start"},{"line_number":510,"context_line":"                                if chunk[start:end] !\u003d b\u0027\\x00\u0027 * length:"},{"line_number":511,"context_line":"                                    LOG.debug("},{"line_number":512,"context_line":"                                        _(\"write to %(off)s: %(len)s bytes\") %"},{"line_number":513,"context_line":"                                        {\u0027off\u0027: offset,"}],"source_content_type":"text/x-python","patch_set":33,"id":"1f1a1f67_8eb5bd80","line":510,"in_reply_to":"1f1a1f67_c674cbd1","updated":"2017-07-18 11:00:38.000000000","message":"ok, now i\u0027m confused even more. if i open wiki text in release note I see\n\"In computer science, a sparse file is a type of computer file that attempts to use file system space more efficiently when the file itself is mostly empty. This is achieved by writing brief information (metadata) representing the empty blocks to disk instead of the actual \"empty\" space which makes up the block, using less disk space.\" how you are going to restore file if we do not store hole metadata or i missed something?","commit_id":"044184d8a01d49353b749be273c94dd1261ac18d"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"35f6875f0971a1a91d843cd3c5249fb41df3051e","unresolved":false,"context_lines":[{"line_number":514,"context_line":"                                         \u0027len\u0027: length})"},{"line_number":515,"context_line":"                                    image.write(chunk[start:end], offset)"},{"line_number":516,"context_line":""},{"line_number":517,"context_line":"                                offset +\u003d length"},{"line_number":518,"context_line":"                                start \u003d end"},{"line_number":519,"context_line":""},{"line_number":520,"context_line":"                            checksum.update(chunk)"}],"source_content_type":"text/x-python","patch_set":33,"id":"1f1a1f67_b11003aa","line":517,"updated":"2017-07-17 10:59:44.000000000","message":"i guess we don\u0027t need sum here cause we do not write zero chunk to rbd. so if zero chunk happened we must not addd length here. Please correct me if i am missing something.","commit_id":"044184d8a01d49353b749be273c94dd1261ac18d"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"bcf368da12755b6307417760931fcb15fa72f545","unresolved":false,"context_lines":[{"line_number":514,"context_line":"                                         \u0027len\u0027: length})"},{"line_number":515,"context_line":"                                    image.write(chunk[start:end], offset)"},{"line_number":516,"context_line":""},{"line_number":517,"context_line":"                                offset +\u003d length"},{"line_number":518,"context_line":"                                start \u003d end"},{"line_number":519,"context_line":""},{"line_number":520,"context_line":"                            checksum.update(chunk)"}],"source_content_type":"text/x-python","patch_set":33,"id":"1f1a1f67_e2444549","line":517,"in_reply_to":"1f1a1f67_a67d4fb3","updated":"2017-07-18 11:00:38.000000000","message":"then we get the following:\n1 chunk(non-zero):\n4 kb written\noffset\u003d4000\n2 chunk(zero):\nno info written to rbd\noffset\u003d8000\n3 chunk\n4 kb written\noffset\u003d12000\n^ i have no info what will be between 4000 an 8000. it is implementation dependent and it smells like bug.\nI also found that we should n\u0027t do resize if we do not write chunk to rbd.","commit_id":"044184d8a01d49353b749be273c94dd1261ac18d"},{"author":{"_account_id":12484,"name":"jazeltq","email":"tianqing@unitedstack.com","username":"litianqing"},"change_message_id":"b82aa56c849e7c3ff03cedecf695ab8347d1d43c","unresolved":false,"context_lines":[{"line_number":514,"context_line":"                                         \u0027len\u0027: length})"},{"line_number":515,"context_line":"                                    image.write(chunk[start:end], offset)"},{"line_number":516,"context_line":""},{"line_number":517,"context_line":"                                offset +\u003d length"},{"line_number":518,"context_line":"                                start \u003d end"},{"line_number":519,"context_line":""},{"line_number":520,"context_line":"                            checksum.update(chunk)"}],"source_content_type":"text/x-python","patch_set":33,"id":"1f1a1f67_a67d4fb3","line":517,"in_reply_to":"1f1a1f67_b11003aa","updated":"2017-07-18 03:00:46.000000000","message":"Then the data will be in a mess......the (offset,data) should not be changed here, whether it is zero chunk or not.....","commit_id":"044184d8a01d49353b749be273c94dd1261ac18d"},{"author":{"_account_id":20599,"name":"Jason Dillaman","email":"dillaman@redhat.com","username":"dillaman"},"change_message_id":"8aacb8968417ce180b874f10c0f3f3e638511116","unresolved":false,"context_lines":[{"line_number":514,"context_line":"                                         \u0027len\u0027: length})"},{"line_number":515,"context_line":"                                    image.write(chunk[start:end], offset)"},{"line_number":516,"context_line":""},{"line_number":517,"context_line":"                                offset +\u003d length"},{"line_number":518,"context_line":"                                start \u003d end"},{"line_number":519,"context_line":""},{"line_number":520,"context_line":"                            checksum.update(chunk)"}],"source_content_type":"text/x-python","patch_set":33,"id":"1f1a1f67_a5c417f6","line":517,"in_reply_to":"1f1a1f67_e2444549","updated":"2017-07-18 11:59:27.000000000","message":"This is the RBD driver not a general implementation. This is how RBD functions by design.","commit_id":"044184d8a01d49353b749be273c94dd1261ac18d"}],"glance_store/tests/unit/test_rbd_store.py":[{"author":{"_account_id":24849,"name":"yao ning","email":"zay11022@163.com","username":"mslovy"},"change_message_id":"395d8b330b4a094310f71ba5d40b3dd77920dda6","unresolved":false,"context_lines":[{"line_number":201,"context_line":"                self.assertFalse(write.called)"},{"line_number":202,"context_line":"                self.assertEqual(ret[1], self.data_len)"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    def test_add_w_rbd_image_sparse_more(self):"},{"line_number":205,"context_line":"        \"\"\"Assert the image write is not called when it is sparse.\"\"\""},{"line_number":206,"context_line":"        self.store.chunk_size \u003d 2 * units.Ki"},{"line_number":207,"context_line":"        # If the sparse is bigger than chunk size, it should also work."}],"source_content_type":"text/x-python","patch_set":18,"id":"ff0f0b1f_cd6722e9","line":204,"range":{"start_line":204,"start_character":3,"end_line":204,"end_character":47},"updated":"2017-05-24 08:05:49.000000000","message":"can we merge those two test as one test?","commit_id":"09f81d807d5b94a254753ad388a5cf07c71bc97f"},{"author":{"_account_id":24849,"name":"yao ning","email":"zay11022@163.com","username":"mslovy"},"change_message_id":"395d8b330b4a094310f71ba5d40b3dd77920dda6","unresolved":false,"context_lines":[{"line_number":206,"context_line":"        self.store.chunk_size \u003d 2 * units.Ki"},{"line_number":207,"context_line":"        # If the sparse is bigger than chunk size, it should also work."},{"line_number":208,"context_line":"        self.store.SPARSE_SIZE \u003d 5 * units.Ki"},{"line_number":209,"context_line":"        self.data_iter \u003d six.BytesIO(b\u0027\\x00\u0027 * self.data_len)"},{"line_number":210,"context_line":"        with mock.patch.object(rbd_store.rbd.Image, \u0027resize\u0027) as resize:"},{"line_number":211,"context_line":"            with mock.patch.object(rbd_store.rbd.Image, \u0027write\u0027) as write:"},{"line_number":212,"context_line":"                ret \u003d self.store.add(\u0027fake_image_id\u0027, self.data_iter, 0)"}],"source_content_type":"text/x-python","patch_set":18,"id":"ff0f0b1f_6d87f663","line":209,"range":{"start_line":209,"start_character":8,"end_line":209,"end_character":61},"updated":"2017-05-24 08:05:49.000000000","message":"I think we need more general test case, with data and holes at the same time.  And verify how many times the \"write\" function is called.","commit_id":"09f81d807d5b94a254753ad388a5cf07c71bc97f"}],"releasenotes/notes/add-rbd-image-hole-check-5f66a12a4a92c820.yaml":[{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"1170ae8420a6b2c42c397ca8b821d964f5b52465","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Add hole check to rbd image. When create image and use rbd as backend,"},{"line_number":5,"context_line":"    glance_store did not check the hole in the file, and will consume more"},{"line_number":6,"context_line":"    time and space. After adding the hole check, glance_store will skip"},{"line_number":7,"context_line":"    the hole. So time and space will be saved."}],"source_content_type":"text/x-yaml","patch_set":28,"id":"5f201791_e3b24ce6","line":4,"range":{"start_line":4,"start_character":8,"end_line":4,"end_character":12},"updated":"2017-06-23 16:10:52.000000000","message":"Not sure on the use of the word \"hole\" to describe this. I think that may be confusing. Maybe \"blank\" may be a better choice.\n\n\"When create image\" would also be better as \"When creating an image\".","commit_id":"8345f8d4ec766573f1a890ee845ae9665e507ca1"},{"author":{"_account_id":24849,"name":"yao ning","email":"zay11022@163.com","username":"mslovy"},"change_message_id":"b4dc11ea81cde9f8e25682f74e8bfebe675434f1","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Add hole check to rbd image. When create image and use rbd as backend,"},{"line_number":5,"context_line":"    glance_store did not check the hole in the file, and will consume more"},{"line_number":6,"context_line":"    time and space. After adding the hole check, glance_store will skip"},{"line_number":7,"context_line":"    the hole. So time and space will be saved."}],"source_content_type":"text/x-yaml","patch_set":28,"id":"5f201791_b35d5d7a","line":4,"range":{"start_line":4,"start_character":8,"end_line":4,"end_character":12},"in_reply_to":"5f201791_e3b24ce6","updated":"2017-06-28 03:08:06.000000000","message":"please refer to https://en.wikipedia.org/wiki/Sparse_file\n\nIn storage area and filesystems, the holes mean a sparse file without real data chunks/extents (that means no extents allocated such as in ext4 filesystem) so that when we read this file, it return zeros. However, zeros mean the file is not a sparse file and with real data  chunks/extents, which means those extents is really allocated in inodes or metadata and fill it with all zeros. So when we read this file, it also return zeros, but it already consumes the disk spaces.  That\u0027s it.","commit_id":"8345f8d4ec766573f1a890ee845ae9665e507ca1"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"1170ae8420a6b2c42c397ca8b821d964f5b52465","unresolved":false,"context_lines":[{"line_number":7,"context_line":"    the hole. So time and space will be saved."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"    One configure option ``rbd_store_sparse_size`` is added. This value will"},{"line_number":10,"context_line":"    specifiy  the granularity to check whether the block is in hole."}],"source_content_type":"text/x-yaml","patch_set":28,"id":"5f201791_63787c29","line":10,"range":{"start_line":10,"start_character":4,"end_line":10,"end_character":12},"updated":"2017-06-23 16:10:52.000000000","message":"specify\n\nExtra space after as well.","commit_id":"8345f8d4ec766573f1a890ee845ae9665e507ca1"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"8cbb981253af2ff4cc41eb2951a57b5e9036539c","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Add hole (refer to: https://en.wikipedia.org/wiki/Sparse_file)"},{"line_number":5,"context_line":"    check to rbd image. When create image and use rbd as backend,"},{"line_number":6,"context_line":"    glance_store did not check the hole in the file, and will consume more"},{"line_number":7,"context_line":"    time and space. After adding the hole check, glance_store will skip"},{"line_number":8,"context_line":"    the hole. So time and space will be saved."}],"source_content_type":"text/x-yaml","patch_set":30,"id":"3f1d235d_afe01bce","line":5,"range":{"start_line":5,"start_character":24,"end_line":5,"end_character":41},"updated":"2017-07-07 23:31:09.000000000","message":"When creating an image","commit_id":"b73e85922f81c713c0dad9208ac15ef25514998c"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"8cbb981253af2ff4cc41eb2951a57b5e9036539c","unresolved":false,"context_lines":[{"line_number":8,"context_line":"    the hole. So time and space will be saved."},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"    One configure option ``rbd_store_sparse_size`` is added. This value will"},{"line_number":11,"context_line":"    specifiy the granularity to check whether the block is in hole."}],"source_content_type":"text/x-yaml","patch_set":30,"id":"3f1d235d_6fea03ad","line":11,"range":{"start_line":11,"start_character":4,"end_line":11,"end_character":12},"updated":"2017-07-07 23:31:09.000000000","message":"specify","commit_id":"b73e85922f81c713c0dad9208ac15ef25514998c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"844ee5061ac18b06e59b90e91b87eb0c130a02b9","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Add hole (refer to: https://en.wikipedia.org/wiki/Sparse_file)"},{"line_number":5,"context_line":"    check to rbd image. When creating image and use rbd as backend,"},{"line_number":6,"context_line":"    glance_store did not check the hole in the file, and will consume more"},{"line_number":7,"context_line":"    time and space. After adding the hole check, glance_store will skip"},{"line_number":8,"context_line":"    the hole. So time and space will be saved."}],"source_content_type":"text/x-yaml","patch_set":31,"id":"1f1a1f67_411a537d","line":5,"range":{"start_line":5,"start_character":48,"end_line":5,"end_character":51},"updated":"2017-07-13 15:49:12.000000000","message":"using","commit_id":"129bce7e9e2545c9e4b08aef56133a635ae428c9"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"844ee5061ac18b06e59b90e91b87eb0c130a02b9","unresolved":false,"context_lines":[{"line_number":7,"context_line":"    time and space. After adding the hole check, glance_store will skip"},{"line_number":8,"context_line":"    the hole. So time and space will be saved."},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"    One configure option ``rbd_store_sparse_size`` is added. This value will"},{"line_number":11,"context_line":"    specify the granularity to check whether the block is in hole."}],"source_content_type":"text/x-yaml","patch_set":31,"id":"1f1a1f67_81074b1d","line":10,"range":{"start_line":10,"start_character":8,"end_line":10,"end_character":17},"updated":"2017-07-13 15:49:12.000000000","message":"configuration","commit_id":"129bce7e9e2545c9e4b08aef56133a635ae428c9"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"844ee5061ac18b06e59b90e91b87eb0c130a02b9","unresolved":false,"context_lines":[{"line_number":8,"context_line":"    the hole. So time and space will be saved."},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"    One configure option ``rbd_store_sparse_size`` is added. This value will"},{"line_number":11,"context_line":"    specify the granularity to check whether the block is in hole."}],"source_content_type":"text/x-yaml","patch_set":31,"id":"1f1a1f67_bc126a57","line":11,"range":{"start_line":11,"start_character":45,"end_line":11,"end_character":66},"updated":"2017-07-13 15:49:12.000000000","message":"there is a hole in the block?","commit_id":"129bce7e9e2545c9e4b08aef56133a635ae428c9"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fdd065ce60d92c10a322e1f4aacd150dbbcc6363","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Add hole (refer to: https://en.wikipedia.org/wiki/Sparse_file)"}],"source_content_type":"text/x-yaml","patch_set":32,"id":"1f1a1f67_25b73ef9","line":1,"updated":"2017-07-14 13:47:35.000000000","message":"dunno if trailing spaces matter in a reno","commit_id":"558b46574df9d2688009356f1333f037920c858d"}]}
