<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def cvtToBlocks(rh, diskSize):
 """ Convert a disk storage value to a number of blocks. Input: Request Handle Size of disk in bytes Output: Results structure: overallRC - Overall return code for the function: 0 - Everything went ok 4 - Input validation error rc - Return code causing the return. Same as overallRC. rs - Reason code causing the return. errno - Errno value causing the return. Always zero. Converted value in blocks """


    rh.printSysLog("Enter generalUtils.cvtToBlocks")
    blocks = 0
    results = {'overallRC': 0, 'rc': 0, 'rs': 0, 'errno': 0}

    blocks = diskSize.strip().upper()
    lastChar = blocks[-1]
    if lastChar == 'G' or lastChar == 'M':
        # Convert the bytes to blocks
        byteSize = blocks[:-1]
        if byteSize == '':
            # The size of the disk is not valid.
            msg = msgs.msg['0200'][1] % (modId, blocks)
            rh.printLn("ES", msg)
            results = msgs.msg['0200'][0]
        else:
            try:
                if lastChar == 'M':
                    blocks = (float(byteSize) * 1024 * 1024) / 512
                elif lastChar == 'G':
                    blocks = (float(byteSize) * 1024 * 1024 * 1024) / 512
                blocks = str(int(math.ceil(blocks)))
            except Exception:
                # Failed to convert to a number of blocks.
                msg = msgs.msg['0201'][1] % (modId, byteSize)
                rh.printLn("ES", msg)
                results = msgs.msg['0201'][0]
    elif blocks.strip('1234567890'):
        # Size is not an integer size of blocks.
        msg = msgs.msg['0202'][1] % (modId, blocks)
        rh.printLn("ES", msg)
        results = msgs.msg['0202'][0]

    rh.printSysLog("Exit generalUtils.cvtToBlocks, rc: " +
        str(results['overallRC']))
    return results, blocks