#include <linux/sched.h>
#include <linux/vmalloc.h>
#include <linux/wait.h>
+#include <linux/writeback.h>
#include "super.h"
#include "decode.h"
* get by with fewer MDS messages if we wait for data writeback to
* complete first.
*/
-int ceph_write_inode(struct inode *inode, int wait)
+int ceph_write_inode(struct inode *inode, struct writeback_control *wbc)
{
struct ceph_inode_info *ci = ceph_inode(inode);
unsigned flush_tid;
int err = 0;
int dirty;
+ int wait = wbc->sync_mode == WB_SYNC_ALL;
dout("write_inode %p wait=%d\n", inode, wait);
if (wait) {
#include <linux/mempool.h>
#include <linux/pagemap.h>
#include <linux/wait.h>
+#include <linux/writeback.h>
#include "types.h"
#include "messenger.h"
extern void ceph_put_cap(struct ceph_cap *cap);
extern void ceph_queue_caps_release(struct inode *inode);
-extern int ceph_write_inode(struct inode *inode, int unused);
+extern int ceph_write_inode(struct inode *inode, struct writeback_control *wbc);
extern int ceph_fsync(struct file *file, struct dentry *dentry, int datasync);
extern void ceph_kick_flushing_caps(struct ceph_mds_client *mdsc,
struct ceph_mds_session *session);