)]}'
{"swift/common/utils.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d00b9b7bf4b409a52c08afa7504ef3b711d79d6d","unresolved":false,"context_lines":[{"line_number":766,"context_line":"        if not self.noop:"},{"line_number":767,"context_line":"            # check available free space, unless we are freeing space"},{"line_number":768,"context_line":"            # 3 is FALLOC_FL_PUNCH_HOLE|FALLOC_FL_KEEP_SIZE"},{"line_number":769,"context_line":"            if FALLOCATE_RESERVE \u003e 0 and mode !\u003d 3:"},{"line_number":770,"context_line":"                st \u003d os.fstatvfs(fd)"},{"line_number":771,"context_line":"                free \u003d st.f_frsize * st.f_bavail - length.value"},{"line_number":772,"context_line":"                if FALLOCATE_IS_PERCENT:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f9dbf25_2155dd1d","line":769,"range":{"start_line":769,"start_character":41,"end_line":769,"end_character":50},"updated":"2018-03-04 00:27:11.000000000","message":"How much do we care about other flags? Would something like\n\n not (mode \u0026 3)\n\nor\n\n (mode \u0026 3) !\u003d 3\n\nbe better? Honest question -- I don\u0027t have enough context to know.","commit_id":"86f648ede08fccff91417a032aef7d17bfa06b78"},{"author":{"_account_id":25251,"name":"Alexandre Lécuyer","email":"alexandre.lecuyer@corp.ovh.com","username":"alecuyer"},"change_message_id":"56c6384945ac39e46090cbf0bb2224471b6f6643","unresolved":false,"context_lines":[{"line_number":766,"context_line":"        if not self.noop:"},{"line_number":767,"context_line":"            # check available free space, unless we are freeing space"},{"line_number":768,"context_line":"            # 3 is FALLOC_FL_PUNCH_HOLE|FALLOC_FL_KEEP_SIZE"},{"line_number":769,"context_line":"            if FALLOCATE_RESERVE \u003e 0 and mode !\u003d 3:"},{"line_number":770,"context_line":"                st \u003d os.fstatvfs(fd)"},{"line_number":771,"context_line":"                free \u003d st.f_frsize * st.f_bavail - length.value"},{"line_number":772,"context_line":"                if FALLOCATE_IS_PERCENT:"}],"source_content_type":"text/x-python","patch_set":3,"id":"df7087c5_ac23e5bc","line":769,"range":{"start_line":769,"start_character":41,"end_line":769,"end_character":50},"in_reply_to":"1f9dbf25_2155dd1d","updated":"2018-03-13 14:57:03.000000000","message":"You\u0027re right, that\u0027s better.\n\nIn which case I think I should check for FALLOC_FL_PUNCH_HOLE (2) only.  Even tho it cannot currently be called without FALLOC_FL_KEEP_SIZE (as per fallocate() manpage, and code in linux\u0027s vfs_fallocate()), that might change, and that is the flag that means that we are freeing space, not allocating.\n\nI hope I make sense, I you think it\u0027s better, I can check for both flags.","commit_id":"86f648ede08fccff91417a032aef7d17bfa06b78"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d00b9b7bf4b409a52c08afa7504ef3b711d79d6d","unresolved":false,"context_lines":[{"line_number":789,"context_line":"    _sys_fallocate \u003d FallocateWrapper(noop\u003dTrue)"},{"line_number":790,"context_line":""},{"line_number":791,"context_line":""},{"line_number":792,"context_line":"def fallocate(fd, size, offset\u003d0, mode\u003d1):"},{"line_number":793,"context_line":"    \"\"\""},{"line_number":794,"context_line":"    Pre-allocate disk space for a file."},{"line_number":795,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1f9dbf25_e134d5fd","line":792,"range":{"start_line":792,"start_character":34,"end_line":792,"end_character":40},"updated":"2018-03-04 00:27:11.000000000","message":"If we\u0027re passing these around as args, I wonder if we should define\n\n FALLOC_FL_KEEP_SIZE \u003d 1\n FALLOC_FL_PUNCH_HOLE \u003d 2\n\nat the top of utils...","commit_id":"86f648ede08fccff91417a032aef7d17bfa06b78"},{"author":{"_account_id":25251,"name":"Alexandre Lécuyer","email":"alexandre.lecuyer@corp.ovh.com","username":"alecuyer"},"change_message_id":"56c6384945ac39e46090cbf0bb2224471b6f6643","unresolved":false,"context_lines":[{"line_number":789,"context_line":"    _sys_fallocate \u003d FallocateWrapper(noop\u003dTrue)"},{"line_number":790,"context_line":""},{"line_number":791,"context_line":""},{"line_number":792,"context_line":"def fallocate(fd, size, offset\u003d0, mode\u003d1):"},{"line_number":793,"context_line":"    \"\"\""},{"line_number":794,"context_line":"    Pre-allocate disk space for a file."},{"line_number":795,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"df7087c5_cc11795f","line":792,"range":{"start_line":792,"start_character":34,"end_line":792,"end_character":40},"in_reply_to":"1f9dbf25_e134d5fd","updated":"2018-03-13 14:57:03.000000000","message":"will do","commit_id":"86f648ede08fccff91417a032aef7d17bfa06b78"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"23020eedea2e42e7d3b976560c6fa54d31ed5f16","unresolved":false,"context_lines":[{"line_number":781,"context_line":"                        (free, FALLOCATE_RESERVE))"},{"line_number":782,"context_line":"        args \u003d {"},{"line_number":783,"context_line":"            \u0027fallocate\u0027: (fd, mode, offset, length),"},{"line_number":784,"context_line":"            \u0027posix_fallocate\u0027: (fd, offset, length)"},{"line_number":785,"context_line":"        }"},{"line_number":786,"context_line":"        return self.fallocate(*args[self.func_name])"},{"line_number":787,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"bf659307_fc0cf694","line":784,"range":{"start_line":784,"start_character":32,"end_line":784,"end_character":50},"updated":"2018-04-02 21:10:12.000000000","message":"No mode here -- if we\u0027re forced to use posix_fallocate, what does it mean to try to punch a hole? Should we trivially succeed, and make no syscall? Raise an error? Doing the same thing as when we want *more* space instead of less seems ... not right...","commit_id":"09fd77e522adecdcc0efcc3a72f081a7ad1a83a3"},{"author":{"_account_id":25251,"name":"Alexandre Lécuyer","email":"alexandre.lecuyer@corp.ovh.com","username":"alecuyer"},"change_message_id":"9e629e2f2c52f3b1a87b74a3d9c6bb15f78bf07b","unresolved":false,"context_lines":[{"line_number":781,"context_line":"                        (free, FALLOCATE_RESERVE))"},{"line_number":782,"context_line":"        args \u003d {"},{"line_number":783,"context_line":"            \u0027fallocate\u0027: (fd, mode, offset, length),"},{"line_number":784,"context_line":"            \u0027posix_fallocate\u0027: (fd, offset, length)"},{"line_number":785,"context_line":"        }"},{"line_number":786,"context_line":"        return self.fallocate(*args[self.func_name])"},{"line_number":787,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"bf659307_066474e4","line":784,"range":{"start_line":784,"start_character":32,"end_line":784,"end_character":50},"in_reply_to":"bf659307_fc0cf694","updated":"2018-04-09 14:17:10.000000000","message":"Right, this must change. I think we want to raise an error rather than do nothing if we try to punch a hole and posix_fallocate has been loaded (if noop is False).","commit_id":"09fd77e522adecdcc0efcc3a72f081a7ad1a83a3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"23020eedea2e42e7d3b976560c6fa54d31ed5f16","unresolved":false,"context_lines":[{"line_number":807,"context_line":"        _sys_fallocate \u003d FallocateWrapper()"},{"line_number":808,"context_line":"    if size \u003c 0:"},{"line_number":809,"context_line":"        size \u003d 0"},{"line_number":810,"context_line":"    ret \u003d _sys_fallocate(fd, mode, ctypes.c_uint64(offset),"},{"line_number":811,"context_line":"                         ctypes.c_uint64(size))"},{"line_number":812,"context_line":"    err \u003d ctypes.get_errno()"},{"line_number":813,"context_line":"    if ret and err not in (0, errno.ENOSYS, errno.EOPNOTSUPP,"}],"source_content_type":"text/x-python","patch_set":5,"id":"bf659307_9cfcdab5","line":810,"range":{"start_line":810,"start_character":29,"end_line":810,"end_character":33},"updated":"2018-04-02 21:10:12.000000000","message":"We don\u0027t need the ctypes marshaling from earlier patchsets? I suppose not -- the original would just use a literal 1...","commit_id":"09fd77e522adecdcc0efcc3a72f081a7ad1a83a3"},{"author":{"_account_id":25251,"name":"Alexandre Lécuyer","email":"alexandre.lecuyer@corp.ovh.com","username":"alecuyer"},"change_message_id":"9e629e2f2c52f3b1a87b74a3d9c6bb15f78bf07b","unresolved":false,"context_lines":[{"line_number":807,"context_line":"        _sys_fallocate \u003d FallocateWrapper()"},{"line_number":808,"context_line":"    if size \u003c 0:"},{"line_number":809,"context_line":"        size \u003d 0"},{"line_number":810,"context_line":"    ret \u003d _sys_fallocate(fd, mode, ctypes.c_uint64(offset),"},{"line_number":811,"context_line":"                         ctypes.c_uint64(size))"},{"line_number":812,"context_line":"    err \u003d ctypes.get_errno()"},{"line_number":813,"context_line":"    if ret and err not in (0, errno.ENOSYS, errno.EOPNOTSUPP,"}],"source_content_type":"text/x-python","patch_set":5,"id":"bf659307_669a10c6","line":810,"range":{"start_line":810,"start_character":29,"end_line":810,"end_character":33},"in_reply_to":"bf659307_9cfcdab5","updated":"2018-04-09 14:17:10.000000000","message":"that\u0027s right it is not needed for the mode.","commit_id":"09fd77e522adecdcc0efcc3a72f081a7ad1a83a3"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"f92e90c8170b04c5d63493024baf40c62e1ca464","unresolved":false,"context_lines":[{"line_number":116,"context_line":"FALLOCATE_IS_PERCENT \u003d False"},{"line_number":117,"context_line":"# fallocate flags"},{"line_number":118,"context_line":"FALLOC_FL_KEEP_SIZE \u003d 1"},{"line_number":119,"context_line":"FALLOC_FL_PUNCH_HOLE \u003d 2"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"# from /usr/src/linux-headers-*/include/uapi/linux/resource.h"},{"line_number":122,"context_line":"PRIO_PROCESS \u003d 0"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_98bb0074","line":119,"updated":"2018-09-14 00:09:03.000000000","message":"Though I don\u0027t think the flag can be changed in different linux environment, but it might be nice to have a notice on the flag value like 2 lines below. Probably it\u0027s from falloc.h on... linux-headers?\n\nref:\nhttps://github.com/torvalds/linux/blob/master/include/uapi/linux/falloc.h#L5-L6","commit_id":"b0917508e8f1b2183408f262fa0f7699dc9881e5"},{"author":{"_account_id":25251,"name":"Alexandre Lécuyer","email":"alexandre.lecuyer@corp.ovh.com","username":"alecuyer"},"change_message_id":"c49d56bef3bb75f5d777fb90688ac6dbad4b3da2","unresolved":false,"context_lines":[{"line_number":116,"context_line":"FALLOCATE_IS_PERCENT \u003d False"},{"line_number":117,"context_line":"# fallocate flags"},{"line_number":118,"context_line":"FALLOC_FL_KEEP_SIZE \u003d 1"},{"line_number":119,"context_line":"FALLOC_FL_PUNCH_HOLE \u003d 2"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"# from /usr/src/linux-headers-*/include/uapi/linux/resource.h"},{"line_number":122,"context_line":"PRIO_PROCESS \u003d 0"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_cc1a0817","line":119,"in_reply_to":"3f79a3b5_98bb0074","updated":"2018-09-14 18:23:43.000000000","message":"I can add a note, these constants can be found in /usr/include/linux/falloc.h","commit_id":"b0917508e8f1b2183408f262fa0f7699dc9881e5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"964b5dfbd90c96cf52af78f5aa42ef0a7844e1be","unresolved":false,"context_lines":[{"line_number":828,"context_line":"                # Keep everything in this try-block in local variables so"},{"line_number":829,"context_line":"                # that a typo in self.some_attribute_name doesn\u0027t raise a"},{"line_number":830,"context_line":"                # spurious AttributeError."},{"line_number":831,"context_line":"                func_handle \u003d load_libc_function("},{"line_number":832,"context_line":"                    func_name, fail_if_missing\u003dTrue)"},{"line_number":833,"context_line":"            except AttributeError:"},{"line_number":834,"context_line":"                # We pass fail_if_missing\u003dTrue to load_libc_function and"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_68cf39b3","line":831,"range":{"start_line":831,"start_character":30,"end_line":831,"end_character":48},"updated":"2018-09-13 16:21:52.000000000","message":"I\u0027m starting to feel like _LibcWrapper should just replace load_libc_function... or the niceties that we get out of _LibcWrapper should move into load_libc_function. It just feels like they\u0027re trying to solve the same problem...\n\nCould be left for a later refactor, though, I think.","commit_id":"b0917508e8f1b2183408f262fa0f7699dc9881e5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"964b5dfbd90c96cf52af78f5aa42ef0a7844e1be","unresolved":false,"context_lines":[{"line_number":914,"context_line":"        # Parameters are (fd, offset, length)."},{"line_number":915,"context_line":"        ret \u003d _sys_posix_fallocate(fd, ctypes.c_uint64(offset),"},{"line_number":916,"context_line":"                                   ctypes.c_uint64(size))"},{"line_number":917,"context_line":"        err \u003d ctypes.get_errno()"},{"line_number":918,"context_line":"    else:"},{"line_number":919,"context_line":"        # No suitable fallocate-like function is in our libc. Warn about it,"},{"line_number":920,"context_line":"        # but just once per process, and then do nothing."}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_b29f0501","line":917,"updated":"2018-09-13 16:21:52.000000000","message":"Huh. According to http://man7.org/linux/man-pages/man3/posix_fallocate.3.html\n\n\u003e posix_fallocate() returns zero on success, or an error number on failure.  Note that errno is not set.\n\nSo presumably if this fails, it will do so silently, because of the errno masking below. Pre-existing bug, though...","commit_id":"b0917508e8f1b2183408f262fa0f7699dc9881e5"},{"author":{"_account_id":25251,"name":"Alexandre Lécuyer","email":"alexandre.lecuyer@corp.ovh.com","username":"alecuyer"},"change_message_id":"38d7a76a013e5121523ef8449540373fdca9ec52","unresolved":false,"context_lines":[{"line_number":943,"context_line":"    if offset \u003e\u003d (1 \u003c\u003c 63):"},{"line_number":944,"context_line":"        raise ValueError(\u0027offset must be less than 2 ** 63\u0027)"},{"line_number":945,"context_line":"    if length \u003c\u003d 0:"},{"line_number":946,"context_line":"        raise ValueError(\u0027length must be non-negative\u0027)"},{"line_number":947,"context_line":"    if length \u003e\u003d (1 \u003c\u003c 63):"},{"line_number":948,"context_line":"        raise ValueError(\u0027length must be less than 2 ** 63\u0027)"},{"line_number":949,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_2206401e","line":946,"updated":"2018-09-13 16:42:20.000000000","message":"Should we say \"must be positive\" ?","commit_id":"b0917508e8f1b2183408f262fa0f7699dc9881e5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"964b5dfbd90c96cf52af78f5aa42ef0a7844e1be","unresolved":false,"context_lines":[{"line_number":956,"context_line":"            ctypes.c_uint64(length))"},{"line_number":957,"context_line":"        err \u003d ctypes.get_errno()"},{"line_number":958,"context_line":"        if ret and err:"},{"line_number":959,"context_line":"            raise OSError(err, \"Unable to fallocate(%d, FALLOC_FL_PUNCH_HOLE,\""},{"line_number":960,"context_line":"                          \" %d, %d)\" % (fd, offset, length))"},{"line_number":961,"context_line":"    else:"},{"line_number":962,"context_line":"        raise OSError(errno.ENOTSUP,"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_1d43656e","line":959,"range":{"start_line":959,"start_character":56,"end_line":959,"end_character":76},"updated":"2018-09-13 16:21:52.000000000","message":"Bah, forgot to fix this.","commit_id":"b0917508e8f1b2183408f262fa0f7699dc9881e5"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"905808d45e64f87c8c3ff83e418b563ec3ae1483","unresolved":false,"context_lines":[{"line_number":837,"context_line":"                # to check if self._func_handle is noop_libc_function, and"},{"line_number":838,"context_line":"                # that\u0027s even weirder."},{"line_number":839,"context_line":"                pass"},{"line_number":840,"context_line":"            else:"},{"line_number":841,"context_line":"                self._func_handle \u003d func_handle"},{"line_number":842,"context_line":"            self._loaded \u003d True"},{"line_number":843,"context_line":""},{"line_number":844,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_58aa2f71","line":841,"range":{"start_line":840,"start_character":0,"end_line":841,"end_character":47},"updated":"2018-09-14 21:52:02.000000000","message":"nits) move self._func_handle \u003d func_handle to after load_libc_function would be nice to remove else block (1 line reduced) but it\u0027s small thing so that it\u0027s ok this as it is.","commit_id":"dbacdcf01ce4862d8eb8270c2f1dd2a8c77a5e30"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"905808d45e64f87c8c3ff83e418b563ec3ae1483","unresolved":false,"context_lines":[{"line_number":856,"context_line":""},{"line_number":857,"context_line":"_fallocate_enabled \u003d True"},{"line_number":858,"context_line":"_fallocate_warned_about_missing \u003d False"},{"line_number":859,"context_line":"_sys_fallocate \u003d _LibcWrapper(\u0027fallocate\u0027)"},{"line_number":860,"context_line":"_sys_posix_fallocate \u003d _LibcWrapper(\u0027posix_fallocate\u0027)"},{"line_number":861,"context_line":""},{"line_number":862,"context_line":""},{"line_number":863,"context_line":"def disable_fallocate():"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_98f687d8","line":860,"range":{"start_line":859,"start_character":0,"end_line":860,"end_character":54},"updated":"2018-09-14 21:52:02.000000000","message":"OK. This is why the lazy loading are there. _sys_fallocate and _sys_posix_fallocate is defined at the top level in this module. That means the instantiation will happen always when importing this module. Wrapping that inside to the available property will avoid the loading then, call it when that is actually needed.\n\nThat makes me sense. Keep going.","commit_id":"dbacdcf01ce4862d8eb8270c2f1dd2a8c77a5e30"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"905808d45e64f87c8c3ff83e418b563ec3ae1483","unresolved":false,"context_lines":[{"line_number":879,"context_line":"    if not _fallocate_enabled:"},{"line_number":880,"context_line":"        return"},{"line_number":881,"context_line":""},{"line_number":882,"context_line":"    if size \u003c 0:"},{"line_number":883,"context_line":"        size \u003d 0  # Done historically; not really sure why"},{"line_number":884,"context_line":"    if size \u003e\u003d (1 \u003c\u003c 63):"},{"line_number":885,"context_line":"        raise ValueError(\u0027size must be less than 2 ** 63\u0027)"},{"line_number":886,"context_line":"    if offset \u003c 0:"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_18bcb76a","line":883,"range":{"start_line":882,"start_character":0,"end_line":883,"end_character":58},"updated":"2018-09-14 21:52:02.000000000","message":"nits) no coverage","commit_id":"dbacdcf01ce4862d8eb8270c2f1dd2a8c77a5e30"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"6fbda13b0dae8552629ad361c3f9268198ae4ae1","unresolved":false,"context_lines":[{"line_number":879,"context_line":"    if not _fallocate_enabled:"},{"line_number":880,"context_line":"        return"},{"line_number":881,"context_line":""},{"line_number":882,"context_line":"    if size \u003c 0:"},{"line_number":883,"context_line":"        size \u003d 0  # Done historically; not really sure why"},{"line_number":884,"context_line":"    if size \u003e\u003d (1 \u003c\u003c 63):"},{"line_number":885,"context_line":"        raise ValueError(\u0027size must be less than 2 ** 63\u0027)"},{"line_number":886,"context_line":"    if offset \u003c 0:"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_7b1a85c6","line":883,"range":{"start_line":882,"start_character":0,"end_line":883,"end_character":58},"in_reply_to":"3f79a3b5_18bcb76a","updated":"2018-09-14 22:07:40.000000000","message":"Mainly because I didn\u0027t want to codify it; seems kinda like it could be a bug :-/","commit_id":"dbacdcf01ce4862d8eb8270c2f1dd2a8c77a5e30"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"905808d45e64f87c8c3ff83e418b563ec3ae1483","unresolved":false,"context_lines":[{"line_number":882,"context_line":"    if size \u003c 0:"},{"line_number":883,"context_line":"        size \u003d 0  # Done historically; not really sure why"},{"line_number":884,"context_line":"    if size \u003e\u003d (1 \u003c\u003c 63):"},{"line_number":885,"context_line":"        raise ValueError(\u0027size must be less than 2 ** 63\u0027)"},{"line_number":886,"context_line":"    if offset \u003c 0:"},{"line_number":887,"context_line":"        raise ValueError(\u0027offset must be non-negative\u0027)"},{"line_number":888,"context_line":"    if offset \u003e\u003d (1 \u003c\u003c 63):"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_58e22fa2","line":885,"updated":"2018-09-14 21:52:02.000000000","message":"https://www.gnu.org/software/libc/manual/html_node/File-Size.html\n\nOK. Even if the size would be uint64. we should not exceed the size.","commit_id":"dbacdcf01ce4862d8eb8270c2f1dd2a8c77a5e30"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"6fbda13b0dae8552629ad361c3f9268198ae4ae1","unresolved":false,"context_lines":[{"line_number":882,"context_line":"    if size \u003c 0:"},{"line_number":883,"context_line":"        size \u003d 0  # Done historically; not really sure why"},{"line_number":884,"context_line":"    if size \u003e\u003d (1 \u003c\u003c 63):"},{"line_number":885,"context_line":"        raise ValueError(\u0027size must be less than 2 ** 63\u0027)"},{"line_number":886,"context_line":"    if offset \u003c 0:"},{"line_number":887,"context_line":"        raise ValueError(\u0027offset must be non-negative\u0027)"},{"line_number":888,"context_line":"    if offset \u003e\u003d (1 \u003c\u003c 63):"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_9b6a0119","line":885,"in_reply_to":"3f79a3b5_58e22fa2","updated":"2018-09-14 22:07:40.000000000","message":"But http://man7.org/linux/man-pages/man2/fallocate.2.html says they\u0027re off_t\u0027s -- which apparently are signed? IDK why we\u0027re using uint64\u0027s... it\u0027s not at all obvious to me that that\u0027s the right type...","commit_id":"dbacdcf01ce4862d8eb8270c2f1dd2a8c77a5e30"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"905808d45e64f87c8c3ff83e418b563ec3ae1483","unresolved":false,"context_lines":[{"line_number":941,"context_line":"    \"\"\""},{"line_number":942,"context_line":"    if offset \u003c 0:"},{"line_number":943,"context_line":"        raise ValueError(\u0027offset must be non-negative\u0027)"},{"line_number":944,"context_line":"    if offset \u003e\u003d (1 \u003c\u003c 63):"},{"line_number":945,"context_line":"        raise ValueError(\u0027offset must be less than 2 ** 63\u0027)"},{"line_number":946,"context_line":"    if length \u003c\u003d 0:"},{"line_number":947,"context_line":"        raise ValueError(\u0027length must be positive\u0027)"},{"line_number":948,"context_line":"    if length \u003e\u003d (1 \u003c\u003c 63):"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_d8b5df7f","line":945,"range":{"start_line":944,"start_character":0,"end_line":945,"end_character":60},"updated":"2018-09-14 21:52:02.000000000","message":"nits) no coverage","commit_id":"dbacdcf01ce4862d8eb8270c2f1dd2a8c77a5e30"}],"test/unit/common/test_utils.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d00b9b7bf4b409a52c08afa7504ef3b711d79d6d","unresolved":false,"context_lines":[{"line_number":3017,"context_line":"                self.last_call \u003d None"},{"line_number":3018,"context_line":""},{"line_number":3019,"context_line":"            def __call__(self, *args):"},{"line_number":3020,"context_line":"                self.last_call \u003d list(args)"},{"line_number":3021,"context_line":"                self.last_call[-1] \u003d self.last_call[-1].value"},{"line_number":3022,"context_line":"                self.last_call[-2] \u003d self.last_call[-2].value"},{"line_number":3023,"context_line":"                self.last_call[-3] \u003d self.last_call[-3].value"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f9dbf25_412589c1","line":3020,"updated":"2018-03-04 00:27:11.000000000","message":"Maybe worth doing something like\n\n self.last_call \u003d [\n     x.value if isinstance(x, ctypes._SimpleCData)\n     else x for x in args]\n\n? I guess it\u0027s useful to know that the args had been marshaled already -- but we aren\u0027t actually checking which types they have :-/\n\n*shrug*","commit_id":"86f648ede08fccff91417a032aef7d17bfa06b78"},{"author":{"_account_id":25251,"name":"Alexandre Lécuyer","email":"alexandre.lecuyer@corp.ovh.com","username":"alecuyer"},"change_message_id":"56c6384945ac39e46090cbf0bb2224471b6f6643","unresolved":false,"context_lines":[{"line_number":3017,"context_line":"                self.last_call \u003d None"},{"line_number":3018,"context_line":""},{"line_number":3019,"context_line":"            def __call__(self, *args):"},{"line_number":3020,"context_line":"                self.last_call \u003d list(args)"},{"line_number":3021,"context_line":"                self.last_call[-1] \u003d self.last_call[-1].value"},{"line_number":3022,"context_line":"                self.last_call[-2] \u003d self.last_call[-2].value"},{"line_number":3023,"context_line":"                self.last_call[-3] \u003d self.last_call[-3].value"}],"source_content_type":"text/x-python","patch_set":3,"id":"df7087c5_c014dd46","line":3020,"in_reply_to":"1f9dbf25_412589c1","updated":"2018-03-13 14:57:03.000000000","message":"I can make that change.\n\nSomething else I wonder about the tests. If I\u0027m adding the FALLOC_* constants in utils.pm, should I change the tests to use these ? Only in the new ones ? or the existing ones ? (which currently use \"1\" instead of FALLOC_FL_KEEP_SIZE)","commit_id":"86f648ede08fccff91417a032aef7d17bfa06b78"},{"author":{"_account_id":25251,"name":"Alexandre Lécuyer","email":"alexandre.lecuyer@corp.ovh.com","username":"alecuyer"},"change_message_id":"9e629e2f2c52f3b1a87b74a3d9c6bb15f78bf07b","unresolved":false,"context_lines":[{"line_number":3017,"context_line":"                self.last_call \u003d None"},{"line_number":3018,"context_line":""},{"line_number":3019,"context_line":"            def __call__(self, *args):"},{"line_number":3020,"context_line":"                self.last_call \u003d list(args)"},{"line_number":3021,"context_line":"                self.last_call[-1] \u003d self.last_call[-1].value"},{"line_number":3022,"context_line":"                self.last_call[-2] \u003d self.last_call[-2].value"},{"line_number":3023,"context_line":"                self.last_call[-3] \u003d self.last_call[-3].value"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_662d3045","line":3020,"in_reply_to":"bf659307_7c76a640","updated":"2018-04-09 14:17:10.000000000","message":"the latest patchset works for me with the list comprehension, which tests the type. Should I revert to the \"one line per argument\" conversion ? (except for the mode)","commit_id":"86f648ede08fccff91417a032aef7d17bfa06b78"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"23020eedea2e42e7d3b976560c6fa54d31ed5f16","unresolved":false,"context_lines":[{"line_number":3017,"context_line":"                self.last_call \u003d None"},{"line_number":3018,"context_line":""},{"line_number":3019,"context_line":"            def __call__(self, *args):"},{"line_number":3020,"context_line":"                self.last_call \u003d list(args)"},{"line_number":3021,"context_line":"                self.last_call[-1] \u003d self.last_call[-1].value"},{"line_number":3022,"context_line":"                self.last_call[-2] \u003d self.last_call[-2].value"},{"line_number":3023,"context_line":"                self.last_call[-3] \u003d self.last_call[-3].value"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_7c76a640","line":3020,"in_reply_to":"df7087c5_c014dd46","updated":"2018-04-02 21:10:12.000000000","message":"Yeah, I think using the utils constants should be fine.\n\nI\u0027m coming back around on the idea that\n\n\u003e it\u0027s useful to know that the args had been marshaled already\n\nthough... Does the latest patchset still work well for you? If we don\u0027t *have* to convert to some flavor of ctypes type, I\u0027m fine with it either way. But if I switch back to the\n\n self.last_call[...] \u003d self.last_call[...].value\n\nstyle of setting last call in the latest patchset, I get\n\n AttributeError: \u0027int\u0027 object has no attribute \u0027value\u0027\n\nwhich makes me a little nervous...","commit_id":"86f648ede08fccff91417a032aef7d17bfa06b78"},{"author":{"_account_id":25251,"name":"Alexandre Lécuyer","email":"alexandre.lecuyer@corp.ovh.com","username":"alecuyer"},"change_message_id":"9e629e2f2c52f3b1a87b74a3d9c6bb15f78bf07b","unresolved":false,"context_lines":[{"line_number":3040,"context_line":"            utils.FALLOCATE_RESERVE \u003d orig_FALLOCATE_RESERVE"},{"line_number":3041,"context_line":"            utils.os.fstatvfs \u003d orig_fstatvfs"},{"line_number":3042,"context_line":""},{"line_number":3043,"context_line":"    def test_fallocate_hole_punch(self):"},{"line_number":3044,"context_line":""},{"line_number":3045,"context_line":"        class StatVFS(object):"},{"line_number":3046,"context_line":"            f_frsize \u003d 1024"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf659307_c6ed1cb8","line":3043,"updated":"2018-04-09 14:17:10.000000000","message":"I moved \"hole punch\" tests to their own function because as I added a new test to check that we do raise an error if we loaded posix_fallocate, it did not feel right to modify and restore fallocate.func_name in the existing test. \n\nIf you think I shouldn\u0027t have made a separate test, I can revert this.","commit_id":"31f3c90296ceadc01c8f3a1a28d42698bd449fd8"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"f92e90c8170b04c5d63493024baf40c62e1ca464","unresolved":false,"context_lines":[{"line_number":2950,"context_line":"            # about 50% the size. With fallocate_reserve off this will succeed."},{"line_number":2951,"context_line":"            utils.FALLOCATE_RESERVE, utils.FALLOCATE_IS_PERCENT \u003d \\"},{"line_number":2952,"context_line":"                utils.config_fallocate_value(\u002799%\u0027)"},{"line_number":2953,"context_line":"            self.assertEqual(fallocate(0, 1, 0, ctypes.c_uint64(500)), 0)"},{"line_number":2954,"context_line":""},{"line_number":2955,"context_line":"            # Setting noop to False after the constructor allows us to use"},{"line_number":2956,"context_line":"            # a noop fallocate syscall and still test fallocate_reserve."}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_ff47761d","side":"PARENT","line":2953,"updated":"2018-09-14 00:09:03.000000000","message":"This test is replaced with test_disabled which asserts just the _sys_fallocate is not called.","commit_id":"aeeec5c1ae3bca955ad36af450795064596e7173"},{"author":{"_account_id":25251,"name":"Alexandre Lécuyer","email":"alexandre.lecuyer@corp.ovh.com","username":"alecuyer"},"change_message_id":"c49d56bef3bb75f5d777fb90688ac6dbad4b3da2","unresolved":false,"context_lines":[{"line_number":2950,"context_line":"            # about 50% the size. With fallocate_reserve off this will succeed."},{"line_number":2951,"context_line":"            utils.FALLOCATE_RESERVE, utils.FALLOCATE_IS_PERCENT \u003d \\"},{"line_number":2952,"context_line":"                utils.config_fallocate_value(\u002799%\u0027)"},{"line_number":2953,"context_line":"            self.assertEqual(fallocate(0, 1, 0, ctypes.c_uint64(500)), 0)"},{"line_number":2954,"context_line":""},{"line_number":2955,"context_line":"            # Setting noop to False after the constructor allows us to use"},{"line_number":2956,"context_line":"            # a noop fallocate syscall and still test fallocate_reserve."}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_31d0b353","side":"PARENT","line":2953,"in_reply_to":"3f79a3b5_ff47761d","updated":"2018-09-14 18:23:43.000000000","message":"This tests \u0027noop\u0027, which now happens only when disabled_fallocate \u003d False, and we fail to load either \u0027fallocate\u0027 or \u0027posix_fallocate\u0027.\n\nThis condition is now tested in test_no_fallocates_available()\n\ntest_disabled() checks the case where fallocate has been explicitely disabled. (disabled_fallocate \u003d True)","commit_id":"aeeec5c1ae3bca955ad36af450795064596e7173"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"f92e90c8170b04c5d63493024baf40c62e1ca464","unresolved":false,"context_lines":[{"line_number":2978,"context_line":"                fallocate(0, 1, 0, ctypes.c_uint64(0))"},{"line_number":2979,"context_line":"            self.assertEqual("},{"line_number":2980,"context_line":"                str(catcher.exception),"},{"line_number":2981,"context_line":"                \u0027[Errno %d] FALLOCATE_RESERVE fail 1024 \u003c\u003d 1024\u0027"},{"line_number":2982,"context_line":"                % errno.ENOSPC)"},{"line_number":2983,"context_line":"            self.assertEqual(catcher.exception.errno, errno.ENOSPC)"},{"line_number":2984,"context_line":""},{"line_number":2985,"context_line":"            # Want 1024 reserved, have 512 * 2 free, so fails"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_9aa1b0ab","side":"PARENT","line":2982,"range":{"start_line":2981,"start_character":0,"end_line":2982,"end_character":31},"updated":"2018-09-14 00:09:03.000000000","message":"Probably we are missing those error message assertions in those failure cases?","commit_id":"aeeec5c1ae3bca955ad36af450795064596e7173"},{"author":{"_account_id":25251,"name":"Alexandre Lécuyer","email":"alexandre.lecuyer@corp.ovh.com","username":"alecuyer"},"change_message_id":"c49d56bef3bb75f5d777fb90688ac6dbad4b3da2","unresolved":false,"context_lines":[{"line_number":2978,"context_line":"                fallocate(0, 1, 0, ctypes.c_uint64(0))"},{"line_number":2979,"context_line":"            self.assertEqual("},{"line_number":2980,"context_line":"                str(catcher.exception),"},{"line_number":2981,"context_line":"                \u0027[Errno %d] FALLOCATE_RESERVE fail 1024 \u003c\u003d 1024\u0027"},{"line_number":2982,"context_line":"                % errno.ENOSPC)"},{"line_number":2983,"context_line":"            self.assertEqual(catcher.exception.errno, errno.ENOSPC)"},{"line_number":2984,"context_line":""},{"line_number":2985,"context_line":"            # Want 1024 reserved, have 512 * 2 free, so fails"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_ac39ccd8","side":"PARENT","line":2982,"range":{"start_line":2981,"start_character":0,"end_line":2982,"end_character":31},"in_reply_to":"3f79a3b5_9aa1b0ab","updated":"2018-09-14 18:23:43.000000000","message":"True, added them back in the new tests","commit_id":"aeeec5c1ae3bca955ad36af450795064596e7173"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"f92e90c8170b04c5d63493024baf40c62e1ca464","unresolved":false,"context_lines":[{"line_number":7720,"context_line":"        fstatvfs_mock.assert_not_called()"},{"line_number":7721,"context_line":""},{"line_number":7722,"context_line":"    def test_zero_reserve(self, sys_fallocate_mock, fstatvfs_mock):"},{"line_number":7723,"context_line":"        with patch.object(utils, \u0027FALLOCATE_RESERVE\u0027, 0):"},{"line_number":7724,"context_line":"            utils.fallocate(123, 456)"},{"line_number":7725,"context_line":""},{"line_number":7726,"context_line":"        fstatvfs_mock.assert_not_called()"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_3f964e40","line":7723,"range":{"start_line":7723,"start_character":8,"end_line":7723,"end_character":57},"updated":"2018-09-14 00:09:03.000000000","message":"FALLOCATE_RESERVE is mocked as 0 in this class so it\u0027s needn\u0027t to make this \"with\" block.","commit_id":"b0917508e8f1b2183408f262fa0f7699dc9881e5"},{"author":{"_account_id":25251,"name":"Alexandre Lécuyer","email":"alexandre.lecuyer@corp.ovh.com","username":"alecuyer"},"change_message_id":"c49d56bef3bb75f5d777fb90688ac6dbad4b3da2","unresolved":false,"context_lines":[{"line_number":7720,"context_line":"        fstatvfs_mock.assert_not_called()"},{"line_number":7721,"context_line":""},{"line_number":7722,"context_line":"    def test_zero_reserve(self, sys_fallocate_mock, fstatvfs_mock):"},{"line_number":7723,"context_line":"        with patch.object(utils, \u0027FALLOCATE_RESERVE\u0027, 0):"},{"line_number":7724,"context_line":"            utils.fallocate(123, 456)"},{"line_number":7725,"context_line":""},{"line_number":7726,"context_line":"        fstatvfs_mock.assert_not_called()"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_5d754831","line":7723,"range":{"start_line":7723,"start_character":8,"end_line":7723,"end_character":57},"in_reply_to":"3f79a3b5_3f964e40","updated":"2018-09-14 18:23:43.000000000","message":"right, removed it","commit_id":"b0917508e8f1b2183408f262fa0f7699dc9881e5"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"f92e90c8170b04c5d63493024baf40c62e1ca464","unresolved":false,"context_lines":[{"line_number":7784,"context_line":"        fstatvfs_mock.return_value \u003d self._statvfs_result(1024, 100, 100)"},{"line_number":7785,"context_line":"        self.assertRaises(OSError, utils.fallocate, 88, 0)"},{"line_number":7786,"context_line":""},{"line_number":7787,"context_line":"    def test_enough_space_pct(self, sys_fallocate_mock, fstatvfs_mock):"},{"line_number":7788,"context_line":"        # Want 1% reserved, filesystem has 3/100 blocks of size 1024 free"},{"line_number":7789,"context_line":"        # and file size is 2047, so succeed"},{"line_number":7790,"context_line":"        utils.FALLOCATE_RESERVE, utils.FALLOCATE_IS_PERCENT \u003d \\"},{"line_number":7791,"context_line":"            utils.config_fallocate_value(\u00271%\u0027)"},{"line_number":7792,"context_line":""},{"line_number":7793,"context_line":"        fstatvfs_mock.return_value \u003d self._statvfs_result(1024, 3, 100)"},{"line_number":7794,"context_line":"        utils.fallocate(88, 2047)"},{"line_number":7795,"context_line":""},{"line_number":7796,"context_line":"    def test_not_enough_space_pct(self, sys_fallocate_mock, fstatvfs_mock):"},{"line_number":7797,"context_line":"        # Want 1% reserved, filesystem has 3/100 blocks of size 1024 free"},{"line_number":7798,"context_line":"        # and file size is 2049, so fail"},{"line_number":7799,"context_line":"        utils.FALLOCATE_RESERVE, utils.FALLOCATE_IS_PERCENT \u003d \\"},{"line_number":7800,"context_line":"            utils.config_fallocate_value(\u00271%\u0027)"},{"line_number":7801,"context_line":""},{"line_number":7802,"context_line":"        fstatvfs_mock.return_value \u003d self._statvfs_result(1024, 3, 100)"},{"line_number":7803,"context_line":"        self.assertRaises(OSError, utils.fallocate, 88, 2049)"},{"line_number":7804,"context_line":""},{"line_number":7805,"context_line":"    def test_all_space_reserved_pct(self, sys_fallocate_mock, fstatvfs_mock):"},{"line_number":7806,"context_line":"        # Filesystem is empty, but our reserve is the whole filesystem, so"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_3ae41ce0","line":7803,"range":{"start_line":7787,"start_character":0,"end_line":7803,"end_character":61},"updated":"2018-09-14 00:09:03.000000000","message":"Why do the boundary value test has 2 bytes diff?","commit_id":"b0917508e8f1b2183408f262fa0f7699dc9881e5"},{"author":{"_account_id":25251,"name":"Alexandre Lécuyer","email":"alexandre.lecuyer@corp.ovh.com","username":"alecuyer"},"change_message_id":"c49d56bef3bb75f5d777fb90688ac6dbad4b3da2","unresolved":false,"context_lines":[{"line_number":7784,"context_line":"        fstatvfs_mock.return_value \u003d self._statvfs_result(1024, 100, 100)"},{"line_number":7785,"context_line":"        self.assertRaises(OSError, utils.fallocate, 88, 0)"},{"line_number":7786,"context_line":""},{"line_number":7787,"context_line":"    def test_enough_space_pct(self, sys_fallocate_mock, fstatvfs_mock):"},{"line_number":7788,"context_line":"        # Want 1% reserved, filesystem has 3/100 blocks of size 1024 free"},{"line_number":7789,"context_line":"        # and file size is 2047, so succeed"},{"line_number":7790,"context_line":"        utils.FALLOCATE_RESERVE, utils.FALLOCATE_IS_PERCENT \u003d \\"},{"line_number":7791,"context_line":"            utils.config_fallocate_value(\u00271%\u0027)"},{"line_number":7792,"context_line":""},{"line_number":7793,"context_line":"        fstatvfs_mock.return_value \u003d self._statvfs_result(1024, 3, 100)"},{"line_number":7794,"context_line":"        utils.fallocate(88, 2047)"},{"line_number":7795,"context_line":""},{"line_number":7796,"context_line":"    def test_not_enough_space_pct(self, sys_fallocate_mock, fstatvfs_mock):"},{"line_number":7797,"context_line":"        # Want 1% reserved, filesystem has 3/100 blocks of size 1024 free"},{"line_number":7798,"context_line":"        # and file size is 2049, so fail"},{"line_number":7799,"context_line":"        utils.FALLOCATE_RESERVE, utils.FALLOCATE_IS_PERCENT \u003d \\"},{"line_number":7800,"context_line":"            utils.config_fallocate_value(\u00271%\u0027)"},{"line_number":7801,"context_line":""},{"line_number":7802,"context_line":"        fstatvfs_mock.return_value \u003d self._statvfs_result(1024, 3, 100)"},{"line_number":7803,"context_line":"        self.assertRaises(OSError, utils.fallocate, 88, 2049)"},{"line_number":7804,"context_line":""},{"line_number":7805,"context_line":"    def test_all_space_reserved_pct(self, sys_fallocate_mock, fstatvfs_mock):"},{"line_number":7806,"context_line":"        # Filesystem is empty, but our reserve is the whole filesystem, so"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_3d964cf1","line":7803,"range":{"start_line":7787,"start_character":0,"end_line":7803,"end_character":61},"in_reply_to":"3f79a3b5_3ae41ce0","updated":"2018-09-14 18:23:43.000000000","message":"Changed the size from 2049 to 2048 to hit the boundary. \n(the check being: if (free \u003c\u003d FALLOCATE_RESERVE) then we refuse to allocate)","commit_id":"b0917508e8f1b2183408f262fa0f7699dc9881e5"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c1669ea1d4541f1a50b1cfa9f589361e03c46815","unresolved":false,"context_lines":[{"line_number":7706,"context_line":"@patch.object(utils, \u0027FALLOCATE_RESERVE\u0027, 0)"},{"line_number":7707,"context_line":"@patch.object(utils, \u0027FALLOCATE_IS_PERCENT\u0027, False)"},{"line_number":7708,"context_line":"@patch.object(utils, \u0027_fallocate_enabled\u0027, True)"},{"line_number":7709,"context_line":"class TestFallocateReserve(unittest.TestCase):"},{"line_number":7710,"context_line":"    def _statvfs_result(self, f_frsize, f_bavail, f_blocks):"},{"line_number":7711,"context_line":"        # Only 3 values are relevant to us, so use zeros for the rest"},{"line_number":7712,"context_line":"        return posix.statvfs_result((0, f_frsize, f_blocks, 0, f_bavail,"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_1ad360d5","line":7709,"updated":"2018-09-13 23:30:30.000000000","message":"I wonder if a lot of these tests should have a\n\n sys_fallocate_mock.assert_not_called()\n\nat the end...","commit_id":"088c4ddf45b060929331dbb1ce1551a28fb0feb8"},{"author":{"_account_id":25251,"name":"Alexandre Lécuyer","email":"alexandre.lecuyer@corp.ovh.com","username":"alecuyer"},"change_message_id":"0abb114c06186be2b305cf51e7140efd0cc8fc94","unresolved":false,"context_lines":[{"line_number":7706,"context_line":"@patch.object(utils, \u0027FALLOCATE_RESERVE\u0027, 0)"},{"line_number":7707,"context_line":"@patch.object(utils, \u0027FALLOCATE_IS_PERCENT\u0027, False)"},{"line_number":7708,"context_line":"@patch.object(utils, \u0027_fallocate_enabled\u0027, True)"},{"line_number":7709,"context_line":"class TestFallocateReserve(unittest.TestCase):"},{"line_number":7710,"context_line":"    def _statvfs_result(self, f_frsize, f_bavail, f_blocks):"},{"line_number":7711,"context_line":"        # Only 3 values are relevant to us, so use zeros for the rest"},{"line_number":7712,"context_line":"        return posix.statvfs_result((0, f_frsize, f_blocks, 0, f_bavail,"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_c0c97a5a","line":7709,"in_reply_to":"3f79a3b5_1ad360d5","updated":"2018-09-14 00:32:59.000000000","message":"Sounds right, I added calls to tests which are not supposed to call fallocate (reserve set and not enough space)","commit_id":"088c4ddf45b060929331dbb1ce1551a28fb0feb8"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c1669ea1d4541f1a50b1cfa9f589361e03c46815","unresolved":false,"context_lines":[{"line_number":7709,"context_line":"class TestFallocateReserve(unittest.TestCase):"},{"line_number":7710,"context_line":"    def _statvfs_result(self, f_frsize, f_bavail, f_blocks):"},{"line_number":7711,"context_line":"        # Only 3 values are relevant to us, so use zeros for the rest"},{"line_number":7712,"context_line":"        return posix.statvfs_result((0, f_frsize, f_blocks, 0, f_bavail,"},{"line_number":7713,"context_line":"                                     0, 0, 0, 0, 0))"},{"line_number":7714,"context_line":""},{"line_number":7715,"context_line":"    def test_disabled(self, sys_fallocate_mock, fstatvfs_mock):"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_1af2809c","line":7712,"range":{"start_line":7712,"start_character":50,"end_line":7712,"end_character":58},"updated":"2018-09-13 23:30:30.000000000","message":"Do we ever have a value other than 100 here?","commit_id":"088c4ddf45b060929331dbb1ce1551a28fb0feb8"},{"author":{"_account_id":25251,"name":"Alexandre Lécuyer","email":"alexandre.lecuyer@corp.ovh.com","username":"alecuyer"},"change_message_id":"0abb114c06186be2b305cf51e7140efd0cc8fc94","unresolved":false,"context_lines":[{"line_number":7709,"context_line":"class TestFallocateReserve(unittest.TestCase):"},{"line_number":7710,"context_line":"    def _statvfs_result(self, f_frsize, f_bavail, f_blocks):"},{"line_number":7711,"context_line":"        # Only 3 values are relevant to us, so use zeros for the rest"},{"line_number":7712,"context_line":"        return posix.statvfs_result((0, f_frsize, f_blocks, 0, f_bavail,"},{"line_number":7713,"context_line":"                                     0, 0, 0, 0, 0))"},{"line_number":7714,"context_line":""},{"line_number":7715,"context_line":"    def test_disabled(self, sys_fallocate_mock, fstatvfs_mock):"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_00b0d2dc","line":7712,"range":{"start_line":7712,"start_character":50,"end_line":7712,"end_character":58},"in_reply_to":"3f79a3b5_1af2809c","updated":"2018-09-14 00:32:59.000000000","message":"It\u0027s always 100, for now I have removed the argument and set it to 100 in the function","commit_id":"088c4ddf45b060929331dbb1ce1551a28fb0feb8"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c1669ea1d4541f1a50b1cfa9f589361e03c46815","unresolved":false,"context_lines":[{"line_number":7767,"context_line":"    def test_free_space_under_reserve(self, sys_fallocate_mock, fstatvfs_mock):"},{"line_number":7768,"context_line":"        # Want 2048 bytes in reserve but have only 3 blocks of size 512, so"},{"line_number":7769,"context_line":"        # allocating even 0 bytes fails"},{"line_number":7770,"context_line":"        # Want 1024 bytes in reserve plus 1025 allocated, and have 4 blocks"},{"line_number":7771,"context_line":"        # of size 512 free, so fail"},{"line_number":7772,"context_line":"        utils.FALLOCATE_RESERVE, utils.FALLOCATE_IS_PERCENT \u003d \\"},{"line_number":7773,"context_line":"            utils.config_fallocate_value(\u00272048\u0027)"},{"line_number":7774,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_ba734c16","line":7771,"range":{"start_line":7770,"start_character":0,"end_line":7771,"end_character":35},"updated":"2018-09-13 23:30:30.000000000","message":"Eh?","commit_id":"088c4ddf45b060929331dbb1ce1551a28fb0feb8"},{"author":{"_account_id":25251,"name":"Alexandre Lécuyer","email":"alexandre.lecuyer@corp.ovh.com","username":"alecuyer"},"change_message_id":"0abb114c06186be2b305cf51e7140efd0cc8fc94","unresolved":false,"context_lines":[{"line_number":7767,"context_line":"    def test_free_space_under_reserve(self, sys_fallocate_mock, fstatvfs_mock):"},{"line_number":7768,"context_line":"        # Want 2048 bytes in reserve but have only 3 blocks of size 512, so"},{"line_number":7769,"context_line":"        # allocating even 0 bytes fails"},{"line_number":7770,"context_line":"        # Want 1024 bytes in reserve plus 1025 allocated, and have 4 blocks"},{"line_number":7771,"context_line":"        # of size 512 free, so fail"},{"line_number":7772,"context_line":"        utils.FALLOCATE_RESERVE, utils.FALLOCATE_IS_PERCENT \u003d \\"},{"line_number":7773,"context_line":"            utils.config_fallocate_value(\u00272048\u0027)"},{"line_number":7774,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_0097723c","line":7771,"range":{"start_line":7770,"start_character":0,"end_line":7771,"end_character":35},"in_reply_to":"3f79a3b5_ba734c16","updated":"2018-09-14 00:32:59.000000000","message":"removed","commit_id":"088c4ddf45b060929331dbb1ce1551a28fb0feb8"}]}
