aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikanth Karthikesan2009-09-01 15:40:15 -0500
committerJens Axboe2009-09-01 15:40:15 -0500
commitc295fc05789653ef24f296299df7c5f92fe74dce (patch)
treef1b14e69ba862d41baafbb30212e918e35ba626a /block/blk-sysfs.c
parentadda766193ea1cf3137484a9521972d080d0b7af (diff)
downloadkernel-common-c295fc05789653ef24f296299df7c5f92fe74dce.tar.gz
kernel-common-c295fc05789653ef24f296299df7c5f92fe74dce.tar.xz
kernel-common-c295fc05789653ef24f296299df7c5f92fe74dce.zip
block: Allow changing max_sectors_kb above the default 512
The patch "block: Use accessor functions for queue limits" (ae03bf639a5027d27270123f5f6e3ee6a412781d) changed queue_max_sectors_store() to use blk_queue_max_sectors() instead of directly assigning the value. But blk_queue_max_sectors() differs a bit 1. It sets both max_sectors_kb, and max_hw_sectors_kb 2. Never allows one to change max_sectors_kb above BLK_DEF_MAX_SECTORS. If one specifies a value greater then max_hw_sectors is set to that value but max_sectors is set to BLK_DEF_MAX_SECTORS I am not sure whether blk_queue_max_sectors() should be changed, as it seems to be that way for a long time. And there may be callers dependent on that behaviour. This patch simply reverts to the older way of directly assigning the value to max_sectors as it was before. Signed-off-by: Nikanth Karthikesan <knikanth@suse.de> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/blk-sysfs.c')
-rw-r--r--block/blk-sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index 418d6361968..d3aa2aadb3e 100644
--- a/block/blk-sysfs.c
+++ b/block/blk-sysfs.c
@@ -133,7 +133,7 @@ queue_max_sectors_store(struct request_queue *q, const char *page, size_t count)
133 return -EINVAL; 133 return -EINVAL;
134 134
135 spin_lock_irq(q->queue_lock); 135 spin_lock_irq(q->queue_lock);
136 blk_queue_max_sectors(q, max_sectors_kb << 1); 136 q->limits.max_sectors = max_sectors_kb << 1;
137 spin_unlock_irq(q->queue_lock); 137 spin_unlock_irq(q->queue_lock);
138 138
139 return ret; 139 return ret;