⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dcache.h.txt

📁 linux内核学习笔记 希望想看的人可以很快下载到
💻 TXT
字号:
and problems,send mails to sindybear@163.com

相关文件



这个文件主要负责目录换存的管理,为了提高目录访问的效率,设置了目录换存区,其中主要的基本结构
就是dentry结构,这个结构中有许多链表结构来将这些结构连接起来。


dentry结构的主要作用是表示一个文件或者目录在内存中的逻辑结构,但一个文件并不一定仅仅对应一个
dentry结构,例如有一个文件有一个符号连接,那么这个文件和文件的符号连接都被访问的话,那么内存中
应该有两个dentry结构,但他们都指向唯一的一个inode结构
(1)struct dentry {
        atomic_t d_count;
        unsigned int d_flags;
        struct inode  * d_inode;        /* Where the name belongs to - NULL is egative */
        struct dentry * d_parent;       /* parent directory */
        struct list_head d_hash;        /* 连接到dentry--hash表 */
        struct list_head d_lru;         /* 如果d_count = 0 连接到dentry_unused表 */
        struct list_head d_child;       /* 连接到上一层目录的d_subdirs中 */
        struct list_head d_subdirs;     /* 连接下层子目录 */
        struct list_head d_alias;       /* 连接到同一个inode的指针 */
        int d_mounted;
        struct qstr d_name;
        unsigned long d_time;           /* used by d_revalidate */
        struct dentry_operations  *d_op;
        struct super_block * d_sb;      /* The root of the dentry tree */
        unsigned long d_vfs_flags;
        void * d_fsdata;                /* fs-specific data */
        void * d_extra_attributes;      /* TUX-specific data */
        unsigned char d_iname[DNAME_INLINE_LEN]; /* small names */
};

struct qstr {
        const unsigned char * name;
        unsigned int len;
        unsigned int hash;
};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -