]> git.baikalelectronics.ru Git - kernel.git/commit
[S390] tape390: Fix request queue handling in block driver
authorMichael Holzheu <holzheu@linux.vnet.ibm.com>
Wed, 14 Oct 2009 10:43:45 +0000 (12:43 +0200)
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>
Wed, 14 Oct 2009 10:43:52 +0000 (12:43 +0200)
commitcbe9ebb0e718c509ebe569d60d9a4e6be85547fa
treebbfe2c44a6eed8edf5b3f9a5064031efb00fc8cd
parent87eb3176fd0c288aa913ebb3653cf801162d1188
[S390] tape390: Fix request queue handling in block driver

When setting a channel attached tape online under Linux 2.6.31, the

"vol_id" process from udev hangs in sync_page():
 2 sync_page+144 [0x1dfaac]
 3 __wait_on_bit_lock+194 [0x58c23e]
 4 __lock_page+116 [0x1df9dc]
 5 truncate_inode_pages_range+728 [0x1ed7cc]
 6 __blkdev_put+244 [0x25f738]
 7 __fput+300 [0x229c4c]
 8 filp_close+122 [0x225a3a]

The reason for that is an error in the request queue handling. It can
happen that we fetch a request, but do not process it further because
the number of queued requests exceeds TAPEBLOCK_MIN_REQUEUE.
To fix this, we should call blk_peek_request() instead of
blk_fetch_request() in the while condition and fetch the request in
the loop body afterwards.

This bug was introduced with the patch "block: implement and enforce
request peek/start/fetch" (dd8109879df61b9770baddad787622b18a7991a8)

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/char/tape_block.c