]> git.karo-electronics.de Git - karo-tx-linux.git/commit
block: Deprecate QUEUE_FLAG_CLUSTER and use queue_limits instead
authorMartin K. Petersen <martin.petersen@oracle.com>
Wed, 1 Dec 2010 18:41:49 +0000 (19:41 +0100)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Sun, 17 Apr 2011 20:16:14 +0000 (16:16 -0400)
commitf241075f7a2ab1a766583ed83202728a17d0d93e
tree384acf25d2e59a27b47deb2867cdf35880f9118d
parent5f4dff37cccdf85243f50e877af7090afe186931
block: Deprecate QUEUE_FLAG_CLUSTER and use queue_limits instead

commit e692cb668fdd5a712c6ed2a2d6f2a36ee83997b4 upstream.

When stacking devices, a request_queue is not always available. This
forced us to have a no_cluster flag in the queue_limits that could be
used as a carrier until the request_queue had been set up for a
metadevice.

There were several problems with that approach. First of all it was up
to the stacking device to remember to set queue flag after stacking had
completed. Also, the queue flag and the queue limits had to be kept in
sync at all times. We got that wrong, which could lead to us issuing
commands that went beyond the max scatterlist limit set by the driver.

The proper fix is to avoid having two flags for tracking the same thing.
We deprecate QUEUE_FLAG_CLUSTER and use the queue limit directly in the
block layer merging functions. The queue_limit 'no_cluster' is turned
into 'cluster' to avoid double negatives and to ease stacking.
Clustering defaults to being enabled as before. The queue flag logic is
removed from the stacking function, and explicitly setting the cluster
flag is no longer necessary in DM and MD.

Reported-by: Ed Lin <ed.lin@promise.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Acked-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
block/blk-merge.c
block/blk-settings.c
block/blk-sysfs.c
drivers/md/dm-table.c
drivers/md/md.c
drivers/scsi/scsi_lib.c
include/linux/blkdev.h