void *(* fs_brw_start)(int objcount, struct fsfilt_objinfo *fso,
int niocount, void *desc_private);
int (* fs_commit)(struct inode *inode, void *handle,int force_sync);
+ int (* fs_commit_async)(struct inode *inode, void **handle);
+ int (* fs_commit_wait)(struct inode *inode, void *handle);
int (* fs_setattr)(struct dentry *dentry, void *handle,
struct iattr *iattr, int do_trunc);
int (* fs_iocontrol)(struct inode *inode, struct file *file,
return rc;
}
+static inline int fsfilt_commit_async(struct obd_device *obd,
+ struct inode *inode,
+ void **handle)
+{
+ unsigned long now = jiffies;
+ int rc = obd->obd_fsops->fs_commit_async(inode, handle);
+ CDEBUG(D_HA, "committing handle %p (async)\n", *handle);
+ if (time_after(jiffies, now + 15 * HZ))
+ CERROR("long journal start time %lus\n", (jiffies - now) / HZ);
+ 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_HA, "waiting for completion %p\n", handle);
+ if (time_after(jiffies, now + 15 * HZ))
+ CERROR("long journal start time %lus\n", (jiffies - now) / HZ);
+ return rc;
+}
+
static inline int fsfilt_setattr(struct obd_device *obd, struct dentry *dentry,
void *handle, struct iattr *iattr,int do_trunc)
{