Skip to content
  • Alessandro Rubini's avatar
    buffers: properly handle retr_block called by push · 2300e624
    Alessandro Rubini authored
    
    
    buffer->store_block calls trigger->push_block when it receives the
    first block. The trigger user fires directly , and if the device
    accepts the data immediately, our data_done() will retr_block from the
    buffer.  This happens with zio-zero, cset 1, and leads to a deadlock.
    
    To allow immediate success of push_block down to device level, release
    the lock before calling push_block. The code here also handles
    pathologic situations like two processes storing at the same time.
    
    Signed-off-by: default avatarAlessandro Rubini <rubini@gnudd.com>
    Acked-by: default avatarFederico Vaga <federico.vaga@gmail.com>
    2300e624