• J
    block: make bdrv_find_backing_image compare canonical filenames · b1b1d783
    Jeff Cody 提交于
    Currently, bdrv_find_backing_image compares bs->backing_file with
    what is passed in as a backing_file name.  Mismatches may occur,
    however, when bs->backing_file and backing_file are not both
    absolute or relative.
    
    Use path_combine() to make sure any relative backing filenames are
    relative to the current image filename being searched, and then use
    realpath() to make all comparisons based on absolute filenames.
    
    If either backing_file or bs->backing_file is determine to be a
    protocol, then no filename normalization is performed.
    
    This also changes bdrv_find_backing_image to no longer be recursive,
    but iterative.
    Signed-off-by: NJeff Cody <jcody@redhat.com>
    Reviewed-by: NEric Blake <eblake@redhat.com>
    Signed-off-by: NKevin Wolf <kwolf@redhat.com>
    b1b1d783
block.c 122.8 KB