diff options
author | Roger Pau Monne <roger.pau@citrix.com> | 2013-06-21 12:56:54 +0200 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2013-06-21 15:58:55 -0400 |
commit | 294caaf29c26cfed3b446fb46393b8b39ea1c0d3 (patch) | |
tree | 71713c397582c01d7fa75bfc17de38fdf563e00c /drivers/block/xen-blkfront.c | |
parent | 2d9105433ff471d2c688817e98804029c074a623 (diff) | |
download | linux-294caaf29c26cfed3b446fb46393b8b39ea1c0d3.tar.gz linux-294caaf29c26cfed3b446fb46393b8b39ea1c0d3.tar.bz2 linux-294caaf29c26cfed3b446fb46393b8b39ea1c0d3.zip |
xen-blkfront: set blk_queue_max_hw_sectors correctly
Now that indirect segments are enabled blk_queue_max_hw_sectors must
be set to match the maximum number of sectors we can handle in a
request.
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reported-by: Felipe Franciosi <felipe.franciosi@citrix.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/block/xen-blkfront.c')
-rw-r--r-- | drivers/block/xen-blkfront.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 1a0f67c10ec7..2e1ee348ffe1 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c @@ -633,7 +633,7 @@ static int xlvbd_init_blk_queue(struct gendisk *gd, u16 sector_size, /* Hard sector size and max sectors impersonate the equiv. hardware. */ blk_queue_logical_block_size(rq, sector_size); blk_queue_physical_block_size(rq, physical_sector_size); - blk_queue_max_hw_sectors(rq, 512); + blk_queue_max_hw_sectors(rq, (segments * PAGE_SIZE) / 512); /* Each segment in a request is up to an aligned page in size. */ blk_queue_segment_boundary(rq, PAGE_SIZE - 1); |