summaryrefslogtreecommitdiffstats
path: root/fs/ceph/mds_client.c
diff options
context:
space:
mode:
authorSage Weil2009-10-14 23:27:38 +0200
committerSage Weil2009-10-16 03:14:35 +0200
commitafcdaea3f2a78ce4873bd7e98a6d603bda23d167 (patch)
tree08defc298e2c27816d70bd41c8c3ecc80a82ba79 /fs/ceph/mds_client.c
parentceph: move generic flushing code into helper (diff)
downloadkernel-qcow2-linux-afcdaea3f2a78ce4873bd7e98a6d603bda23d167.tar.gz
kernel-qcow2-linux-afcdaea3f2a78ce4873bd7e98a6d603bda23d167.tar.xz
kernel-qcow2-linux-afcdaea3f2a78ce4873bd7e98a6d603bda23d167.zip
ceph: flush dirty caps via the cap_dirty list
Previously we were flushing dirty caps by passing an extra flag when traversing the delayed caps list. Besides being a bit ugly, that can also miss caps that are dirty but didn't result in a cap requeue: notably, mark_caps_dirty(). Separate the flushing into a separate helper, and traverse the cap_dirty list. This also brings i_dirty_item in line with i_dirty_caps: we are on the list IFF caps != 0. We carry an inode ref IFF dirty_caps|flushing_caps != 0. Lose the unused return value from __ceph_mark_caps_dirty(). Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/mds_client.c')
-rw-r--r--fs/ceph/mds_client.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index 2b19da31a8b3..12d66c0572ac 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -2504,7 +2504,7 @@ static void delayed_work(struct work_struct *work)
int renew_caps;
dout("mdsc delayed_work\n");
- ceph_check_delayed_caps(mdsc, 0);
+ ceph_check_delayed_caps(mdsc);
mutex_lock(&mdsc->mutex);
renew_interval = mdsc->mdsmap->m_session_timeout >> 2;
@@ -2627,7 +2627,7 @@ void ceph_mdsc_pre_umount(struct ceph_mds_client *mdsc)
mdsc->stopping = 1;
drop_leases(mdsc);
- ceph_check_delayed_caps(mdsc, 1);
+ ceph_flush_dirty_caps(mdsc);
wait_requests(mdsc);
}
@@ -2677,7 +2677,7 @@ void ceph_mdsc_sync(struct ceph_mds_client *mdsc)
mutex_unlock(&mdsc->mutex);
dout("sync want tid %lld flush_seq %lld\n", want_tid, want_flush);
- ceph_check_delayed_caps(mdsc, 1);
+ ceph_flush_dirty_caps(mdsc);
wait_unsafe_requests(mdsc, want_tid);
wait_event(mdsc->cap_flushing_wq, check_cap_flush(mdsc, want_flush));