linux/include
Neil Brown da6e1a32fb [PATCH] md: avoid possible BUG_ON in md bitmap handling
md/bitmap tracks how many active write requests are pending on blocks
associated with each bit in the bitmap, so that it knows when it can clear
the bit (when count hits zero).

The counter has 14 bits of space, so if there are ever more than 16383, we
cannot cope.

Currently the code just calles BUG_ON as "all" drivers have request queue
limits much smaller than this.

However is seems that some don't.  Apparently some multipath configurations
can allow more than 16383 concurrent write requests.

So, in this unlikely situation, instead of calling BUG_ON we now wait
for the count to drop down a bit.  This requires a new wait_queue_head,
some waiting code, and a wakeup call.

Tested by limiting the counter to 20 instead of 16383 (writes go a lot slower
in that case...).

Signed-off-by: Neil Brown <neilb@suse.de>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-09 09:25:47 -08:00
..
acpi
asm-alpha [PATCH] kill eth_io_copy_and_sum() 2007-02-09 09:14:07 -08:00
asm-arm [PATCH] kill eth_io_copy_and_sum() 2007-02-09 09:14:07 -08:00
asm-arm26
asm-avr32 [AVR32] ssize_t should be long, not int 2007-02-09 15:01:59 +01:00
asm-cris [PATCH] kill eth_io_copy_and_sum() 2007-02-09 09:14:07 -08:00
asm-frv
asm-generic
asm-h8300
asm-i386 [PATCH] kill eth_io_copy_and_sum() 2007-02-09 09:14:07 -08:00
asm-ia64
asm-m32r
asm-m68k
asm-m68knommu
asm-mips Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-tc 2007-02-09 09:22:36 -08:00
asm-parisc [PATCH] kill eth_io_copy_and_sum() 2007-02-09 09:14:07 -08:00
asm-powerpc
asm-ppc [PATCH] kill eth_io_copy_and_sum() 2007-02-09 09:14:07 -08:00
asm-s390
asm-sh
asm-sh64
asm-sparc
asm-sparc64
asm-um
asm-v850
asm-x86_64 [PATCH] kill eth_io_copy_and_sum() 2007-02-09 09:14:07 -08:00
asm-xtensa
crypto
keys
linux [PATCH] md: avoid possible BUG_ON in md bitmap handling 2007-02-09 09:25:47 -08:00
math-emu
media
mtd
net [NET]: change layout of ehash table 2007-02-08 14:16:46 -08:00
pcmcia
rdma
rxrpc
scsi [PATCH] iscsi endianness annotations 2007-02-09 09:14:07 -08:00
sound [PATCH] Fix breakage with CONFIG_SYSFS_DEPRECATED 2007-02-09 16:25:48 +01:00
video
Kbuild