)]}'
{"cinder/volume/drivers/rbd.py":[{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"b22080a0b3713db38b80aa33d84d18bc1d416193","unresolved":false,"context_lines":[{"line_number":661,"context_line":"                                    snapshot_volume_name, snapshot_name)"},{"line_number":662,"context_line":"        with RADOSClient(self) as client:"},{"line_number":663,"context_line":"            depth \u003d self._get_clone_depth(client, volume_name)"},{"line_number":664,"context_line":"        if self.configuration.rbd_flatten_volume_from_snapshot \\"},{"line_number":665,"context_line":"                or depth \u003d\u003d self.configuration.rbd_max_clone_depth:"},{"line_number":666,"context_line":"            self._flatten(self.configuration.rbd_pool, volume_name)"},{"line_number":667,"context_line":"        if int(volume.size):"},{"line_number":668,"context_line":"            self._resize(volume)"}],"source_content_type":"text/x-python","patch_set":1,"id":"da4df55a_65a3809f","line":665,"range":{"start_line":664,"start_character":8,"end_line":665,"end_character":66},"updated":"2016-12-22 06:37:24.000000000","message":"Your change looks like making flatten() less frequently than existing code, is that what you intend to do?","commit_id":"743ce372b313bdca7705b80cd6ffaab9c3e2d729"},{"author":{"_account_id":19919,"name":"Wenjun Wang","email":"wenjun_dev@126.com","username":"June"},"change_message_id":"10e7c244722b039d4f3eb0c003f731ac595dc249","unresolved":false,"context_lines":[{"line_number":661,"context_line":"                                    snapshot_volume_name, snapshot_name)"},{"line_number":662,"context_line":"        with RADOSClient(self) as client:"},{"line_number":663,"context_line":"            depth \u003d self._get_clone_depth(client, volume_name)"},{"line_number":664,"context_line":"        if self.configuration.rbd_flatten_volume_from_snapshot \\"},{"line_number":665,"context_line":"                or depth \u003d\u003d self.configuration.rbd_max_clone_depth:"},{"line_number":666,"context_line":"            self._flatten(self.configuration.rbd_pool, volume_name)"},{"line_number":667,"context_line":"        if int(volume.size):"},{"line_number":668,"context_line":"            self._resize(volume)"}],"source_content_type":"text/x-python","patch_set":1,"id":"da4df55a_e950fd0c","line":665,"range":{"start_line":664,"start_character":8,"end_line":665,"end_character":66},"in_reply_to":"da4df55a_65a3809f","updated":"2016-12-23 01:29:17.000000000","message":"I want to make flatten() more frequently than existing code, It\u0027s \"or\" not \"and\" in code, it will be work when rbd_flatten_volume_from_snapshot is false but clone depth become rbd_max_clone_depth, am I right?","commit_id":"743ce372b313bdca7705b80cd6ffaab9c3e2d729"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"2a6bda467ac6e5a925bf578eb4ef9b7b6495c9ce","unresolved":false,"context_lines":[{"line_number":651,"context_line":"                                    snapshot_volume_name, snapshot_name)"},{"line_number":652,"context_line":"        with RADOSClient(self) as client:"},{"line_number":653,"context_line":"            depth \u003d self._get_clone_depth(client, volume_name)"},{"line_number":654,"context_line":"        if self.configuration.rbd_flatten_volume_from_snapshot \\"},{"line_number":655,"context_line":"                or depth \u003d\u003d self.configuration.rbd_max_clone_depth:"},{"line_number":656,"context_line":"            self._flatten(self.configuration.rbd_pool, volume_name)"},{"line_number":657,"context_line":"        if int(volume.size):"}],"source_content_type":"text/x-python","patch_set":3,"id":"bff0334d_a82f9f9f","line":654,"range":{"start_line":654,"start_character":62,"end_line":654,"end_character":64},"updated":"2017-04-07 13:05:08.000000000","message":"Please don\u0027t use \\ for line continuation.","commit_id":"576de0f068cbceb3c58faf98cadd46d53b0b07ee"},{"author":{"_account_id":20403,"name":"Cheng Li","email":"shcli@cn.ibm.com","username":"Cheng"},"change_message_id":"8e185ac249fc2afbf31ac5c29196d565a6ee3ce1","unresolved":false,"context_lines":[{"line_number":653,"context_line":"            depth \u003d self._get_clone_depth(client, volume_name)"},{"line_number":654,"context_line":"        if self.configuration.rbd_flatten_volume_from_snapshot \\"},{"line_number":655,"context_line":"                or depth \u003d\u003d self.configuration.rbd_max_clone_depth:"},{"line_number":656,"context_line":"            self._flatten(self.configuration.rbd_pool, volume_name)"},{"line_number":657,"context_line":"        if int(volume.size):"},{"line_number":658,"context_line":"            self._resize(volume)"},{"line_number":659,"context_line":"        return volume_update"}],"source_content_type":"text/x-python","patch_set":3,"id":"5ff73747_2ca9bbde","line":656,"updated":"2017-04-22 04:41:40.000000000","message":"There are two options which decides if flatten or not.\n`rbd_max_clone_depth` and `rbd_flatten_volume_from_snapshot`\nrbd_max_clone_depth is used when creating new volume from source volume.\nrbd_flatten_volume_from_snapshot is used when creating new volume from snapshot.\n\nAs a user, if I set rbd_flatten_volume_from_snapshot\u003dfalse, then I will think flatten doesn\u0027t happen when I create volume from snapshot. But seems your patch will break this rule.\n\nInstead of flattening when creating volume from snapshot, I would suggest replace the `\u003d\u003d` with `\u003e\u003d` here[1]\n\n[1] https://github.com/openstack/cinder/blob/master/cinder/volume/drivers/rbd.py#L474","commit_id":"576de0f068cbceb3c58faf98cadd46d53b0b07ee"}]}
