zoukankan      html  css  js  c++  java
  • itop4412学习-超级块操作

    1. 先看下超级块支持的函数列表,文件路径4412_SCP精英版Android源码iTop4412_Kernel_3.0_20140521iTop4412_Kernel_3.0includelinux

    struct super_operations {
           struct inode *(*alloc_inode)(struct super_block *sb);
        void (*destroy_inode)(struct inode *);
    
           void (*dirty_inode) (struct inode *, int flags);
        int (*write_inode) (struct inode *, struct writeback_control *wbc);
        int (*drop_inode) (struct inode *);
        void (*evict_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 (*umount_begin) (struct super_block *);
    
        int (*show_options)(struct seq_file *, struct vfsmount *);
        int (*show_devname)(struct seq_file *, struct vfsmount *);
        int (*show_path)(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);
    };

    2. 学习一下文件的操作

  • 相关阅读:
    360安全浏览器发布
    搬家了
    驾驶员考试科目一通过
    脑海中总有些新念头
    2008汤姆斯杯尤伯杯羽毛球赛事直播时刻表
    操作日期和时间
    数据库设计中的14个技巧
    字段属性(空值、缺省值、标记字段/自增字段)
    SQL触发器
    数据库质疑事件 总结
  • 原文地址:https://www.cnblogs.com/429512065qhq/p/9630068.html
Copyright © 2011-2022 走看看