zoukankan      html  css  js  c++  java
  • Linux 超级块

    Linux 超级块的结构

     1 //come from /usr/src/kernel/'uname –r'/include/linux/fs.h 
     2 struct super_block { 
     3         struct list_head s_list; /* Keep this first */ 
     4         dev_t s_dev;                                 /* search index; _not_ kdev_t */ 
     5         unsigned long s_blocksize;                     //数据块大小 
     6         unsigned char s_blocksize_bits;             //块大小占用的位数 
     7         unsigned char s_dirt;                         //脏位,如果该位置位,说明超级块被修改 
     8         unsigned long long s_maxbytes;                //单个文件最大体积 
     9         struct file_system_type *s_type;             //文件系统结构 
    10         struct super_operations *s_op;                 //超级块支持的操作
    11         struct dquot_operations *dq_op;             //
    12         struct quotactl_ops *s_qcop;                 //用户配额限制
    13         struct export_operations *s_export_op;        //
    14 
    15         unsigned longs_flags; 
    16         unsigned long s_magic;                         //区块的magic数
    17         struct dentry *s_root;                         //根目录
    18         struct rw_semaphore s_umount;                 //
    19         struct mutex s_lock;                         //
    20         int s_count;                                 //
    21         int s_syncing;                                 //
    22         int s_need_sync_fs;                         //
    23         atomic_t s_active;                             //是否活动
    24         void *s_security;                             //
    25         struct xattr_handler **s_xattr;                //
    26 
    27         struct list_head s_inodes;                    //所有inode 
    28         struct list_head s_dirty;                     //脏inode 
    29         struct list_head s_io;                        //用于写回的缓存 
    30         struct hlist_head s_anon;                     //nfs匿名入口 
    31         struct list_head s_files;                    //文件链表头
    32 
    33         struct block_device *s_bdev; 
    34         struct list_head s_instances; 
    35         struct quota_info s_dquot;                     //配额定制选项
    36 
    37         int s_frozen;                     
    38         wait_queue_head_t s_wait_unfrozen;
    39 
    40         char s_id[32];                                //名字
    41 
    42         void *s_fs_info; /* Filesystem private info */ 
    43         /** The next field is for VFS *only*. No filesystems have any business 
    44         * even looking at it. You had been warned. */ 
    45         struct mutex s_vfs_rename_mutex; /* Kludge */ 
    46         /* Granularity of c/m/atime in ns. Cannot be worse than a second */ 
    47         u32 s_time_gran; 
    48 };
  • 相关阅读:
    Windows环境安装tesseract-ocr 4.00并配置环境变量
    iis6手工创建网站后无法运行php脚本
    spring boot集成websocket实现聊天功能和监控功能
    spring boot2.0.4集成druid,用jmeter并发测试工具调用接口,druid查看监控的结果
    springboot2.1.5集成单节点elasticsearch6.4.0
    spring boot集成netty-服务端和客户端demo
    spring boot集成mongo统计活跃用户数
    spring boot集成swagger,自定义注解,拦截器,xss过滤,异步调用,定时任务案例
    spring cloud分布式配置中心案例
    spring cloud--zuul网关和zuul请求过滤
  • 原文地址:https://www.cnblogs.com/Lifehacker/p/Linux_superblock_structure.html
Copyright © 2011-2022 走看看