)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"f44501c6a85b812971086576ac4fd3982ce952e6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"412a2460_03fb7290","updated":"2024-06-27 12:59:26.000000000","message":"Thanks for fixing this!  I know it sounds like a lot of overhead, but it would be helpful if you could file a bug and tag it for the netapp driver so that the netapp team is aware of the change (it will help you get more reviews).  Since it doesn\u0027t touch any of the netapp driver code, they may not notice this patch.  Don\u0027t forget to add \"Closes-bug: #xxxxx\" to the commit message of this patch.\n\nAlso, either in the bug or the commit message, it would be helpful to mention how far back \"newer\" goes version-wise for qemu-img with this flag, so it will be clear how far back this fix could be backported.  Thanks!","commit_id":"1ba53e8ad827007556199a52d4267b459fd86bab"},{"author":{"_account_id":13915,"name":"Silvan Kaiser","email":"silvan@quobyte.com","username":"kaisers"},"change_message_id":"5cf2db2fc436af0a2ab00ba032acf5638497bbca","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"07900ce8_7a7e82fd","updated":"2025-06-25 16:34:38.000000000","message":"run-quobyteci","commit_id":"e9fbbf7f029906d7413c5c0802665eb0935900e5"},{"author":{"_account_id":36538,"name":"Harsh Ailani","display_name":"Harsh Ailani","email":"harsh.ailani@ibm.com","username":"harshailani"},"change_message_id":"e841843043ee052b23cdda196dde392c2c82683e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"abafdd4a_fd2144fb","updated":"2025-07-16 10:10:32.000000000","message":"Changes look good.","commit_id":"979ccc3b4eb26ccce34f15d5429878a45a4637b4"},{"author":{"_account_id":38081,"name":"Anthony Galica","display_name":"agalica","email":"anthony.galica@hitachivantara.com","username":"agalica","status":"Hitachi Vantara"},"change_message_id":"27e208f466388b5ff3f627fd62746705dd6758de","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"a9cb9281_a8bb41c2","updated":"2025-10-31 16:43:57.000000000","message":"I think Eric\u0027s suggestion was a good one for a parameter.  +1 at this point.","commit_id":"979ccc3b4eb26ccce34f15d5429878a45a4637b4"},{"author":{"_account_id":9236,"name":"Jon Bernard","email":"jobernar@redhat.com","username":"jbernard"},"change_message_id":"0fcf45b89af00a6bf0b5ce275d9536e3a79fcb8e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"54e4c94a_5c878c8f","updated":"2025-07-24 02:05:22.000000000","message":"Looks okay to me.","commit_id":"979ccc3b4eb26ccce34f15d5429878a45a4637b4"},{"author":{"_account_id":13915,"name":"Silvan Kaiser","email":"silvan@quobyte.com","username":"kaisers"},"change_message_id":"54e8c2f27bda9889abe7fe4ecc6f76a9ade92ba4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"02a00d26_9552d827","updated":"2026-03-04 15:16:29.000000000","message":"run-Quobyte CI","commit_id":"979ccc3b4eb26ccce34f15d5429878a45a4637b4"},{"author":{"_account_id":13915,"name":"Silvan Kaiser","email":"silvan@quobyte.com","username":"kaisers"},"change_message_id":"08ec2a4e97057b5a38059015afb42de09bcd1e68","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"bfd5c330_3fbbbe5a","updated":"2026-03-13 15:17:21.000000000","message":"run-Quobyte CI","commit_id":"979ccc3b4eb26ccce34f15d5429878a45a4637b4"}],"cinder/image/image_utils.py":[{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"c9965a7abcad31fe1daf3cdbc27ec3e5942bf178","unresolved":true,"context_lines":[{"line_number":510,"context_line":"    \"\"\"Changes the virtual size of the image.\"\"\""},{"line_number":511,"context_line":"    cmd: tuple[str, ...]"},{"line_number":512,"context_line":"    if file_format:"},{"line_number":513,"context_line":"        cmd \u003d (\u0027qemu-img\u0027, \u0027resize\u0027, \u0027--shrink\u0027,"},{"line_number":514,"context_line":"               \u0027-f\u0027, file_format, source, \u0027%sG\u0027 % size)"},{"line_number":515,"context_line":"    else:"},{"line_number":516,"context_line":"        cmd \u003d (\u0027qemu-img\u0027, \u0027resize\u0027, \u0027--shrink\u0027, source, \u0027%sG\u0027 % size)"}],"source_content_type":"text/x-python","patch_set":4,"id":"687f3959_5dc20edf","line":513,"updated":"2024-06-27 15:10:34.000000000","message":"I wonder if we should add a flag to resize_image that only enables --shrink when needed -- accidentally using --shrink and the wrong image size from other contexts could lead to data loss.","commit_id":"1ba53e8ad827007556199a52d4267b459fd86bab"},{"author":{"_account_id":35111,"name":"Johannes Beisiegel","display_name":"jonnyb","email":"johannes.beisiegel@digits.schwarz","username":"jbe","status":"STACKIT"},"change_message_id":"447a042af2c21b13448438ba6e30f2ca1a6fbbe5","unresolved":true,"context_lines":[{"line_number":510,"context_line":"    \"\"\"Changes the virtual size of the image.\"\"\""},{"line_number":511,"context_line":"    cmd: tuple[str, ...]"},{"line_number":512,"context_line":"    if file_format:"},{"line_number":513,"context_line":"        cmd \u003d (\u0027qemu-img\u0027, \u0027resize\u0027, \u0027--shrink\u0027,"},{"line_number":514,"context_line":"               \u0027-f\u0027, file_format, source, \u0027%sG\u0027 % size)"},{"line_number":515,"context_line":"    else:"},{"line_number":516,"context_line":"        cmd \u003d (\u0027qemu-img\u0027, \u0027resize\u0027, \u0027--shrink\u0027, source, \u0027%sG\u0027 % size)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1d6435d5_aa56dc51","line":513,"in_reply_to":"079831ea_4dbb0bc8","updated":"2025-07-08 11:27:12.000000000","message":"Added allow_shrink parameter and a test for this.","commit_id":"1ba53e8ad827007556199a52d4267b459fd86bab"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"19465cdc6be890c3504f4590213ae5a6534c772a","unresolved":true,"context_lines":[{"line_number":510,"context_line":"    \"\"\"Changes the virtual size of the image.\"\"\""},{"line_number":511,"context_line":"    cmd: tuple[str, ...]"},{"line_number":512,"context_line":"    if file_format:"},{"line_number":513,"context_line":"        cmd \u003d (\u0027qemu-img\u0027, \u0027resize\u0027, \u0027--shrink\u0027,"},{"line_number":514,"context_line":"               \u0027-f\u0027, file_format, source, \u0027%sG\u0027 % size)"},{"line_number":515,"context_line":"    else:"},{"line_number":516,"context_line":"        cmd \u003d (\u0027qemu-img\u0027, \u0027resize\u0027, \u0027--shrink\u0027, source, \u0027%sG\u0027 % size)"}],"source_content_type":"text/x-python","patch_set":4,"id":"079831ea_4dbb0bc8","line":513,"in_reply_to":"687f3959_5dc20edf","updated":"2025-06-25 22:28:42.000000000","message":"This should really be a parameter to resize_image here rather than done by default.","commit_id":"1ba53e8ad827007556199a52d4267b459fd86bab"},{"author":{"_account_id":30555,"name":"Fernando Ferraz","display_name":"Fernando Ferraz","email":"fesilva@redhat.com","username":"fernandoperches"},"change_message_id":"8d8c60fee7a7967c3757ebfbe0a8255394b0220a","unresolved":true,"context_lines":[{"line_number":568,"context_line":"                 size: int,"},{"line_number":569,"context_line":"                 run_as_root: bool \u003d False,"},{"line_number":570,"context_line":"                 file_format: Optional[str] \u003d None,"},{"line_number":571,"context_line":"                 allow_shrink: bool \u003d False) -\u003e None:"},{"line_number":572,"context_line":"    \"\"\"Changes the virtual size of the image.\"\"\""},{"line_number":573,"context_line":"    cmd: tuple[str, ...]"},{"line_number":574,"context_line":"    cmd \u003d (\u0027qemu-img\u0027, \u0027resize\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"c1047534_e4a4346a","line":571,"updated":"2025-11-07 14:26:25.000000000","message":"I would suggest replacing with Optional[bool] \u003d False, as you have a default set for the shrink param.","commit_id":"979ccc3b4eb26ccce34f15d5429878a45a4637b4"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"bb5dda979d1fb5a4d62e524d69802b1d305c092e","unresolved":true,"context_lines":[{"line_number":568,"context_line":"                 size: int,"},{"line_number":569,"context_line":"                 run_as_root: bool \u003d False,"},{"line_number":570,"context_line":"                 file_format: Optional[str] \u003d None,"},{"line_number":571,"context_line":"                 allow_shrink: bool \u003d False) -\u003e None:"},{"line_number":572,"context_line":"    \"\"\"Changes the virtual size of the image.\"\"\""},{"line_number":573,"context_line":"    cmd: tuple[str, ...]"},{"line_number":574,"context_line":"    cmd \u003d (\u0027qemu-img\u0027, \u0027resize\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"45300a9a_dc65d388","line":571,"in_reply_to":"c1047534_e4a4346a","updated":"2025-11-07 16:54:15.000000000","message":"That would allow passing None in, which I think we don\u0027t want. Defaulting to False is fine.","commit_id":"979ccc3b4eb26ccce34f15d5429878a45a4637b4"}],"cinder/volume/drivers/netapp/dataontap/nfs_base.py":[{"author":{"_account_id":36171,"name":"jayaanand borra","display_name":"jayaanand borra","email":"jayaanand.borra@netapp.com","username":"jayaanan","status":"netapp"},"change_message_id":"1a74c01a1dce2ca13b7bae04fd3675311bd5f1e0","unresolved":true,"context_lines":[{"line_number":803,"context_line":"            image_utils.resize_image(path, new_size,"},{"line_number":804,"context_line":"                                     run_as_root\u003dself._execute_as_root,"},{"line_number":805,"context_line":"                                     file_format\u003dfile_format,"},{"line_number":806,"context_line":"                                     allow_shrink\u003dTrue)"},{"line_number":807,"context_line":"            if file_format \u003d\u003d \u0027qcow2\u0027 and not self._is_file_size_equal("},{"line_number":808,"context_line":"                    path, new_size):"},{"line_number":809,"context_line":"                raise exception.InvalidResults("}],"source_content_type":"text/x-python","patch_set":6,"id":"a74f0731_f8854260","line":806,"updated":"2026-04-08 13:51:42.000000000","message":"I think you can change to allow_shrink: bool \u003d False to _resize_image_file() and pass True only from _post_clone_image()","commit_id":"979ccc3b4eb26ccce34f15d5429878a45a4637b4"},{"author":{"_account_id":30555,"name":"Fernando Ferraz","display_name":"Fernando Ferraz","email":"fesilva@redhat.com","username":"fernandoperches"},"change_message_id":"67aab927e82ba7127312f0552f0e49e0f1457add","unresolved":true,"context_lines":[{"line_number":803,"context_line":"            image_utils.resize_image(path, new_size,"},{"line_number":804,"context_line":"                                     run_as_root\u003dself._execute_as_root,"},{"line_number":805,"context_line":"                                     file_format\u003dfile_format,"},{"line_number":806,"context_line":"                                     allow_shrink\u003dTrue)"},{"line_number":807,"context_line":"            if file_format \u003d\u003d \u0027qcow2\u0027 and not self._is_file_size_equal("},{"line_number":808,"context_line":"                    path, new_size):"},{"line_number":809,"context_line":"                raise exception.InvalidResults("}],"source_content_type":"text/x-python","patch_set":6,"id":"e13aa574_7c34ac03","line":806,"updated":"2025-11-07 14:44:37.000000000","message":"Shrinking an image may result in data loss; I believe that is the reason why qemu requires the shrink option to be explicitly enforced. Since this changes the expected behavior and may impact other environments, I suggest creating a driver option for enforcing shrink, allowing operators to opt for it.","commit_id":"979ccc3b4eb26ccce34f15d5429878a45a4637b4"},{"author":{"_account_id":38059,"name":"Anoop Kumar Shukla","display_name":"Anoop Shukla","email":"anoop.shukla@netapp.com","username":"anoop2","status":"NetApp"},"change_message_id":"8a1f534a596a596a0c8b464c6c25e5bca1427a28","unresolved":true,"context_lines":[{"line_number":803,"context_line":"            image_utils.resize_image(path, new_size,"},{"line_number":804,"context_line":"                                     run_as_root\u003dself._execute_as_root,"},{"line_number":805,"context_line":"                                     file_format\u003dfile_format,"},{"line_number":806,"context_line":"                                     allow_shrink\u003dTrue)"},{"line_number":807,"context_line":"            if file_format \u003d\u003d \u0027qcow2\u0027 and not self._is_file_size_equal("},{"line_number":808,"context_line":"                    path, new_size):"},{"line_number":809,"context_line":"                raise exception.InvalidResults("}],"source_content_type":"text/x-python","patch_set":6,"id":"a5e1c61d_d84f7915","line":806,"in_reply_to":"20806f4a_7dfd8d53","updated":"2026-03-12 13:06:40.000000000","message":"We are passing allow_shrink as default true. Shouldnt we pass allow_shrink to true only if the new size is less than old size?","commit_id":"979ccc3b4eb26ccce34f15d5429878a45a4637b4"},{"author":{"_account_id":35111,"name":"Johannes Beisiegel","display_name":"jonnyb","email":"johannes.beisiegel@digits.schwarz","username":"jbe","status":"STACKIT"},"change_message_id":"3b4bf9d1ccc99c22686c274b47b99bdedd54021c","unresolved":true,"context_lines":[{"line_number":803,"context_line":"            image_utils.resize_image(path, new_size,"},{"line_number":804,"context_line":"                                     run_as_root\u003dself._execute_as_root,"},{"line_number":805,"context_line":"                                     file_format\u003dfile_format,"},{"line_number":806,"context_line":"                                     allow_shrink\u003dTrue)"},{"line_number":807,"context_line":"            if file_format \u003d\u003d \u0027qcow2\u0027 and not self._is_file_size_equal("},{"line_number":808,"context_line":"                    path, new_size):"},{"line_number":809,"context_line":"                raise exception.InvalidResults("}],"source_content_type":"text/x-python","patch_set":6,"id":"c4e253db_f822003c","line":806,"in_reply_to":"a5e1c61d_d84f7915","updated":"2026-04-13 08:23:49.000000000","message":"allow_shrink defaults to False","commit_id":"979ccc3b4eb26ccce34f15d5429878a45a4637b4"},{"author":{"_account_id":35111,"name":"Johannes Beisiegel","display_name":"jonnyb","email":"johannes.beisiegel@digits.schwarz","username":"jbe","status":"STACKIT"},"change_message_id":"fba82fc02f6ea1455701e78bead10e8873a57b5b","unresolved":true,"context_lines":[{"line_number":803,"context_line":"            image_utils.resize_image(path, new_size,"},{"line_number":804,"context_line":"                                     run_as_root\u003dself._execute_as_root,"},{"line_number":805,"context_line":"                                     file_format\u003dfile_format,"},{"line_number":806,"context_line":"                                     allow_shrink\u003dTrue)"},{"line_number":807,"context_line":"            if file_format \u003d\u003d \u0027qcow2\u0027 and not self._is_file_size_equal("},{"line_number":808,"context_line":"                    path, new_size):"},{"line_number":809,"context_line":"                raise exception.InvalidResults("}],"source_content_type":"text/x-python","patch_set":6,"id":"20806f4a_7dfd8d53","line":806,"in_reply_to":"c0e89416_2cd8fff1","updated":"2026-03-05 12:28:12.000000000","message":"I dont think this should be a configuration option, this is solely an internal driver issue. This shrink will only applied on a new volume which is freshly created from a cached image. The cached image can be too big if the first clone was from a big volume. (eg image is 1G -\u003e first volume is 10G -\u003e image cache is a sparse 10G file). At this point no data can be lost by shrinking since no additional data is in the cached image. I understand that the *actual* fix would be how the cached clone is created but this would require a lot other refactoring.","commit_id":"979ccc3b4eb26ccce34f15d5429878a45a4637b4"},{"author":{"_account_id":38059,"name":"Anoop Kumar Shukla","display_name":"Anoop Shukla","email":"anoop.shukla@netapp.com","username":"anoop2","status":"NetApp"},"change_message_id":"ddf703b62be611058c13815a6f744da42e10a4da","unresolved":true,"context_lines":[{"line_number":803,"context_line":"            image_utils.resize_image(path, new_size,"},{"line_number":804,"context_line":"                                     run_as_root\u003dself._execute_as_root,"},{"line_number":805,"context_line":"                                     file_format\u003dfile_format,"},{"line_number":806,"context_line":"                                     allow_shrink\u003dTrue)"},{"line_number":807,"context_line":"            if file_format \u003d\u003d \u0027qcow2\u0027 and not self._is_file_size_equal("},{"line_number":808,"context_line":"                    path, new_size):"},{"line_number":809,"context_line":"                raise exception.InvalidResults("}],"source_content_type":"text/x-python","patch_set":6,"id":"c0e89416_2cd8fff1","line":806,"in_reply_to":"e13aa574_7c34ac03","updated":"2026-03-05 11:49:02.000000000","message":"Agreed that this should be allowed with a configuration so that customers do not accidentally lose the data. Please look at the KB article here: \n\nhttps://kb.netapp.com/on-prem/ontap/Ontap_OS/OS-KBs/What_are_the_guidelines_to_be_followed_while_shrinking_LUNs","commit_id":"979ccc3b4eb26ccce34f15d5429878a45a4637b4"}]}
