*参照元 [#p9a8a140] #backlinks *説明 [#w6023a0e] -パス: [[linux-2.6.33/]] -パス: [[linux-2.6.33/block/blk-timeout.c]] -FIXME: これは何? --説明 **引数 [#k5fcfa05] -unsigned long data --blk_alloc_queue_node() の setup_timer() 呼び出し時に指定した値 --request_queue を unsigned long にキャストした値が渡される。 --[[linux-2.6.33/blk_alloc_queue_node()]] --[[linux-2.6.33/setup_timer()]] --[[linux-2.6.33/request_queue]] **返り値 [#z86c56e0] -なし **参考 [#u4fd682c] *実装 [#qf33dbe3] void blk_rq_timed_out_timer(unsigned long data) { struct request_queue *q = (struct request_queue *) data; unsigned long flags, next = 0; struct request *rq, *tmp; - --[[linux-2.6.33/request_queue]] - --[[linux-2.6.33/request]] spin_lock_irqsave(q->queue_lock, flags); - --[[linux-2.6.33/spin_lock_irqsave()]] list_for_each_entry_safe(rq, tmp, &q->timeout_list, timeout_list) { if (time_after_eq(jiffies, rq->deadline)) { list_del_init(&rq->timeout_list); - --[[linux-2.6.33/list_for_each_entry_safe()]] - --[[linux-2.6.33/timer_after_eq()]] - --[[linux-2.6.33/list_del_init()]] /* * Check if we raced with end io completion */ if (blk_mark_rq_complete(rq)) continue; blk_rq_timed_out(rq); - --[[linux-2.6.33/blk_mark_rq_complete()]] - --[[linux-2.6.33/blk_rq_timed_out()]] } else if (!next || time_after(next, rq->deadline)) next = rq->deadline; - --[[linux-2.6.33/timer_after()]] } /* * next can never be 0 here with the list non-empty, since we always * bump ->deadline to 1 so we can detect if the timer was ever added * or not. See comment in blk_add_timer() */ if (next) mod_timer(&q->timeout, round_jiffies_up(next)); - --[[linux-2.6.33/mod_timer()]] - --[[linux-2.6.33/round_jiffies_up()]] spin_unlock_irqrestore(q->queue_lock, flags); - --[[linux-2.6.33/spin_unlock_irqresotre()]] } *コメント [#jdda33f6]