]> git.baikalelectronics.ru Git - kernel.git/commit
block: Allow changing max_sectors_kb above the default 512
authorNikanth Karthikesan <knikanth@suse.de>
Tue, 1 Sep 2009 20:40:15 +0000 (22:40 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 1 Sep 2009 20:40:15 +0000 (22:40 +0200)
commit9682841c0444951089a50bd426d1c2cc4f623db8
treef1b14e69ba862d41baafbb30212e918e35ba626a
parentf0848313f9a344278d62c70ac4294a9e1fab0ad3
block: Allow changing max_sectors_kb above the default 512

The patch "block: Use accessor functions for queue limits"
(6d85b00cd6d2a0c6949152f0c6ca6b4116875d1a) 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>
block/blk-sysfs.c