linux-2.6.25/blk_queue_make_request()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#rfb81cb8]
#backlinks
*説明 [#i60a40ee]
-パス: [[linux-2.6.25/block/blk-settings.c]]
-FIXME: これは何?
--説明
**引数 [#qf138592]
-struct request_queue *q
--
-make_request_fn *mfn
--
**返り値 [#y7b8359d]
-なし
**参考 [#xa2f08ef]
-なし
*実装 [#a31fb650]
/**
* blk_queue_make_request - define an alternate make_req...
* @q: the request queue for the device to be affected
* @mfn: the alternate make_request function
*
* Description:
* The normal way for &struct bios to be passed to a ...
* driver is for them to be collected into requests o...
* queue, and then to allow the device driver to sele...
* off that queue when it is ready. This works well ...
* devices. However some block devices (typically vir...
* such as md or lvm) do not benefit from the process...
* request queue, and are served best by having the r...
* directly to them. This can be achieved by providi...
* to blk_queue_make_request().
*
* Caveat:
* The driver that does this *must* be able to deal a...
* with buffers in "highmemory". This can be accompli...
* __bio_kmap_atomic() to get a temporary kernel mapp...
* blk_queue_bounce() to create a buffer in normal me...
**/
void blk_queue_make_request(struct request_queue *q, mak...
{
/*
* set defaults
*/
q->nr_requests = BLKDEV_MAX_RQ;
blk_queue_max_phys_segments(q, MAX_PHYS_SEGMENTS);
blk_queue_max_hw_segments(q, MAX_HW_SEGMENTS);
q->make_request_fn = mfn;
q->backing_dev_info.ra_pages =
(VM_MAX_READAHEAD * 1024) / PAGE...
q->backing_dev_info.state = 0;
q->backing_dev_info.capabilities = BDI_CAP_MAP_C...
blk_queue_max_sectors(q, SAFE_MAX_SECTORS);
blk_queue_hardsect_size(q, 512);
blk_queue_dma_alignment(q, 511);
blk_queue_congestion_threshold(q);
q->nr_batching = BLK_BATCH_REQ;
q->unplug_thresh = 4; /* hmm */
q->unplug_delay = (3 * HZ) / 1000; /* 3 mil...
if (q->unplug_delay == 0)
q->unplug_delay = 1;
INIT_WORK(&q->unplug_work, blk_unplug_work);
q->unplug_timer.function = blk_unplug_timeout;
q->unplug_timer.data = (unsigned long)q;
/*
* by default assume old behaviour and bounce fo...
*/
blk_queue_bounce_limit(q, BLK_BOUNCE_HIGH);
}
EXPORT_SYMBOL(blk_queue_make_request);
*コメント [#t4788ee7]
終了行:
*参照元 [#rfb81cb8]
#backlinks
*説明 [#i60a40ee]
-パス: [[linux-2.6.25/block/blk-settings.c]]
-FIXME: これは何?
--説明
**引数 [#qf138592]
-struct request_queue *q
--
-make_request_fn *mfn
--
**返り値 [#y7b8359d]
-なし
**参考 [#xa2f08ef]
-なし
*実装 [#a31fb650]
/**
* blk_queue_make_request - define an alternate make_req...
* @q: the request queue for the device to be affected
* @mfn: the alternate make_request function
*
* Description:
* The normal way for &struct bios to be passed to a ...
* driver is for them to be collected into requests o...
* queue, and then to allow the device driver to sele...
* off that queue when it is ready. This works well ...
* devices. However some block devices (typically vir...
* such as md or lvm) do not benefit from the process...
* request queue, and are served best by having the r...
* directly to them. This can be achieved by providi...
* to blk_queue_make_request().
*
* Caveat:
* The driver that does this *must* be able to deal a...
* with buffers in "highmemory". This can be accompli...
* __bio_kmap_atomic() to get a temporary kernel mapp...
* blk_queue_bounce() to create a buffer in normal me...
**/
void blk_queue_make_request(struct request_queue *q, mak...
{
/*
* set defaults
*/
q->nr_requests = BLKDEV_MAX_RQ;
blk_queue_max_phys_segments(q, MAX_PHYS_SEGMENTS);
blk_queue_max_hw_segments(q, MAX_HW_SEGMENTS);
q->make_request_fn = mfn;
q->backing_dev_info.ra_pages =
(VM_MAX_READAHEAD * 1024) / PAGE...
q->backing_dev_info.state = 0;
q->backing_dev_info.capabilities = BDI_CAP_MAP_C...
blk_queue_max_sectors(q, SAFE_MAX_SECTORS);
blk_queue_hardsect_size(q, 512);
blk_queue_dma_alignment(q, 511);
blk_queue_congestion_threshold(q);
q->nr_batching = BLK_BATCH_REQ;
q->unplug_thresh = 4; /* hmm */
q->unplug_delay = (3 * HZ) / 1000; /* 3 mil...
if (q->unplug_delay == 0)
q->unplug_delay = 1;
INIT_WORK(&q->unplug_work, blk_unplug_work);
q->unplug_timer.function = blk_unplug_timeout;
q->unplug_timer.data = (unsigned long)q;
/*
* by default assume old behaviour and bounce fo...
*/
blk_queue_bounce_limit(q, BLK_BOUNCE_HIGH);
}
EXPORT_SYMBOL(blk_queue_make_request);
*コメント [#t4788ee7]
ページ名: