• Webb Scales's avatar
    hpsa: fix race between abort handler and main i/o path · 281a7fd0
    Webb Scales authored
    This means changing the allocator to reference count commands.
    The reference count is now the authoritative indicator of whether a
    command is allocated or not.  The h->cmd_pool_bits bitmap is now
    only a heuristic hint to speed up the allocation process, it is no
    longer the authoritative record of allocated commands.
    
    Since we changed the command allocator to use reference counting
    as the authoritative indicator of whether a command is allocated,
    fail_all_outstanding_cmds needs to use the reference count not
    h->cmd_pool_bits for this purpose.
    
    Fix hpsa_drain_accel_commands to use the reference count as the
    authoritative indicator of whether a command is allocated instead of
    the h->cmd_pool_bits bitmap.
    Reviewed-by: default avatarScott Teel <scott.teel@pmcs.com>
    Signed-off-by: default avatarDon Brace <don.brace@pmcs.com>
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    281a7fd0
hpsa_cmd.h 25.7 KB