• Jan Höppner's avatar
    s390/dasd: Simplify code in format logic · 8542885b
    Jan Höppner authored
    Currently, dasd_format is calling the format logic of a DASD discipline
    with PAV enabled. If that fails with an error code of -EAGAIN the value
    of retries is decremented and the discipline function is called with PAV
    turned off.
    
    The loop is supposed to try this up to 255 times until success. However,
    -EAGAIN can only occur once here and therefore the loop will never reach
    the 255 retries.
    
    So, replace the unnecessarily complicated loop logic and simply try again
    without PAV enabled in case of an -EAGAIN error.
    Signed-off-by: default avatarJan Höppner <hoeppner@linux.vnet.ibm.com>
    Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
    8542885b
dasd_ioctl.c 13.7 KB