code:struct mount - ikarishinjieva/unixV6-code-analyze-chs GitHub Wiki
- 描述 文件系统 的 数据结构
0267
0268 /* Mount structure: used to locate
0269 * the super block of a mounted file.
0270 */
0271
0272 struct mount
0273 {
0274 int m_dev;/* device mounted */
0275 int *m_bufp; /* pointer to superblock */
- 文件系统 对应设备的设备号
0276 int *m_inodp; /* pointer to mounted on inode */
- 指向 超级块的 struct buf结构
- 关于 超级块 ,参考文件系统
0277 } mount[NMOUNT];
- 指向 装载文件系统 的 struct inode结构
- 参考文件系统
0278 /* -------------------------*/
- NMOUNT 定义在 param.h 0133行,值为5
0279
0280
0281
0282
0283
0284
0285
0286
0287
0288
0289
0290
0291
0292
0293
0294
0295
0296
0297
0298
0299