+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,
+ cfs_list_t *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_get_mblk(struct obd_device *obd,
+ struct super_block *sb, int *count,
+ struct inode *inode, int frags)
+{
+ if (obd->obd_fsops->fs_get_mblk)
+ return obd->obd_fsops->fs_get_mblk(sb, count, inode, frags);
+ 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, cfs_mutex_t *mutex)
+{
+ return obd->obd_fsops->fs_map_inode_pages(inode, page, pages, blocks,
+ created, create, mutex);
+}
+
+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)