Skip to content

Commit

Permalink
ceph: stop sending FLUSHSNAPs when we hit a dirty capsnap
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
liewegas committed Sep 14, 2010
1 parent 8bef923 commit cfc0bf6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fs/ceph/caps.c
Original file line number Diff line number Diff line change
Expand Up @@ -1227,7 +1227,7 @@ void __ceph_flush_snaps(struct ceph_inode_info *ci,
* pages to be written out.
*/
if (capsnap->dirty_pages || capsnap->writing)
continue;
break;

/*
* if cap writeback already occurred, we should have dropped
Expand Down Expand Up @@ -1276,8 +1276,8 @@ void __ceph_flush_snaps(struct ceph_inode_info *ci,
&session->s_cap_snaps_flushing);
spin_unlock(&inode->i_lock);

dout("flush_snaps %p cap_snap %p follows %lld size %llu\n",
inode, capsnap, next_follows, capsnap->size);
dout("flush_snaps %p cap_snap %p follows %lld tid %llu\n",
inode, capsnap, capsnap->follows, capsnap->flush_tid);
send_cap_msg(session, ceph_vino(inode).ino, 0,
CEPH_CAP_OP_FLUSHSNAP, capsnap->issued, 0,
capsnap->dirty, 0, capsnap->flush_tid, 0, mseq,
Expand Down

0 comments on commit cfc0bf6

Please sign in to comment.