]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
ceph: correctly set 'follows' in flushsnap messages
authorSage Weil <sage@newdream.net>
Tue, 14 Sep 2010 22:45:44 +0000 (15:45 -0700)
committerSage Weil <sage@newdream.net>
Tue, 14 Sep 2010 22:45:44 +0000 (15:45 -0700)
The 'follows' should match the seq for the snap context for the given snap
cap, which is the context under which we have been dirtying and writing
data and metadata.  The snapshot that _contains_ those updates thus
_follows_ that context's seq #.

Signed-off-by: Sage Weil <sage@newdream.net>
fs/ceph/snap.c

index 4868b9dcac5a6cc7a4d00610780572f335ef68f2..9e836afba34115383408705ee3f899891cde935c 100644 (file)
@@ -467,7 +467,7 @@ void ceph_queue_cap_snap(struct ceph_inode_info *ci)
                INIT_LIST_HEAD(&capsnap->ci_item);
                INIT_LIST_HEAD(&capsnap->flushing_item);
 
-               capsnap->follows = snapc->seq - 1;
+               capsnap->follows = snapc->seq;
                capsnap->issued = __ceph_caps_issued(ci, NULL);
                capsnap->dirty = dirty;