*参照元 [#s17d99fa]
#backlinks

*説明 [#ve989e87]
-パス: 
--CONFIG_BOUNCE による分岐点: [[linux-2.6.25/include/linux/blkdev.h]]
--関数の定義位置: [[linux-2.6.25/mm/bounce.c]]

-これは何?
--説明


**引数 [#h9d75e73]
-struct request_queue *q
--
--[[linux-2.6.25/request_queue]]
-struct bio **bio_orig
--
--[[linux-2.6.25/bio]]

**返り値 [#e6ef81dd]
-なし

**参考 [#l860da97]


*実装 [#l3c93bfc]
*** [#ke591fd7]
 #ifdef CONFIG_BOUNCE
 
 (...略...)
 
 extern void blk_queue_bounce(struct request_queue *q, struct bio **bio);
-CONFIG_BOUNCE が定義されている場合は、
別の場所で関数が実装される。
--[[linux-2.6.25/mm/bounce.c]]

 #else
 
 (...略...)
 
 static inline void blk_queue_bounce(struct request_queue *q, struct bio **bio)
 {
 }
-CONFIG_BOUNCE が定義されていない場合は何もしない。

 #endif /* CONFIG_MMU */


***CONFIG_BOUNCE が定義されている場合 [#a0cba6f2]
 void blk_queue_bounce(struct request_queue *q, struct bio **bio_orig)
 {
         mempool_t *pool;
 
         /*
          * Data-less bio, nothing to bounce
          */
         if (bio_empty_barrier(*bio_orig))
                 return;
 
         /*
          * for non-isa bounce case, just check if the bounce pfn is equal
          * to or bigger than the highest pfn in the system -- in that case,
          * don't waste time iterating over bio segments
          */
         if (!(q->bounce_gfp & GFP_DMA)) {
                 if (q->bounce_pfn >= blk_max_pfn)
                         return;
                 pool = page_pool;
         } else {
                 BUG_ON(!isa_page_pool);
                 pool = isa_page_pool;
         }
 
         /*
          * slow path
          */
         __blk_queue_bounce(q, bio_orig, pool);
 }
 
 EXPORT_SYMBOL(blk_queue_bounce);

***CONFIG_BOUNCE が定義されていない場合 [#c0262f33]
-[[linux-2.6.25/mm/bounce.c]]には定義なし
--[[linux-2.6.25/include/linux/blkdev.h]]を参照のこと。


*コメント [#f10b04a6]
#comment

トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS