• Shlomo Pongratz's avatar
    block/null_blk: Fix completion processing from LIFO to FIFO · d7790b92
    Shlomo Pongratz authored
    The completion queue is implemented using lockless list.
    
    The llist_add is adds the events to the list head which is a push operation.
    The processing of the completion elements is done by disconnecting all the
    pushed elements and iterating over the disconnected list. The problem is
    that the processing is done in reverse order w.r.t order of the insertion
    i.e. LIFO processing. By reversing the disconnected list which is done in
    linear time the desired FIFO processing is achieved.
    Signed-off-by: default avatarShlomo Pongratz <shlomop@mellanox.com>
    Signed-off-by: default avatarJens Axboe <axboe@fb.com>
    d7790b92
null_blk.c 14.5 KB