• Andrew Morton's avatar
    [PATCH] bio kmapping changes · 240d3e2d
    Andrew Morton authored
    RAID5 is calling copy_data() under sh->lock.  But copy_data() does kmap(),
    which can sleep.
    
    The best fix is to use kmap_atomic() in there.  It is faster than kmap() and
    does not block.
    
    The patch removes the unused bio_kmap() and replaces __bio_kmap() with
    __bio_kmap_atomic().  I think it's best to withdraw the sleeping-and-slow
    bio_kmap() from the kernel API before someone else tries to use it.
    
    
    Also, I notice that bio_kmap_irq() was using local_save_flags().  This is a
    bug - local_save_flags() does not disable interrupts.  Converted that to
    local_irq_save().  These names are terribly chosen.
    
    This patch was acked by Jens and Neil.
    240d3e2d
raid5.c 45.7 KB