diff options
author | Sage Weil <sage@newdream.net> | 2010-09-14 18:50:59 -0400 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-09-14 18:50:59 -0400 |
commit | cfc0bf6640dfd0f43bf8bfec5a475284809baa4d (patch) | |
tree | 63ee1563bc9b844c48684e57ad03bc3c023014a2 /fs/ceph | |
parent | 8bef9239ee1a42eb37d3f83bacf6a75f019c028d (diff) |
ceph: stop sending FLUSHSNAPs when we hit a dirty capsnap
Stop sending FLUSHSNAP messages when we hit a capsnap that has dirty_pages
or is still writing. We'll send the newer capsnaps only after the older
ones complete.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/caps.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index a2069b6680a..9fbe9019155 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c | |||
@@ -1227,7 +1227,7 @@ retry: | |||
1227 | * pages to be written out. | 1227 | * pages to be written out. |
1228 | */ | 1228 | */ |
1229 | if (capsnap->dirty_pages || capsnap->writing) | 1229 | if (capsnap->dirty_pages || capsnap->writing) |
1230 | continue; | 1230 | break; |
1231 | 1231 | ||
1232 | /* | 1232 | /* |
1233 | * if cap writeback already occurred, we should have dropped | 1233 | * if cap writeback already occurred, we should have dropped |
@@ -1276,8 +1276,8 @@ retry: | |||
1276 | &session->s_cap_snaps_flushing); | 1276 | &session->s_cap_snaps_flushing); |
1277 | spin_unlock(&inode->i_lock); | 1277 | spin_unlock(&inode->i_lock); |
1278 | 1278 | ||
1279 | dout("flush_snaps %p cap_snap %p follows %lld size %llu\n", | 1279 | dout("flush_snaps %p cap_snap %p follows %lld tid %llu\n", |
1280 | inode, capsnap, next_follows, capsnap->size); | 1280 | inode, capsnap, capsnap->follows, capsnap->flush_tid); |
1281 | send_cap_msg(session, ceph_vino(inode).ino, 0, | 1281 | send_cap_msg(session, ceph_vino(inode).ino, 0, |
1282 | CEPH_CAP_OP_FLUSHSNAP, capsnap->issued, 0, | 1282 | CEPH_CAP_OP_FLUSHSNAP, capsnap->issued, 0, |
1283 | capsnap->dirty, 0, capsnap->flush_tid, 0, mseq, | 1283 | capsnap->dirty, 0, capsnap->flush_tid, 0, mseq, |