]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: introduce ceph.mirror.info virtual xattr
authorVenky Shankar <vshankar@redhat.com>
Wed, 26 Aug 2020 12:55:51 +0000 (08:55 -0400)
committerVenky Shankar <vshankar@redhat.com>
Tue, 13 Oct 2020 04:29:38 +0000 (00:29 -0400)
commita631febb2c170002accb7d0a87348ed524fba59c
treef010d7a6efde2d22198f5ed759f038696fb33abc
parenta641e3c7600c7323532f95641a4b229c29985d55
mds: introduce ceph.mirror.info virtual xattr

This is a compound xattr with the xattr value being fixed in
format. MDS stores this xattr as two (since the xattr value
right now just has two components or compounds) separate entries
in the xattr_map. This is done to avoid bloating the xattr value
if more "compounds" are added.

You may ask, why do it this way rather having the application
(cephfs-mirror daemon in this case) just set each xattr one
after the other? Well, we loose xattr consistency (from the
application point-of-view) -- an application crash (bug!) or
an ENOSPC in the server could leave M out of N xattrs (M < N)
on-disk.

With the compound xattr operation done on the server side,
journaling ensure that either all (N) xattrs are available or
none are available after recovering from a crash.

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