文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>vfs super_block

vfs super_block

时间:2010-05-20  来源:哈哈的雷

struct super_block {
    struct list_head    s_list;        /* Keep this first */
    dev_t            s_dev;        /* search index; _not_ kdev_t */
    unsigned long        s_blocksize;
    unsigned char        s_blocksize_bits;
    unsigned char        s_dirt;
    loff_t            s_maxbytes;    /* Max file size */
    struct file_system_type    *s_type;
    const struct super_operations    *s_op;
    const struct dquot_operations    *dq_op;
    const struct quotactl_ops    *s_qcop;
    const struct export_operations *s_export_op;
    unsigned long        s_flags;
    unsigned long        s_magic;
    struct dentry        *s_root;
    struct rw_semaphore    s_umount;
    struct mutex        s_lock;
    int            s_count;
    int            s_need_sync;
    atomic_t        s_active;
#ifdef CONFIG_SECURITY
    void *s_security;
#endif
    struct xattr_handler    **s_xattr;

    struct list_head    s_inodes;    /* all inodes */
    struct hlist_head    s_anon;        /* anonymous dentries for (nfs) exporting */
    struct list_head    s_files;
    /* s_dentry_lru and s_nr_dentry_unused are protected by dcache_lock */
    struct list_head    s_dentry_lru;    /* unused dentry lru */
    int            s_nr_dentry_unused;    /* # of dentry on lru */

    struct block_device    *s_bdev;
    struct backing_dev_info *s_bdi;
    struct mtd_info        *s_mtd;
    struct list_head    s_instances;
    struct quota_info    s_dquot;    /* Diskquota specific options */

    int            s_frozen;
    wait_queue_head_t    s_wait_unfrozen;

    char s_id[32];                /* Informational name */

    void             *s_fs_info;    /* Filesystem private info */
    fmode_t            s_mode;

    /*
     * The next field is for VFS *only*. No filesystems have any business
     * even looking at it. You had been warned.
     */
    struct mutex s_vfs_rename_mutex;    /* Kludge */

    /* Granularity of c/m/atime in ns.
     Cannot be worse than a second */
    u32         s_time_gran;

    /*
     * Filesystem subtype. If non-empty the filesystem type field
     * in /proc/mounts will be "type.subtype"
     */
    char *s_subtype;

    /*
     * Saved mount options for lazy filesystems using
     * generic_show_options()
     */
    char *s_options;
};




struct super_operations {
       struct inode *(*alloc_inode)(struct super_block *sb);
    void (*destroy_inode)(struct inode *);

       void (*dirty_inode) (struct inode *);
    int (*write_inode) (struct inode *, int);
    void (*drop_inode) (struct inode *);
    void (*delete_inode) (struct inode *);
    void (*put_super) (struct super_block *);
    void (*write_super) (struct super_block *);
    int (*sync_fs)(struct super_block *sb, int wait);
    int (*freeze_fs) (struct super_block *);
    int (*unfreeze_fs) (struct super_block *);
    int (*statfs) (struct dentry *, struct kstatfs *);
    int (*remount_fs) (struct super_block *, int *, char *);
    void (*clear_inode) (struct inode *);
    void (*umount_begin) (struct super_block *);

    int (*show_options)(struct seq_file *, struct vfsmount *);
    int (*show_stats)(struct seq_file *, struct vfsmount *);
#ifdef CONFIG_QUOTA
    ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t);
    ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t);
#endif
    int (*bdev_try_to_free_page)(struct super_block*, struct page*, gfp_t);
};


相关阅读 更多 +
排行榜 更多 +
超级迈阿密女孩

超级迈阿密女孩

飞行射击 下载
人类与骷髅安卓版

人类与骷髅安卓版

飞行射击 下载
绝地生存战场最新版

绝地生存战场最新版

飞行射击 下载