ceph: allow ceph.dir.rctime xattr to be updatable
authorVenky Shankar <vshankar@redhat.com>
Thu, 10 Mar 2022 14:34:19 +0000 (09:34 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jun 2022 16:36:23 +0000 (18:36 +0200)
commitcc983cf9ee395c6a944e415bbacf12a16be9c96c
tree3ea4fa485247413d53b4bf482a9157a1748735c6
parent729fea8aaf2c7d0e879b3599d056533c9beb0e10
ceph: allow ceph.dir.rctime xattr to be updatable

[ Upstream commit d7a2dc523085f8b8c60548ceedc696934aefeb0e ]

`rctime' has been a pain point in cephfs due to its buggy
nature - inconsistent values reported and those sorts.
Fixing rctime is non-trivial needing an overall redesign
of the entire nested statistics infrastructure.

As a workaround, PR

     http://github.com/ceph/ceph/pull/37938

allows this extended attribute to be manually set. This allows
users to "fixup" inconsistent rctime values. While this sounds
messy, its probably the wisest approach allowing users/scripts
to workaround buggy rctime values.

The above PR enables Ceph MDS to allow manually setting
rctime extended attribute with the corresponding user-land
changes. We may as well allow the same to be done via kclient
for parity.

Signed-off-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ceph/xattr.c