Skip to content
  • Mike Snitzer's avatar
    dm thin: send event about thin-pool state change _after_ making it · f6c36758
    Mike Snitzer authored
    
    
    Sending a DM event before a thin-pool state change is about to happen is
    a bug.  It wasn't realized until it became clear that userspace response
    to the event raced with the actual state change that the event was
    meant to notify about.
    
    Fix this by first updating internal thin-pool state to reflect what the
    DM event is being issued about.  This fixes a long-standing racey/buggy
    userspace device-mapper-test-suite 'resize_io' test that would get an
    event but not find the state it was looking for -- so it would just go
    on to hang because no other events caused the test to reevaluate the
    thin-pool's state.
    
    Cc: stable@vger.kernel.org
    Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
    f6c36758