+ return obd->obd_fsops->fs_getlabel(sb);
+}
+
+static inline int fsfilt_set_label(struct obd_device *obd,
+ struct super_block *sb, char *label)
+{
+ if (obd->obd_fsops->fs_setlabel == NULL)
+ return -ENOSYS;
+ return (obd->obd_fsops->fs_setlabel(sb, label));
+}
+
+static inline __u8 *fsfilt_uuid(struct obd_device *obd, struct super_block *sb)
+{
+ if (obd->obd_fsops->fs_uuid == NULL)
+ return NULL;
+
+ return obd->obd_fsops->fs_uuid(sb);
+}
+
+static inline lvfs_sbdev_type fsfilt_journal_sbdev(struct obd_device *obd,
+ struct super_block *sb)
+{
+ if (obd && obd->obd_fsops && obd->obd_fsops->fs_journal_sbdev)
+ return obd->obd_fsops->fs_journal_sbdev(sb);
+ return (lvfs_sbdev_type)0;
+}
+
+#define FSFILT_OP_UNLINK 1
+#define FSFILT_OP_RMDIR 2
+#define FSFILT_OP_RENAME 3
+#define FSFILT_OP_CREATE 4
+#define FSFILT_OP_MKDIR 5
+#define FSFILT_OP_SYMLINK 6
+#define FSFILT_OP_MKNOD 7
+#define FSFILT_OP_SETATTR 8
+#define FSFILT_OP_LINK 9
+#define FSFILT_OP_CANCEL_UNLINK 10
+#define FSFILT_OP_JOIN 11
+#define FSFILT_OP_NOOP 15
+#define FSFILT_OP_UNLINK_PARTIAL_CHILD 21
+#define FSFILT_OP_UNLINK_PARTIAL_PARENT 22
+#define FSFILT_OP_CREATE_PARTIAL_CHILD 23
+
+#define __fsfilt_check_slow(obd, start, msg) \
+do { \
+ if (time_before(jiffies, start + 15 * HZ)) \
+ break; \
+ else if (time_before(jiffies, start + 30 * HZ)) \
+ CDEBUG(D_VFSTRACE, "%s: slow %s %lus\n", obd->obd_name, \
+ msg, (jiffies-start) / HZ); \
+ else if (time_before(jiffies, start + DISK_TIMEOUT * HZ)) \
+ CWARN("%s: slow %s %lus\n", obd->obd_name, msg, \
+ (jiffies - start) / HZ); \
+ else \
+ CERROR("%s: slow %s %lus\n", obd->obd_name, msg, \
+ (jiffies - start) / HZ); \
+} while (0)
+
+#define fsfilt_check_slow(obd, start, msg) \
+do { \
+ __fsfilt_check_slow(obd, start, msg); \
+ start = jiffies; \
+} while (0)
+
+static inline void *fsfilt_start_log(struct obd_device *obd,
+ struct inode *inode, int op,
+ struct obd_trans_info *oti, int logs)