• J
    nbd: fix how we set bd_invalidated · fe1f9e66
    Josef Bacik 提交于
    bd_invalidated is kind of a pain wrt partitions as it really only
    triggers the partition rescan if it is set after bd_ops->open() runs, so
    setting it when we reset the device isn't useful.  We also sporadically
    would still have partitions left over in some disconnect cases, so fix
    this by always setting bd_invalidated on open if there's no
    configuration or if we've had a disconnect action happen, that way the
    partition table gets invalidated and rescanned properly.
    Signed-off-by: NJosef Bacik <jbacik@fb.com>
    Signed-off-by: NJens Axboe <axboe@kernel.dk>
    fe1f9e66
nbd.c 53.4 KB