• Logan Gunthorpe's avatar
    md/raid5: suspend the array for calls to log_exit() · c629f345
    Logan Gunthorpe authored
    
    
    The raid5-cache code relies on there being no IO in flight when
    log_exit() is called. There are two places where this is not
    guaranteed so add mddev_suspend() and mddev_resume() calls to these
    sites.
    
    The site in raid5_change_consistency_policy() is in the error path,
    and another similar call site already has suspend/resume calls just
    below it; so it should be equally safe to make that change here.
    
    There is one remaining site in raid5_remove_disk() that we call log_exit()
    without suspending the array. Unfortunately, as the comment stated, we
    cannot call mddev_suspend from raid5d.
    Signed-off-by: default avatarLogan Gunthorpe <logang@deltatee.com>
    Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
    Signed-off-by: default avatarSong Liu <song@kernel.org>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    c629f345
raid5.c 250 KB