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

📄 lustre_fsfilt.h

📁 非常经典的一个分布式系统
💻 H
📖 第 1 页 / 共 2 页
字号:
                        LBUG();                }        }        fsfilt_check_slow(obd, now, obd_timeout, "journal start");        return handle;}static inline void *fsfilt_brw_start(struct obd_device *obd, int objcount,                                     struct fsfilt_objinfo *fso, int niocount,                                     struct niobuf_local *nb,                                     struct obd_trans_info *oti){        return fsfilt_brw_start_log(obd, objcount, fso, niocount, nb, oti, 0);}static inline int fsfilt_extend(struct obd_device *obd, struct inode *inode,                                unsigned int nblocks, void *handle){        unsigned long now = jiffies;        int rc = obd->obd_fsops->fs_extend(inode, nblocks, handle);        CDEBUG(D_INFO, "extending handle %p with %u blocks\n", handle, nblocks);        fsfilt_check_slow(obd, now, obd_timeout, "journal extend");        return rc;}static inline int fsfilt_commit(struct obd_device *obd, struct inode *inode,                                void *handle, int force_sync){        unsigned long now = jiffies;        int rc = obd->obd_fsops->fs_commit(inode, handle, force_sync);        CDEBUG(D_INFO, "committing handle %p\n", handle);        fsfilt_check_slow(obd, now, obd_timeout, "journal start");        return rc;}static inline int fsfilt_commit_async(struct obd_device *obd,                                      struct inode *inode, void *handle,                                      void **wait_handle){        unsigned long now = jiffies;        int rc = obd->obd_fsops->fs_commit_async(inode, handle, wait_handle);        CDEBUG(D_INFO, "committing handle %p (async)\n", *wait_handle);        fsfilt_check_slow(obd, now, obd_timeout, "journal start");        return rc;}static inline int fsfilt_commit_wait(struct obd_device *obd,                                     struct inode *inode, void *handle){        unsigned long now = jiffies;        int rc = obd->obd_fsops->fs_commit_wait(inode, handle);        CDEBUG(D_INFO, "waiting for completion %p\n", handle);        fsfilt_check_slow(obd, now, obd_timeout, "journal start");        return rc;}static inline int fsfilt_setattr(struct obd_device *obd, struct dentry *dentry,                                 void *handle, struct iattr *iattr,int do_trunc){        unsigned long now = jiffies;        int rc;        rc = obd->obd_fsops->fs_setattr(dentry, handle, iattr, do_trunc);        fsfilt_check_slow(obd, now, obd_timeout, "setattr");        return rc;}static inline int fsfilt_iocontrol(struct obd_device *obd, struct inode *inode,                                   struct file *file, unsigned int cmd,                                   unsigned long arg){        return obd->obd_fsops->fs_iocontrol(inode, file, cmd, arg);}static inline int fsfilt_set_md(struct obd_device *obd, struct inode *inode,                                void *handle, void *md, int size,                                const char *name){        return obd->obd_fsops->fs_set_md(inode, handle, md, size, name);}static inline int fsfilt_get_md(struct obd_device *obd, struct inode *inode,                                void *md, int size, const char *name){        return obd->obd_fsops->fs_get_md(inode, md, size, name);}static inline int fsfilt_send_bio(int rw, struct obd_device *obd,                                  struct inode *inode, void *bio){        LASSERTF(rw == OBD_BRW_WRITE || rw == OBD_BRW_READ, "%x\n", rw);        if (rw == OBD_BRW_READ)                return obd->obd_fsops->fs_send_bio(READ, inode, bio);        return obd->obd_fsops->fs_send_bio(WRITE, inode, bio);}static inline ssize_t fsfilt_readpage(struct obd_device *obd,                                      struct file *file, char *buf,                                      size_t count, loff_t *offset){        return obd->obd_fsops->fs_readpage(file, buf, count, offset);}static inline int fsfilt_add_journal_cb(struct obd_device *obd, __u64 last_rcvd,                                        void *handle, fsfilt_cb_t cb_func,                                        void *cb_data){        return obd->obd_fsops->fs_add_journal_cb(obd, last_rcvd,                                                 handle, cb_func, cb_data);}/* very similar to obd_statfs(), but caller already holds obd_osfs_lock */static inline int fsfilt_statfs(struct obd_device *obd, struct super_block *sb,                                __u64 max_age){        int rc = 0;        CDEBUG(D_SUPER, "osfs "LPU64", max_age "LPU64"\n",                obd->obd_osfs_age, max_age);        if (cfs_time_before_64(obd->obd_osfs_age, max_age)) {                rc = obd->obd_fsops->fs_statfs(sb, &obd->obd_osfs);                if (rc == 0) /* N.B. statfs can't really fail */                        obd->obd_osfs_age = cfs_time_current_64();        } else {                CDEBUG(D_SUPER, "using cached obd_statfs data\n");        }        return rc;}static inline int fsfilt_sync(struct obd_device *obd, struct super_block *sb){        return obd->obd_fsops->fs_sync(sb);}static inline int fsfilt_quotacheck(struct obd_device *obd,                                    struct super_block *sb,                                    struct obd_quotactl *oqctl){        if (obd->obd_fsops->fs_quotacheck)                return obd->obd_fsops->fs_quotacheck(sb, oqctl);        return -ENOTSUPP;}static inline int fsfilt_quotactl(struct obd_device *obd,                                  struct super_block *sb,                                  struct obd_quotactl *oqctl){        if (obd->obd_fsops->fs_quotactl)                return obd->obd_fsops->fs_quotactl(sb, oqctl);        return -ENOTSUPP;}static inline int fsfilt_quotainfo(struct obd_device *obd,                                   struct lustre_quota_info *lqi,                                   int type, int cmd){        if (obd->obd_fsops->fs_quotainfo)                return obd->obd_fsops->fs_quotainfo(lqi, type, cmd);        return -ENOTSUPP;}static inline int fsfilt_qids(struct obd_device *obd, struct file *file,                              struct inode *inode, int type,                               struct list_head *list){        if (obd->obd_fsops->fs_qids)                return obd->obd_fsops->fs_qids(file, inode, type, list);        return -ENOTSUPP;}static inline int fsfilt_dquot(struct obd_device *obd,                               struct lustre_dquot *dquot, int cmd){        if (obd->obd_fsops->fs_dquot)                return obd->obd_fsops->fs_dquot(dquot, cmd);        return -ENOTSUPP;}static inline int fsfilt_map_inode_pages(struct obd_device *obd,                                         struct inode *inode,                                         struct page **page, int pages,                                         unsigned long *blocks, int *created,                                         int create, struct semaphore *sem){        return obd->obd_fsops->fs_map_inode_pages(inode, page, pages, blocks,                                                  created, create, sem);}static inline int fsfilt_read_record(struct obd_device *obd, struct file *file,                                     void *buf, loff_t size, loff_t *offs){        return obd->obd_fsops->fs_read_record(file, buf, size, offs);}static inline int fsfilt_write_record(struct obd_device *obd, struct file *file,                                      void *buf, loff_t size, loff_t *offs,                                      int force_sync){        return obd->obd_fsops->fs_write_record(file, buf, size,offs,force_sync);}static inline int fsfilt_setup(struct obd_device *obd, struct super_block *fs){        if (obd->obd_fsops->fs_setup)                return obd->obd_fsops->fs_setup(fs);        return 0;}static inline __u64 fsfilt_set_version(struct obd_device *obd,                                      struct inode *inode, __u64 new_version){        if (obd->obd_fsops->fs_set_version)                return obd->obd_fsops->fs_set_version(inode, new_version);        return -EOPNOTSUPP;}static inline __u64 fsfilt_get_version(struct obd_device *obd,                                       struct inode *inode){        if (obd->obd_fsops->fs_set_version)                return obd->obd_fsops->fs_get_version(inode);        return -EOPNOTSUPP;}#endif /* __KERNEL__ */#endif

⌨️ 快捷键说明

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