Operating system 日志结构文件系统中的符号链接
我正在做一个关于日志结构文件系统的项目,我正在做这个项目,已经为普通文件和目录创建了索引节点,现在我想处理符号链接 这是我的inode的结构 int8处于活动状态Operating system 日志结构文件系统中的符号链接,operating-system,Operating System,我正在做一个关于日志结构文件系统的项目,我正在做这个项目,已经为普通文件和目录创建了索引节点,现在我想处理符号链接 这是我的inode的结构 int8处于活动状态 /* inode no. of the file */ uint16_t inode_number; /* the most up-to-date version id */ uint8_t latest_version_id; /* Details about the direct block */ BlockInfo dire
/* inode no. of the file */
uint16_t inode_number;
/* the most up-to-date version id */
uint8_t latest_version_id;
/* Details about the direct block */
BlockInfo direct_block[4];
/* Details about the indirect block */
BlockInfo indirect_block;
/* The type, permissions, etc. */
unsigned long inode_mode;
/* The user id */
//unsigned short uid;
/* The group id */
//unsigned short gid;
/* The number of links to the inode */
unsigned short number_of_links;
/* The size of the file, in bytes.
* If it is a directory file, this will contain the number of
* immediate children in the directory.
*
* If it is a regular file, it will contain the actual file size*/
unsigned long int file_size;
/* The number of blocks used by the inode */
unsigned long number_of_blocks;
/* The creation time of the file */
struct timeval creation_time;
/* The modification time of the file */
struct timeval modification_time;
struct timeval access_time;
任何人都可以帮助我创建符号链接。符号链接是一个常规文件,其中包含指向目标的路径名。使用模式位使文件系统代码读取链接,并在打开、创建、取消链接等时执行重定向