]> git.neil.brown.name Git - history.git/commit
[PATCH] bio kmapping changes
authorAndrew Morton <akpm@digeo.com>
Thu, 3 Apr 2003 00:26:43 +0000 (16:26 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Thu, 3 Apr 2003 00:26:43 +0000 (16:26 -0800)
commit240d3e2d1f4dad9d40ad101352538d75e8c37c98
tree3a1210ed525bb51072639b02094434a7777add1a
parentd597f71b51b3c1b1a2d3290aa3e731f4e8c2207f
[PATCH] bio kmapping changes

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.
Documentation/block/biodoc.txt
drivers/block/ll_rw_blk.c
drivers/md/raid5.c
include/linux/bio.h