'Removes the copy_on_write dependency between src and parent.
Remove the copy_on_write dependency between the src file and its
immediate parent such that the length of dependency chain is reduced
by 1.'

def _gpfs_redirect(self, src):

    max_depth = self.configuration.gpfs_max_clone_depth
    if (max_depth == 0):
        return False
    (out, err) = self.gpfs_execute((self.GPFS_PATH + 'mmclone'), 'show', src)
    depth_regex = re.compile('.*\\s+no\\s+(?P<depth>\\d+)', (re.M | re.S))
    match = depth_regex.match(out)
    if match:
        depth = int(match.group('depth'))
        if (depth > max_depth):
            self.gpfs_execute((self.GPFS_PATH + 'mmclone'), 'redirect', src)
            return True
    return False
