)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b57f4e5306982d8626b91767f101bc796039ac03","unresolved":true,"context_lines":[{"line_number":11,"context_line":"fallocate/posix_fallocate."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Notably, this consolidates to a single source of truth for the"},{"line_number":14,"context_line":"FALLOCATE_RESERVE and FALLOCATE_IS_PERCENT globals once more, rather"},{"line_number":15,"context_line":"than defining them in libc and importing them (unused) in utils."},{"line_number":16,"context_line":"Previously, these two locations caused a bug that effectively disabled"},{"line_number":17,"context_line":"fallocate_reserve entirely, as the run-time check would use the former"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"d8cbce42_4de3de6d","line":14,"updated":"2023-08-15 22:45:07.000000000","message":"i mean is it any wonder they got moved given their naming and appearance to be \"just\" global constants?","commit_id":"408c9cc79986298bab59f42af0c78454f4c110b6"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"95f523799894344d0819220f69ca0c8135fd09e6","unresolved":false,"context_lines":[{"line_number":11,"context_line":"fallocate/posix_fallocate."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Notably, this consolidates to a single source of truth for the"},{"line_number":14,"context_line":"FALLOCATE_RESERVE and FALLOCATE_IS_PERCENT globals once more, rather"},{"line_number":15,"context_line":"than defining them in libc and importing them (unused) in utils."},{"line_number":16,"context_line":"Previously, these two locations caused a bug that effectively disabled"},{"line_number":17,"context_line":"fallocate_reserve entirely, as the run-time check would use the former"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"2948c3ec_69998e80","line":14,"in_reply_to":"41234cac_d55afba8","updated":"2023-10-02 19:35:59.000000000","message":"Done","commit_id":"408c9cc79986298bab59f42af0c78454f4c110b6"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"fe34de1ffded92c0d92f38c3627aa7e9b3c6bb26","unresolved":true,"context_lines":[{"line_number":11,"context_line":"fallocate/posix_fallocate."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Notably, this consolidates to a single source of truth for the"},{"line_number":14,"context_line":"FALLOCATE_RESERVE and FALLOCATE_IS_PERCENT globals once more, rather"},{"line_number":15,"context_line":"than defining them in libc and importing them (unused) in utils."},{"line_number":16,"context_line":"Previously, these two locations caused a bug that effectively disabled"},{"line_number":17,"context_line":"fallocate_reserve entirely, as the run-time check would use the former"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"41234cac_d55afba8","line":14,"in_reply_to":"d8cbce42_4de3de6d","updated":"2023-08-16 04:32:37.000000000","message":"I\u0027m not opposed to us getting things properly plumbed through, but that\u0027s much further down my priority list than fixing the (as yet unreleased) broken behavior.","commit_id":"408c9cc79986298bab59f42af0c78454f4c110b6"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"fc93c3b484bfa731824e6c4ff40e60ba732647e8","unresolved":true,"context_lines":[{"line_number":23,"context_line":"around the E release."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Update callers in diskfile to use fallocate_with_reserve, and plumb in"},{"line_number":26,"context_line":"fallocate_reserve configs explicitly."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Drive-by: Always report sizes in bytes in errors when the allocation"},{"line_number":29,"context_line":"would violate reserved space."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"fc29647b_fb0f3ed5","line":26,"updated":"2023-08-18 15:51:49.000000000","message":"Also need to update https://github.com/openstack/swift/blob/2.31.1/swift/common/db.py#L936 -- though getting the configs plumbed there may get interesting.","commit_id":"0dac30a06dc8ea2293fcec364e4f0c5333a93569"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0698425b113132ad6b34fa250cbebaba8727074d","unresolved":true,"context_lines":[{"line_number":23,"context_line":"around the E release."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Update callers in diskfile to use fallocate_with_reserve, and plumb in"},{"line_number":26,"context_line":"fallocate_reserve configs explicitly."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Drive-by: Always report sizes in bytes in errors when the allocation"},{"line_number":29,"context_line":"would violate reserved space."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"d80c6dbd_a5102e5a","line":26,"in_reply_to":"fc29647b_fb0f3ed5","updated":"2024-01-09 18:16:56.000000000","message":"oh, i missed this!","commit_id":"0dac30a06dc8ea2293fcec364e4f0c5333a93569"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"95f523799894344d0819220f69ca0c8135fd09e6","unresolved":true,"context_lines":[{"line_number":20,"context_line":"then calls fallocate_with_reserve with the FALLOCATE_RESERVE and"},{"line_number":21,"context_line":"FALLOCATE_IS_PERCENT globals; this is for the benefit of 3rd party"},{"line_number":22,"context_line":"code that might be relying on the old name. Plan for removal somewhere"},{"line_number":23,"context_line":"around the E release."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Update callers in diskfile to use fallocate_with_reserve, and plumb in"},{"line_number":26,"context_line":"fallocate_reserve configs explicitly."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"262a9dd3_2bba0026","line":23,"updated":"2023-10-02 19:35:59.000000000","message":"aside from our own monkey-patching of these globals do you know of any code (gizmo/scripts?) that were relying on these globals being where they are?\n\nI\u0027m sure most callers find the new interface much easier to consume","commit_id":"beb32cbfd92ca0ca15099c28b2620474a8f91411"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0698425b113132ad6b34fa250cbebaba8727074d","unresolved":false,"context_lines":[{"line_number":20,"context_line":"then calls fallocate_with_reserve with the FALLOCATE_RESERVE and"},{"line_number":21,"context_line":"FALLOCATE_IS_PERCENT globals; this is for the benefit of 3rd party"},{"line_number":22,"context_line":"code that might be relying on the old name. Plan for removal somewhere"},{"line_number":23,"context_line":"around the E release."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Update callers in diskfile to use fallocate_with_reserve, and plumb in"},{"line_number":26,"context_line":"fallocate_reserve configs explicitly."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"652be4a1_3a8cd478","line":23,"in_reply_to":"1e24c9da_423db596","updated":"2024-01-09 18:16:56.000000000","message":"Acknowledged","commit_id":"beb32cbfd92ca0ca15099c28b2620474a8f91411"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c35831a34191f5d027826d947d8e1622ac187fd6","unresolved":true,"context_lines":[{"line_number":20,"context_line":"then calls fallocate_with_reserve with the FALLOCATE_RESERVE and"},{"line_number":21,"context_line":"FALLOCATE_IS_PERCENT globals; this is for the benefit of 3rd party"},{"line_number":22,"context_line":"code that might be relying on the old name. Plan for removal somewhere"},{"line_number":23,"context_line":"around the E release."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Update callers in diskfile to use fallocate_with_reserve, and plumb in"},{"line_number":26,"context_line":"fallocate_reserve configs explicitly."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"1e24c9da_423db596","line":23,"in_reply_to":"262a9dd3_2bba0026","updated":"2023-10-02 20:01:34.000000000","message":"My assumption has been that most/all external code doesn\u0027t pay any attention to the fallocate settings at all.","commit_id":"beb32cbfd92ca0ca15099c28b2620474a8f91411"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"95f523799894344d0819220f69ca0c8135fd09e6","unresolved":true,"context_lines":[{"line_number":26,"context_line":"fallocate_reserve configs explicitly."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Drive-by: Always report sizes in bytes in errors when the allocation"},{"line_number":29,"context_line":"would violate reserved space."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"UpgradeImpact"},{"line_number":32,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"5e76ba50_bbe4f20f","line":29,"updated":"2023-10-02 19:35:59.000000000","message":"i\u0027m actually ok with this, reporting real bytes is more useful than percentages in error messages; reporting BOTH would be fine too I suppose, but more code and not needed IMHO","commit_id":"beb32cbfd92ca0ca15099c28b2620474a8f91411"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0698425b113132ad6b34fa250cbebaba8727074d","unresolved":false,"context_lines":[{"line_number":26,"context_line":"fallocate_reserve configs explicitly."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Drive-by: Always report sizes in bytes in errors when the allocation"},{"line_number":29,"context_line":"would violate reserved space."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"UpgradeImpact"},{"line_number":32,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"bd6c9634_deb1308b","line":29,"in_reply_to":"5e76ba50_bbe4f20f","updated":"2024-01-09 18:16:56.000000000","message":"apparently i\u0027ve waffled on this a bit:\n\n904870: Include % free when FALLOCATE_RESERVE fails | https://review.opendev.org/c/openstack/swift/+/904870","commit_id":"beb32cbfd92ca0ca15099c28b2620474a8f91411"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5c05cfb25bcd36c0e3f99db54089977cad30d858","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"db265361_7be638b4","updated":"2023-08-15 22:41:41.000000000","message":"I\u0027m onboard with everything going on here in principle.","commit_id":"f67bf2db953b49fa81b59fc7af592d80c83615b5"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"224f8d139a2f4e8a2ca4dd86b9e40ad4066aed79","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"f9c04af4_8337aaf6","updated":"2023-08-15 06:47:57.000000000","message":"There are obvously some pep issues to fix. But so far looking good.\n\nI\u0027ve pulled this off into a SAIO so having a play, but need to take the oldest out to gym.. so ran out of time. But will get back to testing this and the follow up in the morning while watching packages build.","commit_id":"f67bf2db953b49fa81b59fc7af592d80c83615b5"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1b4f005f4f882d75f36f13cdf0a3e8a0a263fd53","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"78949fe6_7bc0e10b","updated":"2023-08-17 15:07:48.000000000","message":"I think it\u0027s all ok in principle. The drive-by took me a lot more time to review than the reversion of fallocate to utils!\n\nThe tests all seem to have been relocated/replicated without omission.\n\nI\u0027d prefer some of the arg/var name and docstring changes to be reconsidered.","commit_id":"408c9cc79986298bab59f42af0c78454f4c110b6"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b57f4e5306982d8626b91767f101bc796039ac03","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"19f20056_09afe000","updated":"2023-08-15 22:45:07.000000000","message":"where was the functional testing gap that allowed us to break this in the first place?  a probe test could fill up a saio disk with just a few big files if it really wanted to.  We reset the entire disk after each test passes.  Maybe we\u0027d rather have that than a broken cluster full prevention feature?","commit_id":"408c9cc79986298bab59f42af0c78454f4c110b6"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"fe34de1ffded92c0d92f38c3627aa7e9b3c6bb26","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"fe200648_3edf19cd","in_reply_to":"19f20056_09afe000","updated":"2023-08-16 04:32:37.000000000","message":"We can fill up a typical SAIO\u0027s disks **too** easily; *that\u0027s* the trouble. See\n\n- https://bugs.launchpad.net/swift/+bug/1062969\n- https://docs.openstack.org/swift/latest/development_saio.html#known-issues and\n- https://github.com/openstack/swift/blob/2.31.1/doc/saio/swift/object-server/1.conf#L4\n\nMight be reasonable for us to disable fallocate for func tests, but keep it enabled for probe tests? Or have a particular probe test that hacks up the configs...","commit_id":"408c9cc79986298bab59f42af0c78454f4c110b6"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"95f523799894344d0819220f69ca0c8135fd09e6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"52b6386f_049926a4","updated":"2023-10-02 19:35:59.000000000","message":"I think I\u0027ve got it now.  I was confused about the difference between the \"check_free_space\" that the account/container servers were doing and the \"addition\" of fallocate_with_reserve\n\nIt seems like before this patch both a/c and diskfile got fallocate config that worked off the config via some global monkey patching in common.wsgi/dameon; while \u0027check_free_space\" always used explicit config values (DiskFileManager grew support for the explicit config with \u0027check_free_space\u0027 in the pre-req so that it could check POST/chunked-transfer)\n\nThis makes a/c and diskfile use the (pre-existing) explict config values for their fallocate calls - and removes the need for the global monkey patching (which now has no effect because no one uses that function).\n\nIt seems like this maybe needs a refresh ontop of the pre-req","commit_id":"beb32cbfd92ca0ca15099c28b2620474a8f91411"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c99bfc6148a37fc954ef48ba0810d5433d33f7bd","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"ca24adf5_37029881","updated":"2024-01-08 19:10:25.000000000","message":"I need to understand this test better","commit_id":"0f5cccfe0952c30a4203608391b347537b392950"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"28874659745ccb1104f8f2af35b707917acd7f13","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"a3288996_18591d8e","updated":"2023-10-02 20:25:03.000000000","message":"i think it\u0027s better - maybe better eough to call it a good stopping point","commit_id":"0f5cccfe0952c30a4203608391b347537b392950"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"a5930569b04c4d4ac72c4b84072b28d4445d0e03","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"9b9c00f2_771cae79","updated":"2023-10-16 18:59:01.000000000","message":"this does nothing as best we can tell!  love the explicit plumbing.\n\nmaybe someone will take a stab at removing the old interface monkey patching as a followup.","commit_id":"0f5cccfe0952c30a4203608391b347537b392950"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"6c065895276ce52458eb52bc37c14bf7737d036c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"1c10c53e_6f85f981","updated":"2024-01-08 22:11:12.000000000","message":"I appreciate the fix and the comment, but I think we should try and clean up these tests a bit more.","commit_id":"86212fd89a986c9d14f92bbf11303f4597412368"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"b017385304c3d14c0e08e4e86d6df70f03284851","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"8f46ecaf_c2649458","updated":"2024-01-11 12:01:35.000000000","message":"possibly unrelated but test coverage is lacking for the FALLOCATE_* setting:\n\n```\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d 8548 passed, 1 skipped, 23 warnings in 226.83s (0:03:46) \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\nError in atexit._run_exitfuncs:\nTraceback (most recent call last):\n  File \"/home/vagrant/.tox-swift/py38/lib/python3.8/site-packages/eventlet/greenthread.py\", line 36, in sleep\n    hub.switch()\n  File \"/home/vagrant/.tox-swift/py38/lib/python3.8/site-packages/eventlet/hubs/hub.py\", line 313, in switch\n    return self.greenlet.switch()\nswift.common.exceptions.ChunkReadTimeout: 9 seconds\n__________________________________________________________________________________ summary __________________________________________________________________________________\n  py38: commands succeeded\n  congratulations :)\n/home/vagrant/swift\nvagrant@vagrant:~/swift$ git diff\ndiff --git a/swift/common/wsgi.py b/swift/common/wsgi.py\nindex 93a4dad3d..42e462a30 100644\n--- a/swift/common/wsgi.py\n+++ b/swift/common/wsgi.py\n@@ -846,8 +846,8 @@ def check_config(conf_path, app_section, *args, **kwargs):\n         kwargs[\u0027global_conf_callback\u0027](conf, global_conf)\n\n     # set utils.FALLOCATE_RESERVE if desired\n-    utils.FALLOCATE_RESERVE, utils.FALLOCATE_IS_PERCENT \u003d \\\n-        utils.config_fallocate_value(conf.get(\u0027fallocate_reserve\u0027, \u00271%\u0027))\n+    # utils.FALLOCATE_RESERVE, utils.FALLOCATE_IS_PERCENT \u003d \\\n+    #     utils.config_fallocate_value(conf.get(\u0027fallocate_reserve\u0027, \u00271%\u0027))\n     return conf, logger, global_conf, strategy```","commit_id":"86212fd89a986c9d14f92bbf11303f4597412368"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"8a5fc003254de28f2e835dfeb47de9a92677c9ba","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"8e38598e_d6fc904b","updated":"2024-01-09 01:23:30.000000000","message":"recheck\n\n```\ntest/probe/test_container_merge_policy_index.py::TestReservedNamespaceMergePolicyIndex::test_reconciler_move_object_twice\n```\n\nhttps://bugs.launchpad.net/swift/+bug/2028175","commit_id":"86212fd89a986c9d14f92bbf11303f4597412368"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0698425b113132ad6b34fa250cbebaba8727074d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"c938f507_64274d98","updated":"2024-01-09 18:16:56.000000000","message":"resolve some comments to bring focus to where I want feedback","commit_id":"86212fd89a986c9d14f92bbf11303f4597412368"}],"swift/account/server.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"b017385304c3d14c0e08e4e86d6df70f03284851","unresolved":true,"context_lines":[{"line_number":114,"context_line":"            (\u0027fallocate_reserve\u0027, self.fallocate_reserve),"},{"line_number":115,"context_line":"            (\u0027fallocate_is_percent\u0027, self.fallocate_is_percent),"},{"line_number":116,"context_line":"        ):"},{"line_number":117,"context_line":"            kwargs.setdefault(key, value)"},{"line_number":118,"context_line":"        return AccountBroker(db_path, **kwargs)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def _deleted_response(self, broker, req, resp, body\u003d\u0027\u0027):"}],"source_content_type":"text/x-python","patch_set":7,"id":"8c5a1762_89dffe87","line":117,"updated":"2024-01-11 12:01:35.000000000","message":"ok, this seems good but I\u0027m still uncertain whether it was *necessary* given that wsgi is setting the vars in utils?","commit_id":"86212fd89a986c9d14f92bbf11303f4597412368"}],"swift/common/db.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"95f523799894344d0819220f69ca0c8135fd09e6","unresolved":true,"context_lines":[{"line_number":350,"context_line":"        :param fallocate_is_percent: if True, then fallocate_reserve is"},{"line_number":351,"context_line":"            treated as a percentage (0-100) of the filesystem\u0027s capacity;"},{"line_number":352,"context_line":"            if False, fallocate_reserve is a number of free bytes. Optional;"},{"line_number":353,"context_line":"            if omitted, defaults to utils.FALLOCATE_IS_PERCENT"},{"line_number":354,"context_line":"        \"\"\""},{"line_number":355,"context_line":"        self.conn \u003d None"},{"line_number":356,"context_line":"        self._db_file \u003d db_file"}],"source_content_type":"text/x-python","patch_set":5,"id":"04c8bade_6070580b","line":353,"updated":"2023-10-02 19:35:59.000000000","message":"I think the defaults seem reasonable; but maybe simpler to just set the default values and skip the is not None checks?","commit_id":"beb32cbfd92ca0ca15099c28b2620474a8f91411"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c35831a34191f5d027826d947d8e1622ac187fd6","unresolved":true,"context_lines":[{"line_number":350,"context_line":"        :param fallocate_is_percent: if True, then fallocate_reserve is"},{"line_number":351,"context_line":"            treated as a percentage (0-100) of the filesystem\u0027s capacity;"},{"line_number":352,"context_line":"            if False, fallocate_reserve is a number of free bytes. Optional;"},{"line_number":353,"context_line":"            if omitted, defaults to utils.FALLOCATE_IS_PERCENT"},{"line_number":354,"context_line":"        \"\"\""},{"line_number":355,"context_line":"        self.conn \u003d None"},{"line_number":356,"context_line":"        self._db_file \u003d db_file"}],"source_content_type":"text/x-python","patch_set":5,"id":"22223555_d6ade0a6","line":353,"in_reply_to":"04c8bade_6070580b","updated":"2023-10-02 20:01:34.000000000","message":"Simpler, but error-prone! Doing that would embed the value from `utils` as of whenever `db` gets imported, and we have no idea when or whether some other code wants to monkey patch those.","commit_id":"beb32cbfd92ca0ca15099c28b2620474a8f91411"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"7ab68f1bab8f483cb1921b95d1566cee40be089f","unresolved":true,"context_lines":[{"line_number":350,"context_line":"        :param fallocate_is_percent: if True, then fallocate_reserve is"},{"line_number":351,"context_line":"            treated as a percentage (0-100) of the filesystem\u0027s capacity;"},{"line_number":352,"context_line":"            if False, fallocate_reserve is a number of free bytes. Optional;"},{"line_number":353,"context_line":"            if omitted, defaults to utils.FALLOCATE_IS_PERCENT"},{"line_number":354,"context_line":"        \"\"\""},{"line_number":355,"context_line":"        self.conn \u003d None"},{"line_number":356,"context_line":"        self._db_file \u003d db_file"}],"source_content_type":"text/x-python","patch_set":5,"id":"8a71bb47_954ab076","line":353,"in_reply_to":"1c3ccd74_ef77b667","updated":"2023-10-03 00:51:32.000000000","message":"OK, I shouldn\u0027t have said error-prone -- I meant *wrong*. If some external code actually *did* want their use of brokers to respect fallocate_reserve on a version of Swift that predates this change, they would have had to do something like\n```\nfrom swift.common import utils\nfrom swift.common.container import backend\n...\nutils.FALLOCATE_RESERVE, utils.FALLOCATE_IS_PERCENT \u003d \\\n    utils.config_fallocate_value(conf.get(\u0027fallocate_reserve\u0027, \u00271%\u0027))\n...\nbroker \u003d backend.ContainerBroker(...)\n```\nright? That\u0027s how it was done previously in Swift, that was *the only way* you could do it previously in Swift. If you take that same code and run it with this code, everything will work as expected -- specifically *because* you can still change what happens during runtime. If I take your suggestion, though, and apply something like\n```\ndiff --git a/swift/common/db.py b/swift/common/db.py\nindex 53e8432c7..e34a7470c 100644\n--- a/swift/common/db.py\n+++ b/swift/common/db.py\n@@ -327,7 +327,8 @@ class DatabaseBroker(object):\n     def __init__(self, db_file, timeout\u003dBROKER_TIMEOUT, logger\u003dNone,\n                  account\u003dNone, container\u003dNone, pending_timeout\u003dNone,\n                  stale_reads_ok\u003dFalse, skip_commits\u003dFalse,\n-                 fallocate_reserve\u003dNone, fallocate_is_percent\u003dNone):\n+                 fallocate_reserve\u003dutils.FALLOCATE_RESERVE,\n+                 fallocate_is_percent\u003dutils.FALLOCATE_IS_PERCENT):\n         \"\"\"Encapsulates working with a database.\n \n         :param db_file: path to a database file.\n@@ -364,10 +365,8 @@ class DatabaseBroker(object):\n         self.container \u003d container\n         self._db_version \u003d -1\n         self.skip_commits \u003d skip_commits\n-        self.fallocate_reserve \u003d fallocate_reserve \\\n-            if fallocate_reserve is not None else utils.FALLOCATE_RESERVE\n-        self.fallocate_is_percent \u003d fallocate_is_percent \\\n-            if fallocate_is_percent is not None else utils.FALLOCATE_IS_PERCENT\n+        self.fallocate_reserve \u003d fallocate_reserve\n+        self.fallocate_is_percent \u003d fallocate_is_percent\n \n     def __str__(self):\n         \"\"\"\n```\nthen it **won\u0027t** work the same -- specifically, they\u0027ll be in the bad position of https://bugs.launchpad.net/swift/+bug/2031035 all over again, where `fallocate_reserve` is (seilently!) no longer being respected, despite them really *trying* to do all the right things.\n\nI\u0027ll push up another patch with a test to cover it. I don\u0027t especially *like* us needing to maintain an API centered around manipulating global state like this, but I don\u0027t think it\u0027s reasonable to say we should completely ditch it in the same patch that introduces the replacement, \"blessed\" API.","commit_id":"beb32cbfd92ca0ca15099c28b2620474a8f91411"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"28874659745ccb1104f8f2af35b707917acd7f13","unresolved":true,"context_lines":[{"line_number":350,"context_line":"        :param fallocate_is_percent: if True, then fallocate_reserve is"},{"line_number":351,"context_line":"            treated as a percentage (0-100) of the filesystem\u0027s capacity;"},{"line_number":352,"context_line":"            if False, fallocate_reserve is a number of free bytes. Optional;"},{"line_number":353,"context_line":"            if omitted, defaults to utils.FALLOCATE_IS_PERCENT"},{"line_number":354,"context_line":"        \"\"\""},{"line_number":355,"context_line":"        self.conn \u003d None"},{"line_number":356,"context_line":"        self._db_file \u003d db_file"}],"source_content_type":"text/x-python","patch_set":5,"id":"1c3ccd74_ef77b667","line":353,"in_reply_to":"22223555_d6ade0a6","updated":"2023-10-02 20:25:03.000000000","message":"well if you do it once at function definition it\u0027s less likely to get patched later and then change what happens during runtime if someone is still passing None","commit_id":"beb32cbfd92ca0ca15099c28b2620474a8f91411"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0698425b113132ad6b34fa250cbebaba8727074d","unresolved":false,"context_lines":[{"line_number":350,"context_line":"        :param fallocate_is_percent: if True, then fallocate_reserve is"},{"line_number":351,"context_line":"            treated as a percentage (0-100) of the filesystem\u0027s capacity;"},{"line_number":352,"context_line":"            if False, fallocate_reserve is a number of free bytes. Optional;"},{"line_number":353,"context_line":"            if omitted, defaults to utils.FALLOCATE_IS_PERCENT"},{"line_number":354,"context_line":"        \"\"\""},{"line_number":355,"context_line":"        self.conn \u003d None"},{"line_number":356,"context_line":"        self._db_file \u003d db_file"}],"source_content_type":"text/x-python","patch_set":5,"id":"7592f0d5_d0b9cf79","line":353,"in_reply_to":"39b9db87_ad713b75","updated":"2024-01-09 18:16:56.000000000","message":"Done","commit_id":"beb32cbfd92ca0ca15099c28b2620474a8f91411"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"2dc234b351c6317a7f577d25c336b8c866004764","unresolved":true,"context_lines":[{"line_number":350,"context_line":"        :param fallocate_is_percent: if True, then fallocate_reserve is"},{"line_number":351,"context_line":"            treated as a percentage (0-100) of the filesystem\u0027s capacity;"},{"line_number":352,"context_line":"            if False, fallocate_reserve is a number of free bytes. Optional;"},{"line_number":353,"context_line":"            if omitted, defaults to utils.FALLOCATE_IS_PERCENT"},{"line_number":354,"context_line":"        \"\"\""},{"line_number":355,"context_line":"        self.conn \u003d None"},{"line_number":356,"context_line":"        self._db_file \u003d db_file"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f4126a7_38190890","line":353,"in_reply_to":"39b9db87_ad713b75","updated":"2024-01-09 18:40:23.000000000","message":"that potential for regression feels like it might be worth a comment","commit_id":"beb32cbfd92ca0ca15099c28b2620474a8f91411"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"a5930569b04c4d4ac72c4b84072b28d4445d0e03","unresolved":true,"context_lines":[{"line_number":350,"context_line":"        :param fallocate_is_percent: if True, then fallocate_reserve is"},{"line_number":351,"context_line":"            treated as a percentage (0-100) of the filesystem\u0027s capacity;"},{"line_number":352,"context_line":"            if False, fallocate_reserve is a number of free bytes. Optional;"},{"line_number":353,"context_line":"            if omitted, defaults to utils.FALLOCATE_IS_PERCENT"},{"line_number":354,"context_line":"        \"\"\""},{"line_number":355,"context_line":"        self.conn \u003d None"},{"line_number":356,"context_line":"        self._db_file \u003d db_file"}],"source_content_type":"text/x-python","patch_set":5,"id":"39b9db87_ad713b75","line":353,"in_reply_to":"8a71bb47_954ab076","updated":"2023-10-16 18:59:01.000000000","message":"yes, with a better understanding of the goals the code makes sense the way you wrote it; i was confused (again) about the global-state-manipulation-as-interface design we\u0027re maintaining.","commit_id":"beb32cbfd92ca0ca15099c28b2620474a8f91411"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c35831a34191f5d027826d947d8e1622ac187fd6","unresolved":true,"context_lines":[{"line_number":365,"context_line":"        self._db_version \u003d -1"},{"line_number":366,"context_line":"        self.skip_commits \u003d skip_commits"},{"line_number":367,"context_line":"        self.fallocate_reserve \u003d fallocate_reserve \\"},{"line_number":368,"context_line":"            if fallocate_reserve is not None else utils.FALLOCATE_RESERVE"},{"line_number":369,"context_line":"        self.fallocate_is_percent \u003d fallocate_is_percent \\"},{"line_number":370,"context_line":"            if fallocate_is_percent is not None else utils.FALLOCATE_IS_PERCENT"},{"line_number":371,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"666af7e2_3dd93404","line":368,"range":{"start_line":368,"start_character":45,"end_line":368,"end_character":73},"updated":"2023-10-02 20:01:34.000000000","message":"Given how much code still hits this path, I\u0027m not convinced this is all the way better yet :-/","commit_id":"beb32cbfd92ca0ca15099c28b2620474a8f91411"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0698425b113132ad6b34fa250cbebaba8727074d","unresolved":true,"context_lines":[{"line_number":365,"context_line":"        self._db_version \u003d -1"},{"line_number":366,"context_line":"        self.skip_commits \u003d skip_commits"},{"line_number":367,"context_line":"        self.fallocate_reserve \u003d fallocate_reserve \\"},{"line_number":368,"context_line":"            if fallocate_reserve is not None else utils.FALLOCATE_RESERVE"},{"line_number":369,"context_line":"        self.fallocate_is_percent \u003d fallocate_is_percent \\"},{"line_number":370,"context_line":"            if fallocate_is_percent is not None else utils.FALLOCATE_IS_PERCENT"},{"line_number":371,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"244af207_e9b036aa","line":368,"range":{"start_line":368,"start_character":45,"end_line":368,"end_character":73},"in_reply_to":"666af7e2_3dd93404","updated":"2024-01-09 18:16:56.000000000","message":"is that mostly because of common.db.DatabaseBroker._preallocate ???","commit_id":"beb32cbfd92ca0ca15099c28b2620474a8f91411"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"95f523799894344d0819220f69ca0c8135fd09e6","unresolved":true,"context_lines":[{"line_number":367,"context_line":"        self.fallocate_reserve \u003d fallocate_reserve \\"},{"line_number":368,"context_line":"            if fallocate_reserve is not None else utils.FALLOCATE_RESERVE"},{"line_number":369,"context_line":"        self.fallocate_is_percent \u003d fallocate_is_percent \\"},{"line_number":370,"context_line":"            if fallocate_is_percent is not None else utils.FALLOCATE_IS_PERCENT"},{"line_number":371,"context_line":""},{"line_number":372,"context_line":"    def __str__(self):"},{"line_number":373,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"571b5c0b_3d6d60d4","line":370,"updated":"2023-10-02 19:35:59.000000000","message":"maybe, `self.fallocate \u003d functools.partial(...)`","commit_id":"beb32cbfd92ca0ca15099c28b2620474a8f91411"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0698425b113132ad6b34fa250cbebaba8727074d","unresolved":false,"context_lines":[{"line_number":367,"context_line":"        self.fallocate_reserve \u003d fallocate_reserve \\"},{"line_number":368,"context_line":"            if fallocate_reserve is not None else utils.FALLOCATE_RESERVE"},{"line_number":369,"context_line":"        self.fallocate_is_percent \u003d fallocate_is_percent \\"},{"line_number":370,"context_line":"            if fallocate_is_percent is not None else utils.FALLOCATE_IS_PERCENT"},{"line_number":371,"context_line":""},{"line_number":372,"context_line":"    def __str__(self):"},{"line_number":373,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"94bf5748_1e8e0b7d","line":370,"in_reply_to":"571b5c0b_3d6d60d4","updated":"2024-01-09 18:16:56.000000000","message":"Acknowledged","commit_id":"beb32cbfd92ca0ca15099c28b2620474a8f91411"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"95f523799894344d0819220f69ca0c8135fd09e6","unresolved":true,"context_lines":[{"line_number":966,"context_line":"                    self.fallocate_reserve,"},{"line_number":967,"context_line":"                    self.fallocate_is_percent,"},{"line_number":968,"context_line":"                    int(prealloc_size),"},{"line_number":969,"context_line":"                )"},{"line_number":970,"context_line":""},{"line_number":971,"context_line":"    def get_raw_metadata(self):"},{"line_number":972,"context_line":"        with self.get() as conn:"}],"source_content_type":"text/x-python","patch_set":5,"id":"28e6f924_bf688d2c","line":969,"updated":"2023-10-02 19:35:59.000000000","message":"The global monkey patching happens in swift.common.wsgi - this call always got the values from the config.\n\nNow it gets the cofigured value explicitly - SO much better","commit_id":"beb32cbfd92ca0ca15099c28b2620474a8f91411"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0698425b113132ad6b34fa250cbebaba8727074d","unresolved":false,"context_lines":[{"line_number":966,"context_line":"                    self.fallocate_reserve,"},{"line_number":967,"context_line":"                    self.fallocate_is_percent,"},{"line_number":968,"context_line":"                    int(prealloc_size),"},{"line_number":969,"context_line":"                )"},{"line_number":970,"context_line":""},{"line_number":971,"context_line":"    def get_raw_metadata(self):"},{"line_number":972,"context_line":"        with self.get() as conn:"}],"source_content_type":"text/x-python","patch_set":5,"id":"a5c6d816_e3c3794a","line":969,"in_reply_to":"28e6f924_bf688d2c","updated":"2024-01-09 18:16:56.000000000","message":"Acknowledged","commit_id":"beb32cbfd92ca0ca15099c28b2620474a8f91411"}],"swift/common/utils/__init__.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"224f8d139a2f4e8a2ca4dd86b9e40ad4066aed79","unresolved":true,"context_lines":[{"line_number":826,"context_line":"    if is_percent:"},{"line_number":827,"context_line":"        size_bytes \u003d st.f_frsize * st.f_blocks"},{"line_number":828,"context_line":"        reserve_space \u003d int(reserve_space / 100.0 * size_bytes)"},{"line_number":829,"context_line":"    return free_bytes, reserve_space"},{"line_number":830,"context_line":""},{"line_number":831,"context_line":""},{"line_number":832,"context_line":"def fs_has_free_space(fs_path_or_fd, reserve_space, is_percent):"}],"source_content_type":"text/x-python","patch_set":1,"id":"6b97432a_c40e3aa1","line":829,"range":{"start_line":829,"start_character":23,"end_line":829,"end_character":36},"updated":"2023-08-15 06:47:57.000000000","message":"Oh ok, we\u0027re just spitting back out the passed in reserve_space if it isn\u0027t a percent, and now all checks (in fs_has_free_space) are space based ranther then checking percentages or space.. yeah I like that. Always comparing the same thing and percentage just a nice dynamic way of specifing. Good improvement.","commit_id":"f67bf2db953b49fa81b59fc7af592d80c83615b5"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0698425b113132ad6b34fa250cbebaba8727074d","unresolved":false,"context_lines":[{"line_number":826,"context_line":"    if is_percent:"},{"line_number":827,"context_line":"        size_bytes \u003d st.f_frsize * st.f_blocks"},{"line_number":828,"context_line":"        reserve_space \u003d int(reserve_space / 100.0 * size_bytes)"},{"line_number":829,"context_line":"    return free_bytes, reserve_space"},{"line_number":830,"context_line":""},{"line_number":831,"context_line":""},{"line_number":832,"context_line":"def fs_has_free_space(fs_path_or_fd, reserve_space, is_percent):"}],"source_content_type":"text/x-python","patch_set":1,"id":"cdf10778_6cfa400c","line":829,"range":{"start_line":829,"start_character":23,"end_line":829,"end_character":36},"in_reply_to":"6b97432a_c40e3aa1","updated":"2024-01-09 18:16:56.000000000","message":"Acknowledged","commit_id":"f67bf2db953b49fa81b59fc7af592d80c83615b5"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"224f8d139a2f4e8a2ca4dd86b9e40ad4066aed79","unresolved":true,"context_lines":[{"line_number":863,"context_line":"    _fallocate_enabled \u003d False"},{"line_number":864,"context_line":""},{"line_number":865,"context_line":""},{"line_number":866,"context_line":"def fallocate(fd, size, offset\u003d0):"},{"line_number":867,"context_line":"    \"\"\""},{"line_number":868,"context_line":"    Pre-allocate disk space for a file while holding some space in reserve."},{"line_number":869,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"bc10ff8d_3cd076c6","line":866,"range":{"start_line":866,"start_character":24,"end_line":866,"end_character":32},"updated":"2023-08-15 06:47:57.000000000","message":"Offset isn\u0027t in the doc string. Although it probaby never was.. but still it\u0027s missing 😊","commit_id":"f67bf2db953b49fa81b59fc7af592d80c83615b5"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5c05cfb25bcd36c0e3f99db54089977cad30d858","unresolved":true,"context_lines":[{"line_number":863,"context_line":"    _fallocate_enabled \u003d False"},{"line_number":864,"context_line":""},{"line_number":865,"context_line":""},{"line_number":866,"context_line":"def fallocate(fd, size, offset\u003d0):"},{"line_number":867,"context_line":"    \"\"\""},{"line_number":868,"context_line":"    Pre-allocate disk space for a file while holding some space in reserve."},{"line_number":869,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"e295161e_ae07f3cb","line":866,"range":{"start_line":866,"start_character":24,"end_line":866,"end_character":32},"in_reply_to":"bc10ff8d_3cd076c6","updated":"2023-08-15 22:41:41.000000000","message":"I think I might actually appreciate it if this was not named the same as the libc module function, something like \"check reserved space and fallocate\" if we want to keep that interface instead of just moving diskfile to something closer to what is happening in the account/container servers.\n\nhaving the free space configuration coupled with the underlying libc function was such a leaky implementation detail.  You don\u0027t have to fix all the things, but I wonder if there\u0027s an oppertunity staring at us in the face right now to recognize THIS function is NOT \"just\" a libc wrapper.","commit_id":"f67bf2db953b49fa81b59fc7af592d80c83615b5"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"2dc234b351c6317a7f577d25c336b8c866004764","unresolved":false,"context_lines":[{"line_number":863,"context_line":"    _fallocate_enabled \u003d False"},{"line_number":864,"context_line":""},{"line_number":865,"context_line":""},{"line_number":866,"context_line":"def fallocate(fd, size, offset\u003d0):"},{"line_number":867,"context_line":"    \"\"\""},{"line_number":868,"context_line":"    Pre-allocate disk space for a file while holding some space in reserve."},{"line_number":869,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"0448f77f_143d5f18","line":866,"range":{"start_line":866,"start_character":24,"end_line":866,"end_character":32},"in_reply_to":"c118eeab_45bec047","updated":"2024-01-09 18:40:23.000000000","message":"Done","commit_id":"f67bf2db953b49fa81b59fc7af592d80c83615b5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b784101a06f815e9ee9bf10826c3571670fc10ba","unresolved":false,"context_lines":[{"line_number":863,"context_line":"    _fallocate_enabled \u003d False"},{"line_number":864,"context_line":""},{"line_number":865,"context_line":""},{"line_number":866,"context_line":"def fallocate(fd, size, offset\u003d0):"},{"line_number":867,"context_line":"    \"\"\""},{"line_number":868,"context_line":"    Pre-allocate disk space for a file while holding some space in reserve."},{"line_number":869,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"892c449a_210491fd","line":866,"range":{"start_line":866,"start_character":24,"end_line":866,"end_character":32},"in_reply_to":"c118eeab_45bec047","updated":"2023-09-20 16:29:15.000000000","message":"Done","commit_id":"f67bf2db953b49fa81b59fc7af592d80c83615b5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"fe34de1ffded92c0d92f38c3627aa7e9b3c6bb26","unresolved":true,"context_lines":[{"line_number":863,"context_line":"    _fallocate_enabled \u003d False"},{"line_number":864,"context_line":""},{"line_number":865,"context_line":""},{"line_number":866,"context_line":"def fallocate(fd, size, offset\u003d0):"},{"line_number":867,"context_line":"    \"\"\""},{"line_number":868,"context_line":"    Pre-allocate disk space for a file while holding some space in reserve."},{"line_number":869,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ed69f779_e5d0ede4","line":866,"range":{"start_line":866,"start_character":24,"end_line":866,"end_character":32},"in_reply_to":"e295161e_ae07f3cb","updated":"2023-08-16 04:32:37.000000000","message":"When I was writing this, I debated about renaming to `fallocate_with_reserve` and updating all callers -- but then I got cold feet when I thought about why I\u0027d added those `# noqa`\u0027ed imports in the initial extraction. There\u0027s a chance third-party code is importing `swift.common.utils` expecting to find an `fallocate` function that respects some reserve (if they twiddle `FALLOCATE_RESERVE`, too).\n\nMaybe I\u0027m being overly cautious, though? Maybe we could do the rename, then still provide an `fallocate` that emits a warning then plugs right into `fallocate_with_reserve`? I\u0027m mostly looking for the fastest path back to having `fallocate_reserve` working again.","commit_id":"f67bf2db953b49fa81b59fc7af592d80c83615b5"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1b4f005f4f882d75f36f13cdf0a3e8a0a263fd53","unresolved":true,"context_lines":[{"line_number":863,"context_line":"    _fallocate_enabled \u003d False"},{"line_number":864,"context_line":""},{"line_number":865,"context_line":""},{"line_number":866,"context_line":"def fallocate(fd, size, offset\u003d0):"},{"line_number":867,"context_line":"    \"\"\""},{"line_number":868,"context_line":"    Pre-allocate disk space for a file while holding some space in reserve."},{"line_number":869,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"c118eeab_45bec047","line":866,"range":{"start_line":866,"start_character":24,"end_line":866,"end_character":32},"in_reply_to":"ed69f779_e5d0ede4","updated":"2023-08-17 15:07:48.000000000","message":"I think fallocate_with_reserve would better communicate the function\u0027s behaviour and distinguish it from the libc function. However, I\u0027d be OK  with that coming in a follow up patch.","commit_id":"f67bf2db953b49fa81b59fc7af592d80c83615b5"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"224f8d139a2f4e8a2ca4dd86b9e40ad4066aed79","unresolved":true,"context_lines":[{"line_number":868,"context_line":"    Pre-allocate disk space for a file while holding some space in reserve."},{"line_number":869,"context_line":""},{"line_number":870,"context_line":"    This function can be disabled by calling disable_fallocate(). If no"},{"line_number":871,"context_line":"    suitable C function is available in libc, this function is a no-op."},{"line_number":872,"context_line":""},{"line_number":873,"context_line":"    :param fd: file descriptor"},{"line_number":874,"context_line":"    :param size: size to allocate (in bytes)"}],"source_content_type":"text/x-python","patch_set":1,"id":"6bac9676_416a65a5","line":871,"range":{"start_line":871,"start_character":46,"end_line":871,"end_character":71},"updated":"2023-08-15 06:47:57.000000000","message":"Not quite a no-op because there is a stat.. but yeah, basically a no-op 😊","commit_id":"f67bf2db953b49fa81b59fc7af592d80c83615b5"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0698425b113132ad6b34fa250cbebaba8727074d","unresolved":true,"context_lines":[{"line_number":868,"context_line":"    Pre-allocate disk space for a file while holding some space in reserve."},{"line_number":869,"context_line":""},{"line_number":870,"context_line":"    This function can be disabled by calling disable_fallocate(). If no"},{"line_number":871,"context_line":"    suitable C function is available in libc, this function is a no-op."},{"line_number":872,"context_line":""},{"line_number":873,"context_line":"    :param fd: file descriptor"},{"line_number":874,"context_line":"    :param size: size to allocate (in bytes)"}],"source_content_type":"text/x-python","patch_set":1,"id":"127a1c89_0483afee","line":871,"range":{"start_line":871,"start_character":46,"end_line":871,"end_character":71},"in_reply_to":"6bac9676_416a65a5","updated":"2024-01-09 18:16:56.000000000","message":"I KEEP getting confused about global _fallocate_enabled and if _sys_fallocate.available.\n\nI think we should remove the \"if no suitable c function\" part of this docstring; the fallocate call is good for coordination of concurrent allocation of space for writes; but the stat call always happens and provides 507s when you\u0027re beyond the threshold even if size\u003d0","commit_id":"f67bf2db953b49fa81b59fc7af592d80c83615b5"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5c05cfb25bcd36c0e3f99db54089977cad30d858","unresolved":true,"context_lines":[{"line_number":875,"context_line":"    \"\"\""},{"line_number":876,"context_line":"    global _fallocate_enabled"},{"line_number":877,"context_line":"    if not _fallocate_enabled:"},{"line_number":878,"context_line":"        return"},{"line_number":879,"context_line":""},{"line_number":880,"context_line":"    if size \u003c 0:"},{"line_number":881,"context_line":"        size \u003d 0  # Done historically; not really sure why"}],"source_content_type":"text/x-python","patch_set":1,"id":"1e3ac298_474b854c","line":878,"updated":"2023-08-15 22:41:41.000000000","message":"@matt - i think it is a noop if not suitlable c function is available","commit_id":"f67bf2db953b49fa81b59fc7af592d80c83615b5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"fe34de1ffded92c0d92f38c3627aa7e9b3c6bb26","unresolved":true,"context_lines":[{"line_number":875,"context_line":"    \"\"\""},{"line_number":876,"context_line":"    global _fallocate_enabled"},{"line_number":877,"context_line":"    if not _fallocate_enabled:"},{"line_number":878,"context_line":"        return"},{"line_number":879,"context_line":""},{"line_number":880,"context_line":"    if size \u003c 0:"},{"line_number":881,"context_line":"        size \u003d 0  # Done historically; not really sure why"}],"source_content_type":"text/x-python","patch_set":1,"id":"8bd7afbe_4d277d40","line":878,"in_reply_to":"1e3ac298_474b854c","updated":"2023-08-16 04:32:37.000000000","message":"Nope -- this is all about whether we\u0027ve called `disable_fallocate` -- there\u0027s a separate warn-only-once guard in `libc.fallocate`, but it won\u0027t feed back and trigger this early return. Matt\u0027s right about the `vstatfs` still happening even when libc doesn\u0027t offer an fallocate we can use.","commit_id":"f67bf2db953b49fa81b59fc7af592d80c83615b5"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"95f523799894344d0819220f69ca0c8135fd09e6","unresolved":false,"context_lines":[{"line_number":875,"context_line":"    \"\"\""},{"line_number":876,"context_line":"    global _fallocate_enabled"},{"line_number":877,"context_line":"    if not _fallocate_enabled:"},{"line_number":878,"context_line":"        return"},{"line_number":879,"context_line":""},{"line_number":880,"context_line":"    if size \u003c 0:"},{"line_number":881,"context_line":"        size \u003d 0  # Done historically; not really sure why"}],"source_content_type":"text/x-python","patch_set":1,"id":"e5a1af16_5fc6fea8","line":878,"in_reply_to":"8bd7afbe_4d277d40","updated":"2023-10-02 19:35:59.000000000","message":"Ack","commit_id":"f67bf2db953b49fa81b59fc7af592d80c83615b5"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"224f8d139a2f4e8a2ca4dd86b9e40ad4066aed79","unresolved":true,"context_lines":[{"line_number":897,"context_line":"                \u0027FALLOCATE_RESERVE fail %d \u003c\u003d %d\u0027 %"},{"line_number":898,"context_line":"                (free - size, reserved))"},{"line_number":899,"context_line":""},{"line_number":900,"context_line":"    return libc.fallocate(fd, size, offset)"},{"line_number":901,"context_line":""},{"line_number":902,"context_line":""},{"line_number":903,"context_line":"def fsync(fd):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3b507d8e_bb44770a","line":900,"range":{"start_line":900,"start_character":11,"end_line":900,"end_character":25},"updated":"2023-08-15 06:47:57.000000000","message":"Yeah cool, and now we call in the specific libc one, so here is a the seperation. We know this only really talks libc from here and from the libc namespace. Nice.","commit_id":"f67bf2db953b49fa81b59fc7af592d80c83615b5"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0698425b113132ad6b34fa250cbebaba8727074d","unresolved":false,"context_lines":[{"line_number":897,"context_line":"                \u0027FALLOCATE_RESERVE fail %d \u003c\u003d %d\u0027 %"},{"line_number":898,"context_line":"                (free - size, reserved))"},{"line_number":899,"context_line":""},{"line_number":900,"context_line":"    return libc.fallocate(fd, size, offset)"},{"line_number":901,"context_line":""},{"line_number":902,"context_line":""},{"line_number":903,"context_line":"def fsync(fd):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3b68762b_62279a8b","line":900,"range":{"start_line":900,"start_character":11,"end_line":900,"end_character":25},"in_reply_to":"056c5101_ca9b77dc","updated":"2024-01-09 18:16:56.000000000","message":"Acknowledged","commit_id":"f67bf2db953b49fa81b59fc7af592d80c83615b5"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"95f523799894344d0819220f69ca0c8135fd09e6","unresolved":true,"context_lines":[{"line_number":897,"context_line":"                \u0027FALLOCATE_RESERVE fail %d \u003c\u003d %d\u0027 %"},{"line_number":898,"context_line":"                (free - size, reserved))"},{"line_number":899,"context_line":""},{"line_number":900,"context_line":"    return libc.fallocate(fd, size, offset)"},{"line_number":901,"context_line":""},{"line_number":902,"context_line":""},{"line_number":903,"context_line":"def fsync(fd):"}],"source_content_type":"text/x-python","patch_set":1,"id":"056c5101_ca9b77dc","line":900,"range":{"start_line":900,"start_character":11,"end_line":900,"end_character":25},"in_reply_to":"3b507d8e_bb44770a","updated":"2023-10-02 19:35:59.000000000","message":"yes, i like this.","commit_id":"f67bf2db953b49fa81b59fc7af592d80c83615b5"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1b4f005f4f882d75f36f13cdf0a3e8a0a263fd53","unresolved":true,"context_lines":[{"line_number":829,"context_line":"    return free_bytes, reserve_space"},{"line_number":830,"context_line":""},{"line_number":831,"context_line":""},{"line_number":832,"context_line":"def fs_has_free_space(fs_path_or_fd, reserve_space, is_percent):"},{"line_number":833,"context_line":"    \"\"\""},{"line_number":834,"context_line":"    Check to see whether or not a filesystem has the given amount of space"},{"line_number":835,"context_line":"    free. Unlike fallocate(), this does not reserve any space."}],"source_content_type":"text/x-python","patch_set":2,"id":"90317993_c2f3f8c6","line":832,"range":{"start_line":832,"start_character":37,"end_line":832,"end_character":50},"updated":"2023-08-17 15:07:48.000000000","message":"I find the name change of this arg unhelpful given that this function does NOT reserve any space","commit_id":"408c9cc79986298bab59f42af0c78454f4c110b6"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"2dc234b351c6317a7f577d25c336b8c866004764","unresolved":false,"context_lines":[{"line_number":829,"context_line":"    return free_bytes, reserve_space"},{"line_number":830,"context_line":""},{"line_number":831,"context_line":""},{"line_number":832,"context_line":"def fs_has_free_space(fs_path_or_fd, reserve_space, is_percent):"},{"line_number":833,"context_line":"    \"\"\""},{"line_number":834,"context_line":"    Check to see whether or not a filesystem has the given amount of space"},{"line_number":835,"context_line":"    free. Unlike fallocate(), this does not reserve any space."}],"source_content_type":"text/x-python","patch_set":2,"id":"0f1f337c_f5627d06","line":832,"range":{"start_line":832,"start_character":37,"end_line":832,"end_character":50},"in_reply_to":"90317993_c2f3f8c6","updated":"2024-01-09 18:40:23.000000000","message":"Done","commit_id":"408c9cc79986298bab59f42af0c78454f4c110b6"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0698425b113132ad6b34fa250cbebaba8727074d","unresolved":false,"context_lines":[{"line_number":829,"context_line":"    return free_bytes, reserve_space"},{"line_number":830,"context_line":""},{"line_number":831,"context_line":""},{"line_number":832,"context_line":"def fs_has_free_space(fs_path_or_fd, reserve_space, is_percent):"},{"line_number":833,"context_line":"    \"\"\""},{"line_number":834,"context_line":"    Check to see whether or not a filesystem has the given amount of space"},{"line_number":835,"context_line":"    free. Unlike fallocate(), this does not reserve any space."}],"source_content_type":"text/x-python","patch_set":2,"id":"63048244_2c3c7a2e","line":832,"range":{"start_line":832,"start_character":37,"end_line":832,"end_character":50},"in_reply_to":"90317993_c2f3f8c6","updated":"2024-01-09 18:16:56.000000000","message":"looks like it went back to space_needed","commit_id":"408c9cc79986298bab59f42af0c78454f4c110b6"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1b4f005f4f882d75f36f13cdf0a3e8a0a263fd53","unresolved":true,"context_lines":[{"line_number":838,"context_line":"        typically the path to the filesystem\u0027s mount point -- or, fileno"},{"line_number":839,"context_line":"        for a file on the filesystem"},{"line_number":840,"context_line":""},{"line_number":841,"context_line":"    :param reserve_space: minimum bytes or percentage of free space to be"},{"line_number":842,"context_line":"        kept in reserve"},{"line_number":843,"context_line":""},{"line_number":844,"context_line":"    :param is_percent: if True, then reserve_space is treated as a percentage"},{"line_number":845,"context_line":"        (1-100) of the filesystem\u0027s capacity; if False, reserve_space is a"}],"source_content_type":"text/x-python","patch_set":2,"id":"09a6db39_9866e2e6","line":842,"range":{"start_line":841,"start_character":68,"end_line":842,"end_character":23},"updated":"2023-08-17 15:07:48.000000000","message":"but \"Unlike fallocate(), this does not reserve any space\" so \"to be kept in reserve\" doesn\u0027t make sense?","commit_id":"408c9cc79986298bab59f42af0c78454f4c110b6"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0698425b113132ad6b34fa250cbebaba8727074d","unresolved":false,"context_lines":[{"line_number":838,"context_line":"        typically the path to the filesystem\u0027s mount point -- or, fileno"},{"line_number":839,"context_line":"        for a file on the filesystem"},{"line_number":840,"context_line":""},{"line_number":841,"context_line":"    :param reserve_space: minimum bytes or percentage of free space to be"},{"line_number":842,"context_line":"        kept in reserve"},{"line_number":843,"context_line":""},{"line_number":844,"context_line":"    :param is_percent: if True, then reserve_space is treated as a percentage"},{"line_number":845,"context_line":"        (1-100) of the filesystem\u0027s capacity; if False, reserve_space is a"}],"source_content_type":"text/x-python","patch_set":2,"id":"6be4756f_44f2766b","line":842,"range":{"start_line":841,"start_character":68,"end_line":842,"end_character":23},"in_reply_to":"09a6db39_9866e2e6","updated":"2024-01-09 18:16:56.000000000","message":"master just says:\n\n    :param space_needed: minimum bytes or percentage of free space\n    \nadding \"to be kept in reserve\" offers a small hint that callers should pass in the configured fallocate_reserve value; I think \"space_needed, is_percent\" is good and docstrings are helpful.","commit_id":"408c9cc79986298bab59f42af0c78454f4c110b6"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1b4f005f4f882d75f36f13cdf0a3e8a0a263fd53","unresolved":true,"context_lines":[{"line_number":842,"context_line":"        kept in reserve"},{"line_number":843,"context_line":""},{"line_number":844,"context_line":"    :param is_percent: if True, then reserve_space is treated as a percentage"},{"line_number":845,"context_line":"        (1-100) of the filesystem\u0027s capacity; if False, reserve_space is a"},{"line_number":846,"context_line":"        number of free bytes."},{"line_number":847,"context_line":""},{"line_number":848,"context_line":"    :returns: True if the filesystem has at least that much free space,"}],"source_content_type":"text/x-python","patch_set":2,"id":"0f4d2fa6_71a79efc","line":845,"range":{"start_line":845,"start_character":9,"end_line":845,"end_character":14},"updated":"2023-08-17 15:07:48.000000000","message":"0-100\n\nI don\u0027t see any rounding","commit_id":"408c9cc79986298bab59f42af0c78454f4c110b6"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b784101a06f815e9ee9bf10826c3571670fc10ba","unresolved":false,"context_lines":[{"line_number":842,"context_line":"        kept in reserve"},{"line_number":843,"context_line":""},{"line_number":844,"context_line":"    :param is_percent: if True, then reserve_space is treated as a percentage"},{"line_number":845,"context_line":"        (1-100) of the filesystem\u0027s capacity; if False, reserve_space is a"},{"line_number":846,"context_line":"        number of free bytes."},{"line_number":847,"context_line":""},{"line_number":848,"context_line":"    :returns: True if the filesystem has at least that much free space,"}],"source_content_type":"text/x-python","patch_set":2,"id":"401362b9_dad085ba","line":845,"range":{"start_line":845,"start_character":9,"end_line":845,"end_character":14},"in_reply_to":"0f4d2fa6_71a79efc","updated":"2023-09-20 16:29:15.000000000","message":"Done. Mainly added that to clarify that the range is not 0.0-1.0 (though if it *were* I guess we would have called the param `is_fraction` or something).","commit_id":"408c9cc79986298bab59f42af0c78454f4c110b6"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"2dc234b351c6317a7f577d25c336b8c866004764","unresolved":false,"context_lines":[{"line_number":842,"context_line":"        kept in reserve"},{"line_number":843,"context_line":""},{"line_number":844,"context_line":"    :param is_percent: if True, then reserve_space is treated as a percentage"},{"line_number":845,"context_line":"        (1-100) of the filesystem\u0027s capacity; if False, reserve_space is a"},{"line_number":846,"context_line":"        number of free bytes."},{"line_number":847,"context_line":""},{"line_number":848,"context_line":"    :returns: True if the filesystem has at least that much free space,"}],"source_content_type":"text/x-python","patch_set":2,"id":"fdcd0403_c3683ddb","line":845,"range":{"start_line":845,"start_character":9,"end_line":845,"end_character":14},"in_reply_to":"401362b9_dad085ba","updated":"2024-01-09 18:40:23.000000000","message":"oh yeah, definitely worth emphasising that it\u0027s a percent i.e. max 100.","commit_id":"408c9cc79986298bab59f42af0c78454f4c110b6"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1b4f005f4f882d75f36f13cdf0a3e8a0a263fd53","unresolved":true,"context_lines":[{"line_number":895,"context_line":"            raise OSError("},{"line_number":896,"context_line":"                errno.ENOSPC,"},{"line_number":897,"context_line":"                \u0027FALLOCATE_RESERVE fail %d \u003c\u003d %d\u0027 %"},{"line_number":898,"context_line":"                (free - size, reserved))"},{"line_number":899,"context_line":""},{"line_number":900,"context_line":"    return libc.fallocate(fd, size, offset)"},{"line_number":901,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"afdf651b_66b1a509","line":898,"updated":"2023-08-17 15:07:48.000000000","message":"nit: In _free_and_reserved_space we have the total size - if that was returned then the exception message could give both absolute and percent values","commit_id":"408c9cc79986298bab59f42af0c78454f4c110b6"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0698425b113132ad6b34fa250cbebaba8727074d","unresolved":false,"context_lines":[{"line_number":895,"context_line":"            raise OSError("},{"line_number":896,"context_line":"                errno.ENOSPC,"},{"line_number":897,"context_line":"                \u0027FALLOCATE_RESERVE fail %d \u003c\u003d %d\u0027 %"},{"line_number":898,"context_line":"                (free - size, reserved))"},{"line_number":899,"context_line":""},{"line_number":900,"context_line":"    return libc.fallocate(fd, size, offset)"},{"line_number":901,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"0015391d_756e0eb5","line":898,"in_reply_to":"259732e3_e79fb19a","updated":"2024-01-09 18:16:56.000000000","message":"904870: Include % free when FALLOCATE_RESERVE fails | https://review.opendev.org/c/openstack/swift/+/904870","commit_id":"408c9cc79986298bab59f42af0c78454f4c110b6"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"95f523799894344d0819220f69ca0c8135fd09e6","unresolved":true,"context_lines":[{"line_number":895,"context_line":"            raise OSError("},{"line_number":896,"context_line":"                errno.ENOSPC,"},{"line_number":897,"context_line":"                \u0027FALLOCATE_RESERVE fail %d \u003c\u003d %d\u0027 %"},{"line_number":898,"context_line":"                (free - size, reserved))"},{"line_number":899,"context_line":""},{"line_number":900,"context_line":"    return libc.fallocate(fd, size, offset)"},{"line_number":901,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"259732e3_e79fb19a","line":898,"in_reply_to":"afdf651b_66b1a509","updated":"2023-10-02 19:35:59.000000000","message":"oic, _free_and_reserved always normalizes to bytes now","commit_id":"408c9cc79986298bab59f42af0c78454f4c110b6"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b784101a06f815e9ee9bf10826c3571670fc10ba","unresolved":false,"context_lines":[{"line_number":843,"context_line":"    :param space_needed: minimum bytes or percentage of free space to be"},{"line_number":844,"context_line":"        kept in reserve"},{"line_number":845,"context_line":""},{"line_number":846,"context_line":"    :param is_percent: if True, then reserve_space is treated as a percentage"},{"line_number":847,"context_line":"        (0-100) of the filesystem\u0027s capacity; if False, reserve_space is a"},{"line_number":848,"context_line":"        number of free bytes."},{"line_number":849,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ee187269_00f6a1a7","line":846,"range":{"start_line":846,"start_character":37,"end_line":846,"end_character":50},"updated":"2023-09-20 16:29:15.000000000","message":"Heh, whoops...","commit_id":"823b1e3545db431a3dccc8214dce20fbbd716c34"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b784101a06f815e9ee9bf10826c3571670fc10ba","unresolved":false,"context_lines":[{"line_number":874,"context_line":"    suitable C function is available in libc, this function is a no-op."},{"line_number":875,"context_line":""},{"line_number":876,"context_line":"    :param fd: file descriptor"},{"line_number":877,"context_line":"    :param size: size to allocate (in bytes)"},{"line_number":878,"context_line":"    \"\"\""},{"line_number":879,"context_line":"    global _fallocate_enabled"},{"line_number":880,"context_line":"    if not _fallocate_enabled:"}],"source_content_type":"text/x-python","patch_set":4,"id":"18de6ecd_0e767cd0","line":877,"updated":"2023-09-20 16:29:15.000000000","message":"Need to add the new params.","commit_id":"823b1e3545db431a3dccc8214dce20fbbd716c34"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"95f523799894344d0819220f69ca0c8135fd09e6","unresolved":true,"context_lines":[{"line_number":154,"context_line":"# These constants are Linux-specific, and Python doesn\u0027t seem to know"},{"line_number":155,"context_line":"# about them. We ask anyway just in case that ever gets fixed."},{"line_number":156,"context_line":"#"},{"line_number":157,"context_line":"# The values were copied from the Linux 3.x kernel headers."},{"line_number":158,"context_line":"O_TMPFILE \u003d getattr(os, \u0027O_TMPFILE\u0027, 0o20000000 | os.O_DIRECTORY)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"MD5_OF_EMPTY_STRING \u003d \u0027d41d8cd98f00b204e9800998ecf8427e\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ebea11c_a4dfcbaa","side":"PARENT","line":157,"updated":"2023-10-02 19:35:59.000000000","message":"why pull this comment - was it not actually about O_TMPFILE?","commit_id":"7c487bae9fdfcba0e14cb667339c7f208fb03a98"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"28874659745ccb1104f8f2af35b707917acd7f13","unresolved":false,"context_lines":[{"line_number":154,"context_line":"# These constants are Linux-specific, and Python doesn\u0027t seem to know"},{"line_number":155,"context_line":"# about them. We ask anyway just in case that ever gets fixed."},{"line_number":156,"context_line":"#"},{"line_number":157,"context_line":"# The values were copied from the Linux 3.x kernel headers."},{"line_number":158,"context_line":"O_TMPFILE \u003d getattr(os, \u0027O_TMPFILE\u0027, 0o20000000 | os.O_DIRECTORY)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"MD5_OF_EMPTY_STRING \u003d \u0027d41d8cd98f00b204e9800998ecf8427e\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"0c70e47b_52cfdc9b","side":"PARENT","line":157,"in_reply_to":"8c0fc0d5_06ad63b0","updated":"2023-10-02 20:25:03.000000000","message":"Ack","commit_id":"7c487bae9fdfcba0e14cb667339c7f208fb03a98"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c35831a34191f5d027826d947d8e1622ac187fd6","unresolved":true,"context_lines":[{"line_number":154,"context_line":"# These constants are Linux-specific, and Python doesn\u0027t seem to know"},{"line_number":155,"context_line":"# about them. We ask anyway just in case that ever gets fixed."},{"line_number":156,"context_line":"#"},{"line_number":157,"context_line":"# The values were copied from the Linux 3.x kernel headers."},{"line_number":158,"context_line":"O_TMPFILE \u003d getattr(os, \u0027O_TMPFILE\u0027, 0o20000000 | os.O_DIRECTORY)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"MD5_OF_EMPTY_STRING \u003d \u0027d41d8cd98f00b204e9800998ecf8427e\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"8c0fc0d5_06ad63b0","side":"PARENT","line":157,"in_reply_to":"9ebea11c_a4dfcbaa","updated":"2023-10-02 20:01:34.000000000","message":"Originally came in with [the `splice` stuff](https://github.com/openstack/swift/commit/7d0e5ebe690bf3cf41ccd970281d532a23284e58), got updated with [`O_TMPFILE` support](https://github.com/openstack/swift/commit/773edb4a5dd22b22f5fcab57820bcbdd4176dfcd) from 3.0 to 3.X. Mostly, I was trying to get back to having [the break-out patch applied](https://github.com/openstack/swift/commit/c78a5962b5f6c9e75f154cac924a226815236e98), but may have been over-zealous.\n\nFWIW, though, it looks like [it shouldn\u0027t be necessary once we drop py2](https://docs.python.org/3/library/os.html#os.O_TMPFILE):\n\n\u003e Changed in version 3.4: Add `O_PATH` on systems that support it. Add `O_TMPFILE`, only available on Linux Kernel 3.11 or newer.","commit_id":"7c487bae9fdfcba0e14cb667339c7f208fb03a98"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"95f523799894344d0819220f69ca0c8135fd09e6","unresolved":true,"context_lines":[{"line_number":828,"context_line":"        reserve_bytes \u003d int(reserve_space / 100.0 * size_bytes)"},{"line_number":829,"context_line":"    else:"},{"line_number":830,"context_line":"        reserve_bytes \u003d reserve_space"},{"line_number":831,"context_line":"    return free_bytes, reserve_bytes"},{"line_number":832,"context_line":""},{"line_number":833,"context_line":""},{"line_number":834,"context_line":"def fs_has_free_space(fs_path_or_fd, space_needed, is_percent):"}],"source_content_type":"text/x-python","patch_set":5,"id":"775287ac_47b65924","line":831,"updated":"2023-10-02 19:35:59.000000000","message":"this is the drive-by; we normalize % values to bytes","commit_id":"beb32cbfd92ca0ca15099c28b2620474a8f91411"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0698425b113132ad6b34fa250cbebaba8727074d","unresolved":false,"context_lines":[{"line_number":828,"context_line":"        reserve_bytes \u003d int(reserve_space / 100.0 * size_bytes)"},{"line_number":829,"context_line":"    else:"},{"line_number":830,"context_line":"        reserve_bytes \u003d reserve_space"},{"line_number":831,"context_line":"    return free_bytes, reserve_bytes"},{"line_number":832,"context_line":""},{"line_number":833,"context_line":""},{"line_number":834,"context_line":"def fs_has_free_space(fs_path_or_fd, space_needed, is_percent):"}],"source_content_type":"text/x-python","patch_set":5,"id":"fffb4b2e_40372a1f","line":831,"in_reply_to":"775287ac_47b65924","updated":"2024-01-09 18:16:56.000000000","message":"Acknowledged","commit_id":"beb32cbfd92ca0ca15099c28b2620474a8f91411"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"95f523799894344d0819220f69ca0c8135fd09e6","unresolved":true,"context_lines":[{"line_number":922,"context_line":"        FALLOCATE_IS_PERCENT,"},{"line_number":923,"context_line":"        size,"},{"line_number":924,"context_line":"        offset,"},{"line_number":925,"context_line":"    )"},{"line_number":926,"context_line":""},{"line_number":927,"context_line":""},{"line_number":928,"context_line":"def fsync(fd):"}],"source_content_type":"text/x-python","patch_set":5,"id":"8db4adba_1d57673e","line":925,"updated":"2023-10-02 19:35:59.000000000","message":"i\u0027m not sure it\u0027s needed; but this seems not too bad.\n\nand is the plan to leave the common.wsig/daemon moneky patching of the global in place when we remove this function?","commit_id":"beb32cbfd92ca0ca15099c28b2620474a8f91411"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0698425b113132ad6b34fa250cbebaba8727074d","unresolved":false,"context_lines":[{"line_number":922,"context_line":"        FALLOCATE_IS_PERCENT,"},{"line_number":923,"context_line":"        size,"},{"line_number":924,"context_line":"        offset,"},{"line_number":925,"context_line":"    )"},{"line_number":926,"context_line":""},{"line_number":927,"context_line":""},{"line_number":928,"context_line":"def fsync(fd):"}],"source_content_type":"text/x-python","patch_set":5,"id":"5e7b2de7_d4e86395","line":925,"in_reply_to":"8db4adba_1d57673e","updated":"2024-01-09 18:16:56.000000000","message":"Acknowledged","commit_id":"beb32cbfd92ca0ca15099c28b2620474a8f91411"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c99bfc6148a37fc954ef48ba0810d5433d33f7bd","unresolved":true,"context_lines":[{"line_number":136,"context_line":"FALLOCATE_RESERVE \u003d 0"},{"line_number":137,"context_line":"# Indicates if FALLOCATE_RESERVE is the percentage of free space (True) or"},{"line_number":138,"context_line":"# the number of bytes (False)."},{"line_number":139,"context_line":"FALLOCATE_IS_PERCENT \u003d False"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"# from /usr/include/linux/falloc.h"},{"line_number":142,"context_line":"FALLOC_FL_KEEP_SIZE \u003d 1"}],"source_content_type":"text/x-python","patch_set":6,"id":"28fac574_b9de92cc","side":"PARENT","line":139,"updated":"2024-01-08 19:10:25.000000000","message":"ok, these have to stay here to support the global-monkey-patch-as-config interface","commit_id":"d31a54a65c186550a99bb985f056c071690a3939"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0698425b113132ad6b34fa250cbebaba8727074d","unresolved":false,"context_lines":[{"line_number":136,"context_line":"FALLOCATE_RESERVE \u003d 0"},{"line_number":137,"context_line":"# Indicates if FALLOCATE_RESERVE is the percentage of free space (True) or"},{"line_number":138,"context_line":"# the number of bytes (False)."},{"line_number":139,"context_line":"FALLOCATE_IS_PERCENT \u003d False"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"# from /usr/include/linux/falloc.h"},{"line_number":142,"context_line":"FALLOC_FL_KEEP_SIZE \u003d 1"}],"source_content_type":"text/x-python","patch_set":6,"id":"0ecf01ec_2c4526d1","side":"PARENT","line":139,"in_reply_to":"28fac574_b9de92cc","updated":"2024-01-09 18:16:56.000000000","message":"Acknowledged","commit_id":"d31a54a65c186550a99bb985f056c071690a3939"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c99bfc6148a37fc954ef48ba0810d5433d33f7bd","unresolved":true,"context_lines":[{"line_number":866,"context_line":"_fallocate_enabled \u003d True"},{"line_number":867,"context_line":"_fallocate_warned_about_missing \u003d False"},{"line_number":868,"context_line":"_sys_fallocate \u003d _LibcWrapper(\u0027fallocate\u0027)"},{"line_number":869,"context_line":"_sys_posix_fallocate \u003d _LibcWrapper(\u0027posix_fallocate\u0027)"},{"line_number":870,"context_line":""},{"line_number":871,"context_line":""},{"line_number":872,"context_line":"def disable_fallocate():"}],"source_content_type":"text/x-python","patch_set":6,"id":"d517e759_fe760657","side":"PARENT","line":869,"updated":"2024-01-08 19:10:25.000000000","message":"it\u0027s a pretty big win IMHO to get these back into common.utils.libc","commit_id":"d31a54a65c186550a99bb985f056c071690a3939"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0698425b113132ad6b34fa250cbebaba8727074d","unresolved":false,"context_lines":[{"line_number":866,"context_line":"_fallocate_enabled \u003d True"},{"line_number":867,"context_line":"_fallocate_warned_about_missing \u003d False"},{"line_number":868,"context_line":"_sys_fallocate \u003d _LibcWrapper(\u0027fallocate\u0027)"},{"line_number":869,"context_line":"_sys_posix_fallocate \u003d _LibcWrapper(\u0027posix_fallocate\u0027)"},{"line_number":870,"context_line":""},{"line_number":871,"context_line":""},{"line_number":872,"context_line":"def disable_fallocate():"}],"source_content_type":"text/x-python","patch_set":6,"id":"ddcd252d_62da919f","side":"PARENT","line":869,"in_reply_to":"d517e759_fe760657","updated":"2024-01-09 18:16:56.000000000","message":"Acknowledged","commit_id":"d31a54a65c186550a99bb985f056c071690a3939"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"b017385304c3d14c0e08e4e86d6df70f03284851","unresolved":true,"context_lines":[{"line_number":132,"context_line":"FALLOCATE_RESERVE \u003d 0"},{"line_number":133,"context_line":"# Indicates if FALLOCATE_RESERVE is the percentage of free space (True) or"},{"line_number":134,"context_line":"# the number of bytes (False)."},{"line_number":135,"context_line":"FALLOCATE_IS_PERCENT \u003d False"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"# Used by hash_path to offer a bit more security when generating hashes for"},{"line_number":138,"context_line":"# paths. It simply appends this value to all paths; guessing the hash a path"}],"source_content_type":"text/x-python","patch_set":7,"id":"c2250c37_b36742ab","line":135,"updated":"2024-01-11 12:01:35.000000000","message":"ok, let\u0027s see if I understand:\n\n* these are not deprecated, because they act as the default values if not overridden by config, and they are still set from wsgi and daemon.\n\n* previously, wsgi and daemon read config and set these values, fallocate used them\n\n* now, account and container servers read config and pass it to brokers, defaulting to these values, and brokers pass values to fallocate_with_reserve\n\n* diskfile was already had the conf values, but relied on wsgi setting the vars here when it called fallocate() - now diskfile passes the vars it has from conf\n\n* so why does wsgi still need to set the values - isn\u0027t the same conf passed to servers?\n\n* daemon still sets these vars because daemons create brokers, but don\u0027t pass the conf vars to the broker in the way that servers now do? but maybe generally daemon brokers don\u0027t end up calling fallocate_with_reserve","commit_id":"86212fd89a986c9d14f92bbf11303f4597412368"}],"swift/common/utils/libc.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5c05cfb25bcd36c0e3f99db54089977cad30d858","unresolved":true,"context_lines":[{"line_number":255,"context_line":"            raise OSError("},{"line_number":256,"context_line":"                errno.ENOSPC,"},{"line_number":257,"context_line":"                \u0027FALLOCATE_RESERVE fail %g \u003c\u003d %g\u0027 %"},{"line_number":258,"context_line":"                (free, FALLOCATE_RESERVE))"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    if _sys_fallocate.available:"},{"line_number":261,"context_line":"        # Parameters are (fd, mode, offset, length)."}],"source_content_type":"text/x-python","patch_set":1,"id":"9a73d996_d6c246e6","side":"PARENT","line":258,"updated":"2023-08-15 22:41:41.000000000","message":"pulling this out seems significant; can you point me at the tests that demonstrate this all makes sense?","commit_id":"54f8dd0ff854c9cba511e81fe4e60bc98d8e99c9"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"95f523799894344d0819220f69ca0c8135fd09e6","unresolved":false,"context_lines":[{"line_number":255,"context_line":"            raise OSError("},{"line_number":256,"context_line":"                errno.ENOSPC,"},{"line_number":257,"context_line":"                \u0027FALLOCATE_RESERVE fail %g \u003c\u003d %g\u0027 %"},{"line_number":258,"context_line":"                (free, FALLOCATE_RESERVE))"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    if _sys_fallocate.available:"},{"line_number":261,"context_line":"        # Parameters are (fd, mode, offset, length)."}],"source_content_type":"text/x-python","patch_set":1,"id":"8abcc169_b2d81601","side":"PARENT","line":258,"in_reply_to":"843ba683_2e4e26e2","updated":"2023-10-02 19:35:59.000000000","message":"Done","commit_id":"54f8dd0ff854c9cba511e81fe4e60bc98d8e99c9"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"fe34de1ffded92c0d92f38c3627aa7e9b3c6bb26","unresolved":true,"context_lines":[{"line_number":255,"context_line":"            raise OSError("},{"line_number":256,"context_line":"                errno.ENOSPC,"},{"line_number":257,"context_line":"                \u0027FALLOCATE_RESERVE fail %g \u003c\u003d %g\u0027 %"},{"line_number":258,"context_line":"                (free, FALLOCATE_RESERVE))"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    if _sys_fallocate.available:"},{"line_number":261,"context_line":"        # Parameters are (fd, mode, offset, length)."}],"source_content_type":"text/x-python","patch_set":1,"id":"843ba683_2e4e26e2","side":"PARENT","line":258,"in_reply_to":"9a73d996_d6c246e6","updated":"2023-08-16 04:32:37.000000000","message":"I don\u0027t know what you mean. Makes sense how?","commit_id":"54f8dd0ff854c9cba511e81fe4e60bc98d8e99c9"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"28874659745ccb1104f8f2af35b707917acd7f13","unresolved":true,"context_lines":[{"line_number":94,"context_line":"# These constants are Linux-specific, and Python doesn\u0027t seem to know"},{"line_number":95,"context_line":"# about them. We ask anyway just in case that ever gets fixed."},{"line_number":96,"context_line":"#"},{"line_number":97,"context_line":"# The values were copied from the Linux 3.x kernel headers."},{"line_number":98,"context_line":"AF_ALG \u003d getattr(socket, \u0027AF_ALG\u0027, 38)"},{"line_number":99,"context_line":"F_SETPIPE_SZ \u003d getattr(fcntl, \u0027F_SETPIPE_SZ\u0027, 1031)"},{"line_number":100,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"0fa646ac_00b79223","line":97,"updated":"2023-10-02 20:25:03.000000000","message":"oic, the comment still exists - it was duplicated as part of th revert","commit_id":"beb32cbfd92ca0ca15099c28b2620474a8f91411"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0698425b113132ad6b34fa250cbebaba8727074d","unresolved":false,"context_lines":[{"line_number":94,"context_line":"# These constants are Linux-specific, and Python doesn\u0027t seem to know"},{"line_number":95,"context_line":"# about them. We ask anyway just in case that ever gets fixed."},{"line_number":96,"context_line":"#"},{"line_number":97,"context_line":"# The values were copied from the Linux 3.x kernel headers."},{"line_number":98,"context_line":"AF_ALG \u003d getattr(socket, \u0027AF_ALG\u0027, 38)"},{"line_number":99,"context_line":"F_SETPIPE_SZ \u003d getattr(fcntl, \u0027F_SETPIPE_SZ\u0027, 1031)"},{"line_number":100,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"bae7b573_c5252569","line":97,"in_reply_to":"0fa646ac_00b79223","updated":"2024-01-09 18:16:56.000000000","message":"Acknowledged","commit_id":"beb32cbfd92ca0ca15099c28b2620474a8f91411"}],"swift/container/backend.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"95f523799894344d0819220f69ca0c8135fd09e6","unresolved":true,"context_lines":[{"line_number":386,"context_line":"                 account\u003dNone, container\u003dNone, pending_timeout\u003dNone,"},{"line_number":387,"context_line":"                 stale_reads_ok\u003dFalse, skip_commits\u003dFalse,"},{"line_number":388,"context_line":"                 force_db_file\u003dFalse, fallocate_reserve\u003dNone,"},{"line_number":389,"context_line":"                 fallocate_is_percent\u003dNone):"},{"line_number":390,"context_line":"        self._init_db_file \u003d db_file"},{"line_number":391,"context_line":"        base_db_file \u003d make_db_file_path(db_file, None)"},{"line_number":392,"context_line":"        super(ContainerBroker, self).__init__("}],"source_content_type":"text/x-python","patch_set":5,"id":"718fa0e2_a2f3ecc9","line":389,"updated":"2023-10-02 19:35:59.000000000","message":"maybe **kwargs would future proof us a little here?","commit_id":"beb32cbfd92ca0ca15099c28b2620474a8f91411"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0698425b113132ad6b34fa250cbebaba8727074d","unresolved":false,"context_lines":[{"line_number":386,"context_line":"                 account\u003dNone, container\u003dNone, pending_timeout\u003dNone,"},{"line_number":387,"context_line":"                 stale_reads_ok\u003dFalse, skip_commits\u003dFalse,"},{"line_number":388,"context_line":"                 force_db_file\u003dFalse, fallocate_reserve\u003dNone,"},{"line_number":389,"context_line":"                 fallocate_is_percent\u003dNone):"},{"line_number":390,"context_line":"        self._init_db_file \u003d db_file"},{"line_number":391,"context_line":"        base_db_file \u003d make_db_file_path(db_file, None)"},{"line_number":392,"context_line":"        super(ContainerBroker, self).__init__("}],"source_content_type":"text/x-python","patch_set":5,"id":"10b58994_2a91fa25","line":389,"in_reply_to":"718fa0e2_a2f3ecc9","updated":"2024-01-09 18:16:56.000000000","message":"Acknowledged","commit_id":"beb32cbfd92ca0ca15099c28b2620474a8f91411"}],"swift/container/server.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"95f523799894344d0819220f69ca0c8135fd09e6","unresolved":true,"context_lines":[{"line_number":189,"context_line":"            (\u0027container\u0027, container),"},{"line_number":190,"context_line":"            (\u0027logger\u0027, self.logger),"},{"line_number":191,"context_line":"            (\u0027fallocate_reserve\u0027, self.fallocate_reserve),"},{"line_number":192,"context_line":"            (\u0027fallocate_is_percent\u0027, self.fallocate_is_percent),"},{"line_number":193,"context_line":"        ):"},{"line_number":194,"context_line":"            kwargs.setdefault(key, value)"},{"line_number":195,"context_line":"        return ContainerBroker(db_path, **kwargs)"}],"source_content_type":"text/x-python","patch_set":5,"id":"70473f88_740c2647","line":192,"updated":"2023-10-02 19:35:59.000000000","message":"and so the app/server already had these attirbutes configured...","commit_id":"beb32cbfd92ca0ca15099c28b2620474a8f91411"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0698425b113132ad6b34fa250cbebaba8727074d","unresolved":false,"context_lines":[{"line_number":189,"context_line":"            (\u0027container\u0027, container),"},{"line_number":190,"context_line":"            (\u0027logger\u0027, self.logger),"},{"line_number":191,"context_line":"            (\u0027fallocate_reserve\u0027, self.fallocate_reserve),"},{"line_number":192,"context_line":"            (\u0027fallocate_is_percent\u0027, self.fallocate_is_percent),"},{"line_number":193,"context_line":"        ):"},{"line_number":194,"context_line":"            kwargs.setdefault(key, value)"},{"line_number":195,"context_line":"        return ContainerBroker(db_path, **kwargs)"}],"source_content_type":"text/x-python","patch_set":5,"id":"441ddb6c_aaa0273f","line":192,"in_reply_to":"70473f88_740c2647","updated":"2024-01-09 18:16:56.000000000","message":"Acknowledged","commit_id":"beb32cbfd92ca0ca15099c28b2620474a8f91411"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"95f523799894344d0819220f69ca0c8135fd09e6","unresolved":true,"context_lines":[{"line_number":363,"context_line":"    def check_free_space(self, drive):"},{"line_number":364,"context_line":"        drive_root \u003d os.path.join(self.root, drive)"},{"line_number":365,"context_line":"        return fs_has_free_space("},{"line_number":366,"context_line":"            drive_root, self.fallocate_reserve, self.fallocate_is_percent)"},{"line_number":367,"context_line":""},{"line_number":368,"context_line":"    @public"},{"line_number":369,"context_line":"    @timing_stats()"}],"source_content_type":"text/x-python","patch_set":5,"id":"44c4a5e6_68866f75","line":366,"updated":"2023-10-02 19:35:59.000000000","message":"... and we\u0027re still using them in addition to plubming them into the brokers.","commit_id":"beb32cbfd92ca0ca15099c28b2620474a8f91411"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0698425b113132ad6b34fa250cbebaba8727074d","unresolved":false,"context_lines":[{"line_number":363,"context_line":"    def check_free_space(self, drive):"},{"line_number":364,"context_line":"        drive_root \u003d os.path.join(self.root, drive)"},{"line_number":365,"context_line":"        return fs_has_free_space("},{"line_number":366,"context_line":"            drive_root, self.fallocate_reserve, self.fallocate_is_percent)"},{"line_number":367,"context_line":""},{"line_number":368,"context_line":"    @public"},{"line_number":369,"context_line":"    @timing_stats()"}],"source_content_type":"text/x-python","patch_set":5,"id":"a6523805_ffd6cea1","line":366,"in_reply_to":"44c4a5e6_68866f75","updated":"2024-01-09 18:16:56.000000000","message":"Acknowledged","commit_id":"beb32cbfd92ca0ca15099c28b2620474a8f91411"}],"swift/obj/diskfile.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"95f523799894344d0819220f69ca0c8135fd09e6","unresolved":true,"context_lines":[{"line_number":1868,"context_line":"            try:"},{"line_number":1869,"context_line":"                fallocate_with_reserve("},{"line_number":1870,"context_line":"                    self._fd, self.manager.fallocate_reserve,"},{"line_number":1871,"context_line":"                    self.manager.fallocate_is_percent, self._size)"},{"line_number":1872,"context_line":"            except OSError as err:"},{"line_number":1873,"context_line":"                if err.errno in (errno.ENOSPC, errno.EDQUOT):"},{"line_number":1874,"context_line":"                    raise DiskFileNoSpace()"}],"source_content_type":"text/x-python","patch_set":5,"id":"0544320e_68da2ae9","line":1871,"updated":"2023-10-02 19:35:59.000000000","message":"the manager already had these?  oh - looks like there were added in the pre-req","commit_id":"beb32cbfd92ca0ca15099c28b2620474a8f91411"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0698425b113132ad6b34fa250cbebaba8727074d","unresolved":false,"context_lines":[{"line_number":1868,"context_line":"            try:"},{"line_number":1869,"context_line":"                fallocate_with_reserve("},{"line_number":1870,"context_line":"                    self._fd, self.manager.fallocate_reserve,"},{"line_number":1871,"context_line":"                    self.manager.fallocate_is_percent, self._size)"},{"line_number":1872,"context_line":"            except OSError as err:"},{"line_number":1873,"context_line":"                if err.errno in (errno.ENOSPC, errno.EDQUOT):"},{"line_number":1874,"context_line":"                    raise DiskFileNoSpace()"}],"source_content_type":"text/x-python","patch_set":5,"id":"164ec17d_c08674fc","line":1871,"in_reply_to":"0544320e_68da2ae9","updated":"2024-01-09 18:16:56.000000000","message":"Acknowledged","commit_id":"beb32cbfd92ca0ca15099c28b2620474a8f91411"}],"test/unit/common/test_utils.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5c05cfb25bcd36c0e3f99db54089977cad30d858","unresolved":true,"context_lines":[{"line_number":2748,"context_line":"        self.assertTrue(is_percent)"},{"line_number":2749,"context_line":"        fallocate_value, is_percent \u003d utils.config_fallocate_value(\u002710.000%\u0027)"},{"line_number":2750,"context_line":"        self.assertEqual(fallocate_value, 10.000)"},{"line_number":2751,"context_line":"        self.assertTrue(is_percent)"},{"line_number":2752,"context_line":""},{"line_number":2753,"context_line":"    def test_lock_file(self):"},{"line_number":2754,"context_line":"        flags \u003d os.O_CREAT | os.O_RDWR"}],"source_content_type":"text/x-python","patch_set":1,"id":"0ae4550e_9a8f1c23","line":2751,"updated":"2023-08-15 22:41:41.000000000","message":"these look great!","commit_id":"f67bf2db953b49fa81b59fc7af592d80c83615b5"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0698425b113132ad6b34fa250cbebaba8727074d","unresolved":false,"context_lines":[{"line_number":2748,"context_line":"        self.assertTrue(is_percent)"},{"line_number":2749,"context_line":"        fallocate_value, is_percent \u003d utils.config_fallocate_value(\u002710.000%\u0027)"},{"line_number":2750,"context_line":"        self.assertEqual(fallocate_value, 10.000)"},{"line_number":2751,"context_line":"        self.assertTrue(is_percent)"},{"line_number":2752,"context_line":""},{"line_number":2753,"context_line":"    def test_lock_file(self):"},{"line_number":2754,"context_line":"        flags \u003d os.O_CREAT | os.O_RDWR"}],"source_content_type":"text/x-python","patch_set":1,"id":"c1a7b2a8_7ae0d567","line":2751,"in_reply_to":"0ae4550e_9a8f1c23","updated":"2024-01-09 18:16:56.000000000","message":"Acknowledged","commit_id":"f67bf2db953b49fa81b59fc7af592d80c83615b5"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1b4f005f4f882d75f36f13cdf0a3e8a0a263fd53","unresolved":true,"context_lines":[{"line_number":9110,"context_line":"            utils.fallocate(88, 2048)"},{"line_number":9111,"context_line":"        self.assertEqual("},{"line_number":9112,"context_line":"            str(catcher.exception),"},{"line_number":9113,"context_line":"            \u0027[Errno %d] FALLOCATE_RESERVE fail 1024 \u003c\u003d 1024\u0027"},{"line_number":9114,"context_line":"            % errno.ENOSPC)"},{"line_number":9115,"context_line":"        sys_fallocate_mock.assert_not_called()"},{"line_number":9116,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"aefb292f_a9f98b87","line":9113,"updated":"2023-08-17 15:07:48.000000000","message":"this assertion changed due to the drive-by","commit_id":"408c9cc79986298bab59f42af0c78454f4c110b6"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"b017385304c3d14c0e08e4e86d6df70f03284851","unresolved":true,"context_lines":[{"line_number":9110,"context_line":"            utils.fallocate(88, 2048)"},{"line_number":9111,"context_line":"        self.assertEqual("},{"line_number":9112,"context_line":"            str(catcher.exception),"},{"line_number":9113,"context_line":"            \u0027[Errno %d] FALLOCATE_RESERVE fail 1024 \u003c\u003d 1024\u0027"},{"line_number":9114,"context_line":"            % errno.ENOSPC)"},{"line_number":9115,"context_line":"        sys_fallocate_mock.assert_not_called()"},{"line_number":9116,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"91e9df3e_28885caa","line":9113,"in_reply_to":"586b57ae_e4fef153","updated":"2024-01-11 12:01:35.000000000","message":"IIUC the message is correct, it\u0027s stating what the outcome would be. It might be useful to include the requested size i.e. \"1k is reserved, there\u0027s 3k available, so you can\u0027t allocate 2k\", but that kind of change is getting way off topic IMHO. I might even suggest pulling the entire drive-by out to a follow on.","commit_id":"408c9cc79986298bab59f42af0c78454f4c110b6"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0698425b113132ad6b34fa250cbebaba8727074d","unresolved":true,"context_lines":[{"line_number":9110,"context_line":"            utils.fallocate(88, 2048)"},{"line_number":9111,"context_line":"        self.assertEqual("},{"line_number":9112,"context_line":"            str(catcher.exception),"},{"line_number":9113,"context_line":"            \u0027[Errno %d] FALLOCATE_RESERVE fail 1024 \u003c\u003d 1024\u0027"},{"line_number":9114,"context_line":"            % errno.ENOSPC)"},{"line_number":9115,"context_line":"        sys_fallocate_mock.assert_not_called()"},{"line_number":9116,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"586b57ae_e4fef153","line":9113,"in_reply_to":"aefb292f_a9f98b87","updated":"2024-01-09 18:16:56.000000000","message":"maybe addressed if we merge in the follow up:\n\nhttps://review.opendev.org/c/openstack/swift/+/904870/4/test/unit/common/test_utils.py#9069\n\n... although now i\u0027m confused about the 1024 \u003c\u003d 1024 error; the comment/setup seems to indicate \"filesystem has 3/100 blocks of size 1024 free\" - I guess the error message should take size into account when reporting % free?","commit_id":"408c9cc79986298bab59f42af0c78454f4c110b6"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1b4f005f4f882d75f36f13cdf0a3e8a0a263fd53","unresolved":true,"context_lines":[{"line_number":9125,"context_line":"            utils.fallocate(88, 0)"},{"line_number":9126,"context_line":"        self.assertEqual("},{"line_number":9127,"context_line":"            str(catcher.exception),"},{"line_number":9128,"context_line":"            \u0027[Errno %d] FALLOCATE_RESERVE fail 102400 \u003c\u003d 102400\u0027"},{"line_number":9129,"context_line":"            % errno.ENOSPC)"},{"line_number":9130,"context_line":"        sys_fallocate_mock.assert_not_called()"},{"line_number":9131,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"6299def5_cb86f284","line":9128,"updated":"2023-08-17 15:07:48.000000000","message":"this assertion changed due to the drive-by","commit_id":"408c9cc79986298bab59f42af0c78454f4c110b6"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0698425b113132ad6b34fa250cbebaba8727074d","unresolved":false,"context_lines":[{"line_number":9125,"context_line":"            utils.fallocate(88, 0)"},{"line_number":9126,"context_line":"        self.assertEqual("},{"line_number":9127,"context_line":"            str(catcher.exception),"},{"line_number":9128,"context_line":"            \u0027[Errno %d] FALLOCATE_RESERVE fail 102400 \u003c\u003d 102400\u0027"},{"line_number":9129,"context_line":"            % errno.ENOSPC)"},{"line_number":9130,"context_line":"        sys_fallocate_mock.assert_not_called()"},{"line_number":9131,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"b4d6271b_ffddfc50","line":9128,"in_reply_to":"6299def5_cb86f284","updated":"2024-01-09 18:16:56.000000000","message":"Acknowledged","commit_id":"408c9cc79986298bab59f42af0c78454f4c110b6"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c99bfc6148a37fc954ef48ba0810d5433d33f7bd","unresolved":true,"context_lines":[{"line_number":8934,"context_line":"            utils.fallocate_with_reserve(0, 1, True, 0, 1 \u003c\u003c 64)"},{"line_number":8935,"context_line":"        self.assertEqual([], sys_fallocate_mock.mock_calls)"},{"line_number":8936,"context_line":"        # sanity check"},{"line_number":8937,"context_line":"        utils.fallocate_with_reserve(0, 1, True, 0, 0)"},{"line_number":8938,"context_line":"        self.assertEqual("},{"line_number":8939,"context_line":"            [mock.call(0, utils.libc.FALLOC_FL_KEEP_SIZE, mock.ANY, mock.ANY)],"},{"line_number":8940,"context_line":"            sys_fallocate_mock.mock_calls)"}],"source_content_type":"text/x-python","patch_set":6,"id":"2f79d052_fc935bb1","line":8937,"updated":"2024-01-08 19:10:25.000000000","message":"this seemed to work on master\n\n\tvagrant@saio:~$ pytest swift/test/unit/common/test_utils.py::TestFallocate::test_arg_bounds\n\t\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d test session starts \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\tplatform linux -- Python 3.10.12, pytest-7.4.3, pluggy-1.3.0 -- /usr/bin/python\n\tcachedir: .pytest_cache\n\trootdir: /home/vagrant/swift\n\tconfigfile: tox.ini\n\tplugins: cov-4.1.0\n\tcollected 1 item                                                                                                                                                                      \n\n\tswift/test/unit/common/test_utils.py::TestFallocate::test_arg_bounds PASSED                                                                                                     [100%]\n\n\t\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d warnings summary \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\t../../usr/local/lib/python3.10/dist-packages/eventlet/support/greenlets.py:1\n\t  /usr/local/lib/python3.10/dist-packages/eventlet/support/greenlets.py:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives\n\t    import distutils.version\n\n\t-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html\n\t\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d 1 passed, 1 warning in 1.05s \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\tvagrant@saio:~$ pytest swift/test/unit/common/test_utils.py::TestFallocate::test_arg_bounds -s\n\t\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d test session starts \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\tplatform linux -- Python 3.10.12, pytest-7.4.3, pluggy-1.3.0 -- /usr/bin/python\n\tcachedir: .pytest_cache\n\trootdir: /home/vagrant/swift\n\tconfigfile: tox.ini\n\tplugins: cov-4.1.0\n\tcollected 1 item                                                                                                                                                                      \n\n\tswift/test/unit/common/test_utils.py::TestFallocate::test_arg_bounds PASSED\n\n\t\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d warnings summary \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\t../../usr/local/lib/python3.10/dist-packages/eventlet/support/greenlets.py:1\n\t  /usr/local/lib/python3.10/dist-packages/eventlet/support/greenlets.py:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives\n\t    import distutils.version\n\n\t-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html\n\t\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d 1 passed, 1 warning in 0.59s \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\n... but blows up on this change (when you capture stdout)\n\n    vagrant@saio:~$ pytest swift/test/unit/common/test_utils.py::TestFallocateWithReserve::test_arg_bounds\n    ...\n\n    swift/test/unit/common/test_utils.py::TestFallocateWithReserve::test_arg_bounds PASSED                                                                                          [100%]\n\n    vagrant@saio:~$ pytest swift/test/unit/common/test_utils.py::TestFallocateWithReserve::test_arg_bounds -s\n    \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d test session starts \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n    platform linux -- Python 3.10.12, pytest-7.4.3, pluggy-1.3.0 -- /usr/bin/python\n    cachedir: .pytest_cache\n    rootdir: /home/vagrant/swift\n    configfile: tox.ini\n    plugins: cov-4.1.0\n    collected 1 item                                                                                                                                                                      \n\n    swift/test/unit/common/test_utils.py::TestFallocateWithReserve::test_arg_bounds FAILED\n\n    \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d FAILURES \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n    ______________________________________________________________________ TestFallocateWithReserve.test_arg_bounds _______________________________________________________________________\n\n    self \u003d \u003ctest.unit.common.test_utils.TestFallocateWithReserve testMethod\u003dtest_arg_bounds\u003e, sys_fallocate_mock \u003d \u003cMagicMock name\u003d\u0027_sys_fallocate\u0027 id\u003d\u0027139635466609824\u0027\u003e\n    sys_posix_fallocate_mock \u003d \u003cMagicMock name\u003d\u0027_sys_posix_fallocate\u0027 id\u003d\u0027139635466764880\u0027\u003e, get_errno_mock \u003d \u003cMagicMock name\u003d\u0027get_errno\u0027 id\u003d\u0027139635466608624\u0027\u003e\n\n        def test_arg_bounds(self, sys_fallocate_mock,\n                            sys_posix_fallocate_mock, get_errno_mock):\n            sys_fallocate_mock.available \u003d True\n            sys_fallocate_mock.return_value \u003d 0\n            with self.assertRaises(ValueError):\n                utils.fallocate_with_reserve(0, 1, True, 1 \u003c\u003c 64, 0)\n            with self.assertRaises(ValueError):\n                utils.fallocate_with_reserve(0, 1, True, 0, -1)\n            with self.assertRaises(ValueError):\n                utils.fallocate_with_reserve(0, 1, True, 0, 1 \u003c\u003c 64)\n            self.assertEqual([], sys_fallocate_mock.mock_calls)\n            # sanity check\n    \u003e       utils.fallocate_with_reserve(0, 1, True, 0, 0)\n\n    swift/test/unit/common/test_utils.py:8937: \n    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\n\n    fd \u003d 0, fallocate_reserve \u003d 1, fallocate_is_percent \u003d True, size \u003d 0, offset \u003d 0\n\n        def fallocate_with_reserve(fd, fallocate_reserve, fallocate_is_percent,\n                                   size, offset\u003d0):\n            \"\"\"\n            Pre-allocate disk space for a file while holding some space in reserve.\n        \n            This function can be disabled by calling disable_fallocate(). If no\n            suitable C function is available in libc, this function is a no-op.\n        \n            :param fd: file descriptor\n            :param fallocate_reserve: minimum bytes or percentage of free space\n                to be kept in reserve\n            :param fallocate_is_percent: if True, then fallocate_reserve is\n                treated as a percentage (0-100) of the filesystem\u0027s capacity;\n                if False, fallocate_reserve is a number of free bytes\n            :param size: size to allocate (in bytes)\n            \"\"\"\n            global _fallocate_enabled\n            if not _fallocate_enabled:\n                return\n        \n            if size \u003c 0:\n                size \u003d 0  # Done historically; not really sure why\n            if size \u003e\u003d (1 \u003c\u003c 63):\n                raise ValueError(\u0027size must be less than 2 ** 63\u0027)\n            if offset \u003c 0:\n                raise ValueError(\u0027offset must be non-negative\u0027)\n            if offset \u003e\u003d (1 \u003c\u003c 63):\n                raise ValueError(\u0027offset must be less than 2 ** 63\u0027)\n        \n            # Make sure there\u0027s some (configurable) amount of free space in\n            # addition to the number of bytes we\u0027re allocating.\n            if fallocate_reserve:\n                free, reserved \u003d _free_and_reserved_space(\n                    fd, fallocate_reserve, fallocate_is_percent)\n                if free - size \u003c\u003d reserved:\n    \u003e               raise OSError(\n                        errno.ENOSPC,\n                        \u0027FALLOCATE_RESERVE fail %d \u003c\u003d %d\u0027 %\n                        (free - size, reserved))\n    E               OSError: [Errno 28] FALLOCATE_RESERVE fail 0 \u003c\u003d 0\n\n    swift/swift/common/utils/__init__.py:903: OSError\n    \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d warnings summary \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n    ../../usr/local/lib/python3.10/dist-packages/eventlet/support/greenlets.py:1\n      /usr/local/lib/python3.10/dist-packages/eventlet/support/greenlets.py:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives\n        import distutils.version\n\n    -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html\n    \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d short test summary info \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n    FAILED swift/test/unit/common/test_utils.py::TestFallocateWithReserve::test_arg_bounds - OSError: [Errno 28] FALLOCATE_RESERVE fail 0 \u003c\u003d 0\n    \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d 1 failed, 1 warning in 1.29s \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d","commit_id":"0f5cccfe0952c30a4203608391b347537b392950"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"49b3f1fffb2a57d1c365c470b4d259a85b22852f","unresolved":true,"context_lines":[{"line_number":8934,"context_line":"            utils.fallocate_with_reserve(0, 1, True, 0, 1 \u003c\u003c 64)"},{"line_number":8935,"context_line":"        self.assertEqual([], sys_fallocate_mock.mock_calls)"},{"line_number":8936,"context_line":"        # sanity check"},{"line_number":8937,"context_line":"        utils.fallocate_with_reserve(0, 1, True, 0, 0)"},{"line_number":8938,"context_line":"        self.assertEqual("},{"line_number":8939,"context_line":"            [mock.call(0, utils.libc.FALLOC_FL_KEEP_SIZE, mock.ANY, mock.ANY)],"},{"line_number":8940,"context_line":"            sys_fallocate_mock.mock_calls)"}],"source_content_type":"text/x-python","patch_set":6,"id":"c23230e5_f6f6649b","line":8937,"in_reply_to":"2f79d052_fc935bb1","updated":"2024-01-08 20:31:26.000000000","message":"Good catch! Pretty sure I\u0027d tried to just replace the patched `FALLOCATE_RESERVE` (at the class level) with the default values (ie, `1, True,`) and only swapped back to 0 if the test seemed to require it. I just didn\u0027t realize that this test would _sometimes_ require it (depending on whether the test running is running in capture-mode or not).","commit_id":"0f5cccfe0952c30a4203608391b347537b392950"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"0698425b113132ad6b34fa250cbebaba8727074d","unresolved":false,"context_lines":[{"line_number":8934,"context_line":"            utils.fallocate_with_reserve(0, 1, True, 0, 1 \u003c\u003c 64)"},{"line_number":8935,"context_line":"        self.assertEqual([], sys_fallocate_mock.mock_calls)"},{"line_number":8936,"context_line":"        # sanity check"},{"line_number":8937,"context_line":"        utils.fallocate_with_reserve(0, 1, True, 0, 0)"},{"line_number":8938,"context_line":"        self.assertEqual("},{"line_number":8939,"context_line":"            [mock.call(0, utils.libc.FALLOC_FL_KEEP_SIZE, mock.ANY, mock.ANY)],"},{"line_number":8940,"context_line":"            sys_fallocate_mock.mock_calls)"}],"source_content_type":"text/x-python","patch_set":6,"id":"37e9a804_6ecd305c","line":8937,"in_reply_to":"c23230e5_f6f6649b","updated":"2024-01-09 18:16:56.000000000","message":"Done","commit_id":"0f5cccfe0952c30a4203608391b347537b392950"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"6c065895276ce52458eb52bc37c14bf7737d036c","unresolved":true,"context_lines":[{"line_number":8794,"context_line":"@patch(\u0027ctypes.get_errno\u0027)"},{"line_number":8795,"context_line":"@patch.object(utils, \u0027_sys_posix_fallocate\u0027)"},{"line_number":8796,"context_line":"@patch.object(utils, \u0027_sys_fallocate\u0027)"},{"line_number":8797,"context_line":"@patch.object(utils, \u0027FALLOCATE_RESERVE\u0027, 0)"},{"line_number":8798,"context_line":"class TestFallocate(unittest.TestCase):"},{"line_number":8799,"context_line":"    def test_fallocate(self, sys_fallocate_mock,"},{"line_number":8800,"context_line":"                       sys_posix_fallocate_mock, get_errno_mock):"}],"source_content_type":"text/x-python","patch_set":7,"id":"f774e800_32be7349","side":"PARENT","line":8797,"updated":"2024-01-08 22:11:12.000000000","message":"maybe this TestCase is not so different than TestFallocateReserve?\n\nMaybe this one should also `patch.object(os, \u0027fstatvfs\u0027)` since it no longer disables the stat call by globally disabling FALLOCATE_RESERVE?","commit_id":"d31a54a65c186550a99bb985f056c071690a3939"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"6c065895276ce52458eb52bc37c14bf7737d036c","unresolved":true,"context_lines":[{"line_number":8917,"context_line":"        sys_fallocate_mock.available \u003d True"},{"line_number":8918,"context_line":"        sys_fallocate_mock.return_value \u003d 0"},{"line_number":8919,"context_line":"        with self.assertRaises(ValueError):"},{"line_number":8920,"context_line":"            utils.fallocate(0, 1 \u003c\u003c 64, 0)"},{"line_number":8921,"context_line":"        with self.assertRaises(ValueError):"},{"line_number":8922,"context_line":"            utils.fallocate(0, 0, -1)"},{"line_number":8923,"context_line":"        with self.assertRaises(ValueError):"}],"source_content_type":"text/x-python","patch_set":7,"id":"e542efa9_eccc7aed","side":"PARENT","line":8920,"updated":"2024-01-08 22:11:12.000000000","message":"the choice of zero as the stub fd in these tests is confusing; other methods in this TestCase used 1234 and 321 and would have blown up more obviously if we tried to call stat on them by not forcing reserve\u003d0","commit_id":"d31a54a65c186550a99bb985f056c071690a3939"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"6c065895276ce52458eb52bc37c14bf7737d036c","unresolved":true,"context_lines":[{"line_number":8794,"context_line":"@patch(\u0027ctypes.get_errno\u0027)"},{"line_number":8795,"context_line":"@patch.object(utils.libc, \u0027_sys_posix_fallocate\u0027)"},{"line_number":8796,"context_line":"@patch.object(utils.libc, \u0027_sys_fallocate\u0027)"},{"line_number":8797,"context_line":"class TestFallocateWithReserve(unittest.TestCase):"},{"line_number":8798,"context_line":"    def test_fallocate(self, sys_fallocate_mock,"},{"line_number":8799,"context_line":"                       sys_posix_fallocate_mock, get_errno_mock):"},{"line_number":8800,"context_line":"        sys_fallocate_mock.available \u003d True"}],"source_content_type":"text/x-python","patch_set":7,"id":"551c133a_5b84d28e","line":8797,"updated":"2024-01-08 22:11:12.000000000","message":"when you think about it; this is more like TestFallocateButYouCanNotUseReserve","commit_id":"86212fd89a986c9d14f92bbf11303f4597412368"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"6c065895276ce52458eb52bc37c14bf7737d036c","unresolved":true,"context_lines":[{"line_number":8929,"context_line":"        # Note that we want to have zero reserve so we don\u0027t even get as far"},{"line_number":8930,"context_line":"        # as doing the statvfs -- we aren\u0027t actually mocking that out, so we"},{"line_number":8931,"context_line":"        # can get different results depending on whether our test runner is"},{"line_number":8932,"context_line":"        # capturing stdout/stderr (and blocking stdin, fd\u003d0!) or not"},{"line_number":8933,"context_line":"        with self.assertRaises(ValueError):"},{"line_number":8934,"context_line":"            utils.fallocate_with_reserve(0, 0, True, 1 \u003c\u003c 64, 0)"},{"line_number":8935,"context_line":"        with self.assertRaises(ValueError):"}],"source_content_type":"text/x-python","patch_set":7,"id":"dbe33d85_3765d854","line":8932,"updated":"2024-01-08 22:11:12.000000000","message":"basically all of these tests are:\n\nfallocate(fd_does_not_matter, size, offset) \u003d\u003e fallocate_with_reserve(fd_does_not_matter, as_long_as_reserve_is_zero, percent, size, offset)","commit_id":"86212fd89a986c9d14f92bbf11303f4597412368"}],"test/unit/common/utils/test_libc.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"5c05cfb25bcd36c0e3f99db54089977cad30d858","unresolved":true,"context_lines":[{"line_number":73,"context_line":"        fallocate_value, is_percent \u003d libc.config_fallocate_value(\u002710.000%\u0027)"},{"line_number":74,"context_line":"        self.assertEqual(fallocate_value, 10.000)"},{"line_number":75,"context_line":"        self.assertTrue(is_percent)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def test_fallocate(self, sys_fallocate_mock,"},{"line_number":78,"context_line":"                       sys_posix_fallocate_mock, get_errno_mock):"},{"line_number":79,"context_line":"        sys_fallocate_mock.available \u003d True"}],"source_content_type":"text/x-python","patch_set":1,"id":"73e49e67_7cd31cf9","side":"PARENT","line":76,"updated":"2023-08-15 22:41:41.000000000","message":"oh, you just moved them.","commit_id":"54f8dd0ff854c9cba511e81fe4e60bc98d8e99c9"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"fe34de1ffded92c0d92f38c3627aa7e9b3c6bb26","unresolved":true,"context_lines":[{"line_number":73,"context_line":"        fallocate_value, is_percent \u003d libc.config_fallocate_value(\u002710.000%\u0027)"},{"line_number":74,"context_line":"        self.assertEqual(fallocate_value, 10.000)"},{"line_number":75,"context_line":"        self.assertTrue(is_percent)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def test_fallocate(self, sys_fallocate_mock,"},{"line_number":78,"context_line":"                       sys_posix_fallocate_mock, get_errno_mock):"},{"line_number":79,"context_line":"        sys_fallocate_mock.available \u003d True"}],"source_content_type":"text/x-python","patch_set":1,"id":"98ba6616_2d04e855","side":"PARENT","line":76,"in_reply_to":"73e49e67_7cd31cf9","updated":"2023-08-16 04:32:37.000000000","message":"Yes, 100%. If you aren\u0027t looking at https://review.opendev.org/c/openstack/swift/+/879721 as you\u0027re reviewing and thinking of this as something just shy of a revert, you\u0027re missing out.","commit_id":"54f8dd0ff854c9cba511e81fe4e60bc98d8e99c9"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"95f523799894344d0819220f69ca0c8135fd09e6","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        fallocate_value, is_percent \u003d libc.config_fallocate_value(\u002710.000%\u0027)"},{"line_number":74,"context_line":"        self.assertEqual(fallocate_value, 10.000)"},{"line_number":75,"context_line":"        self.assertTrue(is_percent)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def test_fallocate(self, sys_fallocate_mock,"},{"line_number":78,"context_line":"                       sys_posix_fallocate_mock, get_errno_mock):"},{"line_number":79,"context_line":"        sys_fallocate_mock.available \u003d True"}],"source_content_type":"text/x-python","patch_set":1,"id":"61918cfe_6473bf50","side":"PARENT","line":76,"in_reply_to":"98ba6616_2d04e855","updated":"2023-10-02 19:35:59.000000000","message":"Done","commit_id":"54f8dd0ff854c9cba511e81fe4e60bc98d8e99c9"}]}
