8000 get_block · mathfur/minix Wiki · GitHub
[go: up one dir, main page]

Skip to content
< 8000 link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/25390-05afed6199833274.js" fetchpriority="low" />
mathfur edited this page Apr 28, 2013 · 4 revisions

呼出元

概要

  • servers/fs/cache.c:27にて定義
  • あるデバイスのあるブロック(ブロック番号で指定)を取得する

引数

  • dev_t dev; // ブロックの居るデバイス(short)
  • block_t block; // 取得したいブロック(unsigned long)
  • int only_search; // NO_READ or nil?

実装

  • buf_hashの先にすぐ目的のbufがあればそれを返す(b_count値は増やす)
  • なければbuf_hash[b]->b_hash->b_hash、、と順番に見ていく

コメント

Clone this wiki locally

0