diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2010-01-17 19:53:08 -0500 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-03-05 17:49:41 -0500 |
commit | f1a3d57213fe264b4cf584e78bac36aaf9998729 (patch) | |
tree | 9adf9ba40793ecf83f7a1fd71b4bd73e726b6dac | |
parent | 422d2cb8f9afadba1ecd3614f658b6daaaa480fb (diff) |
ceph: update for write_inode API change
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Sage Weil <sage@newdream.net>
-rw-r--r-- | fs/ceph/caps.c | 4 | ||||
-rw-r--r-- | fs/ceph/super.h | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 8b89b9123252..db122bb357b8 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/sched.h> | 5 | #include <linux/sched.h> |
6 | #include <linux/vmalloc.h> | 6 | #include <linux/vmalloc.h> |
7 | #include <linux/wait.h> | 7 | #include <linux/wait.h> |
8 | #include <linux/writeback.h> | ||
8 | 9 | ||
9 | #include "super.h" | 10 | #include "super.h" |
10 | #include "decode.h" | 11 | #include "decode.h" |
@@ -1801,12 +1802,13 @@ int ceph_fsync(struct file *file, struct dentry *dentry, int datasync) | |||
1801 | * get by with fewer MDS messages if we wait for data writeback to | 1802 | * get by with fewer MDS messages if we wait for data writeback to |
1802 | * complete first. | 1803 | * complete first. |
1803 | */ | 1804 | */ |
1804 | int ceph_write_inode(struct inode *inode, int wait) | 1805 | int ceph_write_inode(struct inode *inode, struct writeback_control *wbc) |
1805 | { | 1806 | { |
1806 | struct ceph_inode_info *ci = ceph_inode(inode); | 1807 | struct ceph_inode_info *ci = ceph_inode(inode); |
1807 | unsigned flush_tid; | 1808 | unsigned flush_tid; |
1808 | int err = 0; | 1809 | int err = 0; |
1809 | int dirty; | 1810 | int dirty; |
1811 | int wait = wbc->sync_mode == WB_SYNC_ALL; | ||
1810 | 1812 | ||
1811 | dout("write_inode %p wait=%d\n", inode, wait); | 1813 | dout("write_inode %p wait=%d\n", inode, wait); |
1812 | if (wait) { | 1814 | if (wait) { |
diff --git a/fs/ceph/super.h b/fs/ceph/super.h index 02c0ddcf3eaf..65d12036b670 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/mempool.h> | 11 | #include <linux/mempool.h> |
12 | #include <linux/pagemap.h> | 12 | #include <linux/pagemap.h> |
13 | #include <linux/wait.h> | 13 | #include <linux/wait.h> |
14 | #include <linux/writeback.h> | ||
14 | 15 | ||
15 | #include "types.h" | 16 | #include "types.h" |
16 | #include "messenger.h" | 17 | #include "messenger.h" |
@@ -811,7 +812,7 @@ static inline void ceph_remove_cap(struct ceph_cap *cap) | |||
811 | extern void ceph_put_cap(struct ceph_cap *cap); | 812 | extern void ceph_put_cap(struct ceph_cap *cap); |
812 | 813 | ||
813 | extern void ceph_queue_caps_release(struct inode *inode); | 814 | extern void ceph_queue_caps_release(struct inode *inode); |
814 | extern int ceph_write_inode(struct inode *inode, int unused); | 815 | extern int ceph_write_inode(struct inode *inode, struct writeback_control *wbc); |
815 | extern int ceph_fsync(struct file *file, struct dentry *dentry, int datasync); | 816 | extern int ceph_fsync(struct file *file, struct dentry *dentry, int datasync); |
816 | extern void ceph_kick_flushing_caps(struct ceph_mds_client *mdsc, | 817 | extern void ceph_kick_flushing_caps(struct ceph_mds_client *mdsc, |
817 | struct ceph_mds_session *session); | 818 | struct ceph_mds_session *session); |