-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;
-}
-