• N
    md: factor md_stop_writes out of do_md_stop. · a047e125
    NeilBrown 提交于
    Further refactoring of do_md_stop.
    This one requires some explanation as it takes code from different
    places in do_md_stop, so some re-ordering happens.
    
    We only get into this part of do_md_stop if there are no active opens
    of the device, so no writes can be happening and the device must have
    been flushed.  In md_stop_writes we want to stop any internal sources
    of writes - i.e. resync - and flush out the metadata.
    
    The only code that was previously before some of this code is
    code to clean up the queue, the mddev, the gendisk, or sysfs, all
    of which is probably better after code that makes active changes (i.e.
    triggers writes).
    Signed-off-by: NNeilBrown <neilb@suse.de>
    a047e125
md.c 187.1 KB