]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: introduce ceph.mirror.dirty_snap_id vxattr
authorVenky Shankar <vshankar@redhat.com>
Wed, 17 Feb 2021 12:51:52 +0000 (07:51 -0500)
committerVenky Shankar <vshankar@redhat.com>
Tue, 25 May 2021 12:44:43 +0000 (08:44 -0400)
Purpose of this xattr is to identify if the "next" snapshot to be
synchronized can be incrementally transferred. Value of the xattr
is the snap-id of a snapshot in the primary cluster (for a given
directory root).

CephFS mirror daemon sets this xattr on the directory root once
the data for a snapshot is synchronized, thereby signifying that
the data under this directory root is the data of the snapshot
identified by the snap-id value. This allows the mirror daemon
to use the much efficient selective synchronzation (based on
mtime/ctime) by scanning the two snapshots locally and only
transferring the inodes that have changed.

Signed-off-by: Venky Shankar <vshankar@redhat.com>
src/mds/Server.h

index 39b84277a1cc9a2ca3209887a406f87292e9f34f..7297fd56b62313a8907844df9dd39b1253ddfa54 100644 (file)
@@ -426,7 +426,8 @@ private:
       return true;
     }
 
-    return xattr_name == "ceph.mirror.info";
+    return xattr_name == "ceph.mirror.info" ||
+           xattr_name == "ceph.mirror.dirty_snap_id";
   }
 
   void reply_client_request(MDRequestRef& mdr, const ref_t<MClientReply> &reply);