题目内容
为了实现文件的共享,办法之一是把文件目录分成基本文件目录和符号文件目录。现设目录文件存放在磁盘上,盘块长度为1024B,每个文件说明占48B。其中,文件符号名占6B,内部标识符ID占2B,请回答下列问题: 以下是Linux文件系统的4个相关的结构定义中的一部分: Struct inode{ struct list_head i_hash; struct list_head i_denty; unsiqned long 0 i_ino; unsigned int i_count; kdev_t i_dev; umode_t i_mode; off_t i_size; time_t i_atime; time_t i_mtime; time_t i_ctime; unsigned long i_blksize; unsigned long i_blocks; union{ struct ext2_inode_info ext2_i; }u; }; struct ext2_inode_info{ _u32i_data[15]; _u32i_flags; }; struct denty{ int d_count; struct inode *d_inode; /*where the name belongs to-NULL is negative*/ struct dentry *d_parent; /*parent directory*/ struct list_head d_hash; /*lookup hash list*/ unsigned char d_iname{DNAME_INLINE_LEN}; /*small name*/ }; Struct 1ist_head{ struct list_head*next, *prev; }; 1)请描述这些结构的作用和相互关系。 2)根据这些结构,请描述文件的物理结构。 3)基于这些结构,请设计至少4条有关文件系统功能调用的实现。
查看答案
搜索结果不匹配?点我反馈
更多问题