Jens,
All we want to do here is to check if there are requests in the
queue. Hence thinking of using elv_queue_empty(). Do you think
we still need to acquire queue lock for this ? This code will be
run when we have stopped everything else in other cpus by putting
them into spin.
--- 2569+mjb1/drivers/dump/dump_blockdev.c.orig Wed May 14 13:23:36 2003
+++ 2569+mjb1/drivers/dump/dump_blockdev.c Wed May 14 13:24:58 2003
@@ -258,10 +258,11 @@
dump_block_silence(struct dump_dev *dev)
{
struct dump_blockdev *dump_bdev = DUMP_BDEV(dev);
+ struct request_queue *q = bdev_get_queue(dump_bdev->bdev);
/* For now we assume we have the device to ourselves */
/* Just a quick sanity check */
- if (!blk_queue_empty(bdev_get_queue(dump_bdev->bdev))) {
+ if (!elv_queue_empty(q)) {
/* i/o in flight - safer to quit */
return -EBUSY;
}
Regards,
Bharata.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/