gfapi.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:gkube 作者: guohongze 项目源码 文件源码
def fallocate(self, mode, offset, length):
        """
        This is a Linux-specific sys call, unlike posix_fallocate()

        Allows the caller to directly manipulate the allocated disk space for
        the file for the byte range starting at offset and continuing for
        length bytes.

        :param mode: Operation to be performed on the given range
        :param offset: Starting offset
        :param length: Size in bytes, starting at offset
        """
        ret = api.client.glfs_fallocate(self.fd, mode, offset, length)
        if ret < 0:
            err = ctypes.get_errno()
            raise OSError(err, os.strerror(err))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号